dhyas

THEME 01 - NASA

Mar 29th, 2019 (edited)
3,860
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.41 KB | None | 0 0
  1. <!--
  2.  
  3. ♡ NASA / THEME 01 by DHYA @ARIANAGRANDRE ♡
  4. [EDITED AS OF 17 OCT 2021]
  5. arianagrandre.tumblr.com
  6.  
  7. base code by @sorrism, no.js photosets by @annasthms & @eggdesign, resizing videos by @shythemes, icon fonts by fontawesome
  8.  
  9. Please DO NOT remove any credits. DO NOT claim or redistribute, take parts as your own or use this theme as a base code. Feel free to edit it as much you like. Enjoy!
  10.  
  11.  
  12. -->
  13.  
  14. <!DOCTYPE html>
  15. <head>
  16.  
  17. <title>{block:PostSummary}{PostSummary} : {/block:PostSummary}{Title}</title>
  18.  
  19. <link rel="shortcut icon" href="{favicon}">
  20.  
  21. <link rel="alternate" type="application/rss+xml" href="{RSS}">
  22. {block:Description}<meta name="description" content="{MetaDescription}" />{/block:Description}
  23.  
  24. <!--Default Variables-->
  25.  
  26. <meta name="color:Background" content="#ffffff"/>
  27. <meta name="color:Text" content="#5d5d5d"/>
  28. <meta name="color:Link" content="#6b6b6b"/>
  29. <meta name="color:Link Hover" content="#aaaaaa"/>
  30. <meta name="color:Title"content="#282828"/>
  31. <meta name="color:Scrollbar" content="#d5d5d5" />
  32. <meta name="if:Show Title" content="0" />
  33.  
  34. <meta name="text:Link 1 URL" content="" />
  35. <meta name="text:Link 1" content="" />
  36. <meta name="text:Link 2 URL" content="" />
  37. <meta name="text:Link 2" content="" />
  38. <meta name="text:Link 3 URL" content="" />
  39. <meta name="text:Link 3" content="" />
  40. <meta name="text:Link 4 URL" content="" />
  41. <meta name="text:Link 4" content="" />
  42.  
  43. <meta name="text:Home Title" content="index"/>
  44. <meta name="text:Ask Title" content="message"/>
  45. <meta name="text:Archive Title" content="history"/>
  46.  
  47. <meta name="image:Sidebar" content=""/>
  48.  
  49. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  50. <link href="https://fonts.googleapis.com/css?family=Maven+Pro" rel="stylesheet">
  51. <link href="https://fonts.googleapis.com/css?family=Nunito:700" rel="stylesheet">
  52. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
  53. <script src ="//static.tumblr.com/fwgzvyf/Oj1o08f6h/shythemes.vr.js"></script>
  54. <link href="https://static.tumblr.com/0podkko/oDSpg7y88/photosets.css" rel="stylesheet">
  55.  
  56. <!--CSS customization here. -->
  57.  
  58. <style type="text/css">
  59.  
  60.  
  61. /*tumblr controls and lightbox*/
  62.  
  63. .tmblr-lightbox {background:rgba({RGBcolor:background}, .95)!important;}
  64.  
  65. .tmblr-lightbox img {opacity:0;}
  66.  
  67. .lightbox-caption {
  68. color:{color:title}!important;
  69. font-family:inherit!important;
  70. font-size:1em!important;
  71. font-weight:normal!important;
  72. text-shadow:none!important;
  73. }
  74.  
  75. .lightbox-image {
  76. -moz-box-shadow:none!important;
  77. -webkit-box-shadow:none!important;
  78. box-shadow:none!important;
  79. -moz-border-radius:0px!important;
  80. -webkit-border-radius:0px!important;
  81. border-radius:0px!important;
  82. padding:0px!important;
  83. border:0!important;
  84. opacity:1!important;
  85. }
  86.  
  87. .vignette {opacity:0!Important;}
  88.  
  89. .iframe-controls--desktop {
  90. white-space:nowrap!important;
  91. top:5px!important;
  92. right:5px!important;
  93. opacity:1!important;
  94. position:fixed!important;
  95. }
  96.  
  97. /*tooltip*/
  98.  
  99. .ui-tooltip {
  100. position:Absolute;
  101. z-index:9999;
  102. padding-top:10px;
  103. }
  104.  
  105. .ui-tooltip-content {
  106. background:{color:background};
  107. padding:0 4px;
  108. font-style:italic;
  109. color:{color:link};
  110. text-transform:lowercase;
  111. border:1px solid {color:borders};
  112. }
  113.  
  114. /*scrollbar*/
  115.  
  116. ::-webkit-scrollbar{
  117. height:11px;
  118. width:11px;
  119. background:inherit;
  120. }
  121.  
  122. ::-webkit-scrollbar-thumb {background:{color:scrollbar};}
  123.  
  124. ::-webkit-scrollbar-track {background:{color:borders};}
  125.  
  126. ::-webkit-scrollbar-thumb, ::-webkit-scrollbar-track {border:5px solid {color:background};}
  127.  
  128.  
  129. /*main structure*/
  130.  
  131. body {
  132. background:{color:background};
  133. color:{color:text};
  134. font:11.5px 'maven pro', serif;
  135. line-height:1.5em;
  136. word-wrap:break-word;
  137. text-align:justify;
  138. text-transform:none;
  139. }
  140.  
  141. a {
  142. color:{color:link};
  143. text-decoration:none;
  144. transition:all .3s linear;
  145. -webkit-transition:all .3s linear;
  146. -o-transition:all .3s linear;
  147. -moz-transition:all .3s linear;
  148. }
  149.  
  150. a, a img {cursor:pointer;}
  151.  
  152. a:hover {
  153. color:{color:link hover}!important;
  154. text-decoration:none;
  155. }
  156.  
  157. img {
  158. opacity:1;
  159. border:0;
  160. text-decoration:none;
  161. max-width:100%;
  162. height:auto;
  163. display:block;
  164. }
  165.  
  166. blockquote {
  167. padding:.25em 0 .25em 15px;
  168. margin:.5em 0;
  169.  
  170. }
  171.  
  172. pre {
  173. padding:0;
  174. margin:0;
  175. line-height:inherit!important;
  176. background:transparent;
  177. font-family:inherit!Important;
  178. font-size:inherit!important;
  179. white-space:pre-wrap;
  180. white-space:-moz-pre-wrap;
  181. white-space:-pre-wrap;
  182. white-space:-o-pre-wrap;
  183. word-wrap:break-word;
  184. }
  185.  
  186. p {margin:1em 0;}
  187.  
  188. p:first-of-type {margin-top:0;}
  189.  
  190. p:last-of-type {margin-bottom:0;}
  191.  
  192. b, strong, b a, strong a {
  193. font-weight:bold!important;
  194. color:{color:title};
  195. }
  196.  
  197. small, big, sub, pre {
  198. font-size:1em!important;
  199. line-height:1.4em!important;
  200. vertical-align:baseline!important;
  201. }
  202.  
  203. i {
  204. font-style:italic;
  205. }
  206.  
  207. h1, h2, h3, h4 {
  208. margin:1.5em 0;
  209. font-size:13px;
  210. letter-spacing:0.5px;
  211. font-weight:500;
  212. color:{color:title};
  213. font-weight:bold;
  214. }
  215.  
  216. .posts h1:first-child, .posts h2:first-child, .posts h3:first-child, .posts h4:first-child {margin-top:0;}
  217.  
  218. hr {
  219. border:none;
  220. box-shadow:0;
  221. margin:2em auto;
  222. width:75px;
  223. }
  224.  
  225. /*header*/
  226.  
  227. sidebar {
  228. width:260px;
  229. margin-left: 120px;
  230. margin-top: 10px;
  231. position:fixed;
  232. padding:10px;
  233. }
  234.  
  235. .sidebarimg img {
  236. display:block;
  237. max-width:260px;
  238. margin-bottom:20px;
  239. }
  240.  
  241.  
  242. .nav {
  243. margin-top:19px;
  244. text-align: left;
  245. display:block;
  246. }
  247.  
  248.  
  249. .nav a {
  250. line-height:30px;
  251. font-size:12px;
  252. font-weight:700;
  253. font-family: 'nunito', sans-serif;
  254. text-transform:lowercase;
  255. color: {color:link};
  256. -moz-transition-duration: 0.5s;
  257. -o-transition-duration: 0.5s;
  258. -webkit-transition-duration: 0.5s;
  259. transition-duration: 0.5s;
  260. }
  261.  
  262. .nav a:hover {
  263. color:{color:Link Hover};
  264. text-decoration:none;
  265. -moz-transition-duration: 0.5s;
  266. -o-transition-duration: 0.5s;
  267. -webkit-transition-duration: 0.5s;
  268. transition-duration: 0.5s;
  269. }
  270.  
  271. .blogtitle {
  272. text-align:left;
  273. margin-bottom:20px;
  274. font-family: 'nunito', sans-serif;
  275. letter-spacing:0.5px;
  276. font-weight:700;
  277. font-size:15px;
  278. color:{color:title};
  279. text-transform:lowercase;
  280. }
  281.  
  282.  
  283. #description {
  284. margin-top:15px;
  285. text-align:left;
  286. }
  287.  
  288. /*pagination*/
  289.  
  290. .pagination {
  291. width:540px;
  292. padding-bottom:50px;
  293. margin-top:100px;
  294. text-align:center;
  295. font-size:10px;
  296. font-family:'maven pro', sans-serif;
  297. text-transform:lowercase;
  298. }
  299.  
  300.  
  301. .pagination a {
  302. color:{color:Text};
  303. padding:10px;
  304. -moz-transition-duration: 0.5s;
  305. -o-transition-duration: 0.5s;
  306. -webkit-transition-duration: 0.5s;
  307. transition-duration: 0.5s;
  308. }
  309.  
  310. .pagination a:hover {
  311. color:{color:Link Hover};
  312. text-decoration:none;
  313. -moz-transition-duration: 0.5s;
  314. -o-transition-duration: 0.5s;
  315. -webkit-transition-duration: 0.5s;
  316. transition-duration: 0.5s;
  317. }
  318.  
  319.  
  320. /*posts*/
  321.  
  322. section {
  323. width:540px;
  324. margin-left:490px;
  325. margin-top: 100px;
  326. margin-bottom:100px;
  327. }
  328. .posts {
  329. width:540px;
  330. margin-bottom:100px;
  331. padding:20px;
  332. text-align:justify;
  333. }
  334.  
  335. .ph {
  336. position:relative;
  337. overflow:hidden;
  338. }
  339.  
  340. .ph img {
  341. width:100%;
  342. display:block;
  343. }
  344.  
  345. .posts ul li {
  346. list-style:none;
  347. line-height:100%;
  348. margin-left:0px;
  349. }
  350.  
  351. .posts ul li:before {
  352. content:"›";
  353. color:{color:accent};
  354. padding-right:5px;
  355. }
  356.  
  357.  
  358. /*titles*/
  359.  
  360. .title {
  361. font-family:'nunito', sans-serif;
  362. line-height:150%;
  363. margin-bottom:10px;
  364. font-size:13px;
  365. color:{color:text};
  366. text-transform:uppercase;
  367. letter-spacing:0.5px;
  368. font-weight: 500;
  369. }
  370.  
  371. .title a {color:{color:title};}
  372.  
  373. .title a:hover {color:{color:link};}
  374.  
  375. /*captions*/
  376.  
  377. .user {
  378.  
  379. line-height:20px;
  380. font-family:'nunito',sans-serif;
  381. font-style:bold;
  382. font-weight:700;
  383.  
  384. }
  385.  
  386. .user img {
  387. border-radius: 50px;
  388. width: 18px;
  389. height: 18px;
  390. margin-right:10px;
  391. margin-top:1px;
  392. display:inline-block;
  393. float:left;
  394. }
  395.  
  396.  
  397.  
  398. .comment {
  399.  
  400.  
  401. padding:1em 0;
  402. list-style:none;
  403.  
  404. }
  405.  
  406. .comment:last-of-type {padding-bottom:0!important;}
  407.  
  408.  
  409. .captioned .comment:first-of-type {margin-top:1em;}
  410.  
  411. .tex {margin-top:1.5em; font-weight:normal;font-family:'maven pro', sans-serif;}
  412.  
  413. .tex li, .tex blockquote {
  414. text-align:left;
  415. margin-top:10px;
  416. }
  417.  
  418.  
  419.  
  420. /*photoset*/
  421.  
  422. [photoset-layout] {
  423. grid-gap:4px;
  424. }
  425.  
  426. [photoset-layout] div {
  427. cursor:pointer;
  428. }
  429.  
  430. /*quote*/
  431.  
  432. .source {margin-top:5px;}
  433.  
  434. /*audio*/
  435.  
  436. .player {
  437. width:25px;
  438. height:30px;
  439. position:absolute;
  440. left:5px;
  441. top:calc(50% - 15px);
  442. display:block;
  443. overflow:hidden;
  444. }
  445.  
  446. .trname{
  447.  
  448. font-family:'nunito', sans-serif;
  449. font-weight:bold;
  450. font-style:italic;}
  451.  
  452. .hold {
  453. text-align:left;
  454. background: #f2f2f2;
  455. position:relative;
  456. display:block;
  457. min-height:24px;
  458. padding:20px;
  459. }
  460.  
  461. .audio_info {
  462. vertical-align:middle;
  463. line-height:1.5em;
  464. margin-left:25px;
  465. max-width:calc(100% - 35px);
  466. }
  467.  
  468. .audio_info span {
  469. white-space:nowrap;
  470. overflow:hidden;
  471. text-overflow:ellipsis;
  472. display:block;
  473. }
  474.  
  475.  
  476. /*asks*/
  477.  
  478. .q {
  479. text-align:left;
  480. padding:30px;
  481. margin-bottom:-1em;
  482. background-color:#f2f2f2;
  483. }
  484.  
  485. .ansr {margin-top:2em;}
  486.  
  487. .as {text-transform:lowercase;}
  488.  
  489. .as a {color:{color:text};}
  490.  
  491. .as a:hover {color:{color:link hover};}
  492.  
  493. /*chat*/
  494.  
  495. .chat {
  496. text-align:left;
  497. margin:0;
  498. padding:0;
  499. list-style:none;
  500. }
  501.  
  502. .l {
  503. padding:15px 0;
  504. border-bottom:1px solid {color:borders};
  505. }
  506.  
  507. .label {
  508. font-weight:bold;
  509. color:{color:title};
  510. display:inline-block;
  511. }
  512.  
  513. .l:first-of-type {padding-top:0;}
  514.  
  515. .l:last-of-type {
  516. padding-bottom:0;
  517. border:0;
  518. }
  519. /*permalink and notes*/
  520.  
  521. .when {margin-top:2em;font-weight:700;font-family:'nunito',sans-serif;color:#656464;display:block;}
  522.  
  523. .tags {margin-top:0.5em;width:540px;display:block;}
  524.  
  525. .tags a {
  526. font-style:normal;
  527. word-spacing:1,5px;
  528. font-family:'maven pro',sans-serif;
  529. color:{color:text};
  530. display:inline;
  531. margin:0 5px;
  532. }
  533.  
  534. .pagenotes {
  535. padding-top:2em;
  536. border-top:1px solid ;
  537. border-color:#f2f2f2;
  538. color:#656464;
  539. }
  540.  
  541. ol.notes {
  542. list-style-type:none;
  543. padding:0px;
  544. margin:0px;
  545. }
  546.  
  547. ol.notes li.note {
  548. display:block;
  549. padding:0;
  550. margin:5px 0;
  551. }
  552.  
  553. ol.notes li.note img.avatar {display:none!important;}
  554.  
  555. a.more_notes_link {
  556. display:block;
  557. text-align:center;
  558. color:{color:title};
  559. }
  560.  
  561. .credit {
  562. position:fixed;
  563. right:12px;
  564. bottom:15px;
  565. }
  566.  
  567.  
  568. {CustomCSS}
  569.  
  570. </style>
  571.  
  572. </head>
  573.  
  574. <body>
  575.  
  576. <sidebar>
  577. {block:ifSidebarImage}<div class="sidebarimg"><a href="/"><img src="{image:Sidebar}"/></a></div>{/block:ifSidebarImage}
  578. {block:ifShowTitle}<div class="blogtitle">{Title}</div>
  579. {/block:ifShowTitle}
  580. <div id="description">{Description}</div>
  581. <div class=nav>{block:ifHomeTitle}<a href="/">{text:home title}</a></br>{/block:ifHomeTitle}{block:ifAskTitle}<a href="/ask">{text:ask title}</a><br>{/block:ifAskTitle}{block:ifArchiveTitle}<a href="/archive">{text:archive title}</a><br>{/block:ifArchiveTitle}{block:ifLink1}<a href="{text:Link 1 URL}">{text:Link 1}</a><br>{/block:ifLink1}{block:ifLink2}<a href="{text:Link 2 URL}">{text:Link 2}</a><br>{/block:ifLink2}{block:ifLink3}<a href="{text:Link 3 URL}">{text:Link 3}</a><br>{/block:ifLink3}{block:ifLink4}<a href="{text:Link 4 URL}">{text:Link 4}</a><br>{/block:ifLink4}</div>
  582. </sidebar>
  583.  
  584. <section id="entries">{block:posts}
  585. <article class="posts {block:caption}captioned{/block:caption}">
  586.  
  587. {block:Quote}
  588. <div class="title quote">{quote}</div>
  589. {block:Source}<div class="source">{source}</div>{/block:Source}
  590. {/block:Quote}
  591.  
  592.  
  593. {block:Text}
  594. {block:Title}<div class="title">{title}</div>{/block:Title}
  595. {block:RebloggedFrom}
  596. {block:Reblogs}
  597. <li class="comment {block:Title}ted{/block:Title}">
  598. <a {block:haspermalink}href="{Permalink}"{/block:haspermalink} class="user" target="_blank"><img src="{PortraitURL-64}"> {username}</a></a>
  599. <div class="tex">{body}</div>
  600. </li>
  601. {/block:Reblogs}
  602. {/block:RebloggedFrom}
  603. {block:NotReblog}
  604. <li class="comment {block:Title}ted{/block:Title}">
  605. <div class="tex">{body}</div>
  606. </li>
  607. {/block:NotReblog}
  608. {/block:Text}
  609.  
  610. {block:Link}<div class="title"><a href="{URL}">{name}</a></div>
  611. {block:Description}
  612. {block:NotReblog}
  613. <li class="comment ted">
  614. <div class="tex">{description}</div>
  615. </li>
  616. {/block:NotReblog}
  617. {/block:Description}
  618. {block:RebloggedFrom}
  619. {block:Reblogs}
  620. <li class="comment">
  621. <a {block:haspermalink}href="{Permalink}"{/block:haspermalink}</a>
  622. <div class="tex">{body}</div>
  623. </li>
  624. {/block:Reblogs}
  625. {/block:RebloggedFrom}
  626. {/block:Link}
  627.  
  628. {block:Chat}
  629. {block:Title}<div id="title">{title}</div>{/block:Title}
  630. <ol class="chat {block:Title}ted{/block:Title}">
  631. {block:lines}
  632. <li class="l {Alt}">
  633. {block:label}<span class="label">{label}</span>{/block:label} {line}
  634. </li>
  635. {/block:lines}
  636. </ol>
  637. {/block:Chat}
  638.  
  639. <div class="ph">
  640.  
  641. {block:Photo}{linkopentag}<img src="{photoURL-HighRes}" alt="{PhotoAlt}"/>{linkclosetag}{/block:Photo}
  642.  
  643. {block:Photoset}
  644. <div class="photoset-grid" photoset-layout="{PhotosetLayout}">{block:Photos}<div data-width="{PhotoWidth-HighRes}" data-height="{PhotoHeight-HighRes}" data-lowres="{PhotoURL-500}" data-highres="{PhotoURL-HighRes}" onclick="lightbox(this)"><img src="{PhotoURL-HighRes}" /></div>{/block:Photos}</div>
  645. {/block:Photoset}
  646.  
  647. {block:Video}{video-500}{/block:Video}
  648.  
  649. {block:Audio}
  650.  
  651. <div class="hold">
  652. <div class="player">{audioplayerwhite}</div>
  653. <div class="audio_info">
  654. {block:trackname}<span class="trname">{trackname}</span>{/block:trackname}
  655. {block:artist}<span class="artist">{artist}</span>{/block:artist}
  656.  
  657. </div>
  658. </div>
  659.  
  660. {/block:Audio}
  661.  
  662.  
  663. {block:caption}
  664. {block:Reblogs}
  665. <li class="comment">
  666. <a {block:haspermalink}href="{Permalink}"{/block:haspermalink} class="user" target="_blank"> <img src="{PortraitURL-64}"> {username}</a>
  667. <div class="tex">{body}</div>
  668. </li>
  669. {/block:Reblogs}
  670. {block:NotReblog}
  671. <li class="comment" style="padding:0">
  672. <div class="tex">{caption}</div>
  673. </li>
  674. {/block:NotReblog}
  675. {/block:caption}
  676. </div>
  677.  
  678. {block:Answer}
  679. <div class="q">
  680. <span style="font-style: bold;text-transform:lowercase;color:#656464;font-family:'nunito',sans-serif;">{Asker}</span> : {Question}</div>
  681. {block:Answerer}
  682. <div class="ansr">
  683. <div class="user"><img src="{AnswererPortraitURL-64}"> {username}</a> {answerer}</div> <div class="tex">{answer}</div>
  684. </div>
  685. {/block:Answerer}
  686. {block:NotReblog}
  687. <li class="comment">
  688. <div class="tex">{replies}</div>
  689. </li>
  690. {/block:NotReblog}
  691. {block:RebloggedFrom}
  692. {block:Reblogs}
  693. <li class="comment">
  694. <a {block:haspermalink}href="{permalink}"{/block:haspermalink} class="user" target="_blank"><img src="{PortraitURL-64}">{username}</a>
  695. <div class="tex">{body}</div>
  696. </li>
  697. {/block:Reblogs}
  698. {/block:RebloggedFrom}
  699. {/block:Answer}
  700.  
  701.  
  702. {block:Date}
  703.  
  704. <div class="when">
  705. <span><a href="{Permalink}">{TimeAgo} </a>{block:NoteCount} {NoteCount}{/block:NoteCount} {block:Permalink}{block:RebloggedFrom}  <a href="{ReblogParentURL}">{ReblogParentName}</a>{block:ContentSource} <a href="{SourceURL}">{SourceTitle}</a>{/block:ContentSource}{/block:RebloggedFrom}
  706. {/block:Permalink} 
  707. <div style="float:right"><a href="{ReblogURL}" target="_blank" class="details"><i class="fas fa-undo"></i></div></a></span>
  708. {block:hastags}
  709. <span class="tags">{block:Tags}<a href="{TagUrl}"># {Tag}</a>{/block:Tags}</span>
  710. {/block:hasTags}
  711. </div>
  712. {/block:Date}
  713.  
  714. </article>
  715.  
  716. {block:PostNotes}
  717. <article class="posts pagenotes">
  718. <div class="title">{NoteCountWithLabel}</div>
  719. {block:RebloggedFrom}
  720. <span style="margin-top:5px">via: <a href="{ReblogParentURL}">{ReblogParentName}</a>
  721. {block:ContentSource} &mdash; source: <a href="{ReblogRootURL}">{ReblogRootName}</a>{/block:ContentSource}
  722. </span>
  723. {/block:RebloggedFrom}
  724. <hr>
  725. {PostNotes}
  726. </article>
  727. {/block:PostNotes}
  728.  
  729. {/block:Posts}
  730.  
  731. {block:Pagination}
  732. <div class="pagination">
  733. <span>
  734. {block:PreviousPage}<a href="{PreviousPage}">〈</a>{/block:PreviousPage}
  735. {block:NextPage}<a href="{NextPage}">〉</a>{/block:NextPage} </span>
  736. </div>
  737. {/block:Pagination}
  738.  
  739. </section>
  740.  
  741. {block:ContentSource}
  742. <!-- {SourceURL}{block:SourceLogo}<img src="{BlackLogoURL}"
  743. width="{LogoWidth}" height="{LogoHeight}" alt="{SourceTitle}" />
  744. {/block:SourceLogo}
  745. {block:NoSourceLogo}{SourceLink}{/block:NoSourceLogo} -->
  746. {/block:ContentSource}
  747.  
  748. <div class="credit"><a href="https://arianagrandre.tumblr.com/" title="arianagrandre"><i class="fas fa-cloud-moon"></i></span></a></div>
  749.  
  750. <script>
  751. function gatherData(images, arr) {
  752. for (let i = 0; i < images.length; i++) {
  753. let currentData = {
  754. "width": images[i].getAttribute('data-width'),
  755. "height": images[i].getAttribute('data-height'),
  756. "low_res": images[i].getAttribute('data-lowres'),
  757. "high_res": images[i].getAttribute('data-highres')
  758. };
  759. arr.push(currentData);
  760. }
  761. }
  762. function getIndex(elem) {
  763. let i = 0;
  764. while( (elem = elem.previousElementSibling) != null ) i++;
  765. return i;
  766. }
  767. function lightbox(elem) {
  768. let currentPhotoset = elem.parentNode;
  769. let photosetPhotos = currentPhotoset.getElementsByTagName('div');
  770. let data = [];
  771. gatherData(photosetPhotos, data);
  772. Tumblr.Lightbox.init(data, getIndex(elem) + 1);
  773. }
  774. </script>
  775.  
  776.  
  777. </body></html>
Add Comment
Please, Sign In to add comment