Advertisement
southcodes

artsbyannz: wip with the link

Mar 4th, 2025
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 20.66 KB | None | 0 0
  1. <!--
  2.  
  3. hide read chapter here with {select:O}
  4. add disable right click
  5.    
  6. book theme commission for artsbyannz by skye southcodes.tumblr.com
  7.    
  8.     - normalize css by https://github.com/necolas
  9.     - fonts:
  10.         google fonts
  11.         https://www.tunera.xyz/fonts/nyght-serif/
  12.     -isotope filters by https://isotope.metafizzy.co/
  13.  
  14. -->
  15.  
  16. <!DOCTYPE html>
  17. <html lang="en" data-theme="light">
  18. <head>
  19.     <title>{title}</title>
  20.    
  21.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  22.  
  23.     <script>
  24.     const storedTheme = localStorage.getItem("theme") || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
  25.     if (storedTheme) {
  26.         document.documentElement.setAttribute("data-theme", storedTheme);
  27.     }
  28.     </script>
  29.  
  30.     <link rel="shortcut icon" href="{favicon}">
  31.     <meta name="description" content="{MetaDescription}"/>
  32.  
  33.     <link rel="preconnect" href="https://fonts.googleapis.com">
  34.     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  35.     <link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap" rel="stylesheet">
  36.  
  37.     <!-- normalize -->
  38.     <link href="https://necolas.github.io/normalize.css/7.0.0/normalize.css" rel="stylesheet">
  39.    
  40.     <!-- cappuccicons icons -->
  41.     <link href="https://icons.cappuccicons.com/cpf.css" rel="stylesheet">
  42.     <script src="http://pull.cappuccicons.com/cpf.js"></script>
  43.    
  44. <style>
  45.     /* colors for light mode */
  46. :root, html[data-theme='light'] {
  47.     --text: #333;
  48.     --background:white;
  49.     --titles:  #b88f80;
  50.     --links: #b88f80;
  51.     --links-hover: #9b6b59;
  52.     --icons: #b88f80;
  53.     --accents: #d1a990;
  54.     --alternating-background:#d3aa88;
  55.     --alternating-text:#f7f2ea;
  56.     --alternating-text-title:#806132;
  57.     --alternating-accents: #97613f;
  58.     --alternating-link: #8a6631;
  59.     --toggle-button-icon:rgb(218, 215, 215);
  60.     --toggle-button-background:rgb(51, 49, 49);
  61.     --light-on: block;
  62.     --light-off: none;
  63. }
  64.  
  65. /* colors for dark mode */
  66. :root, html[data-theme='dark'] {
  67.     --light-on: none;
  68.     --light-off: block;
  69.     --text: #b9b7b7;
  70.     --background:rgb(60, 60, 61);
  71.     --titles:  #b88f80;
  72.     --links: #b88f80;
  73.     --links-hover: #9b6b59;
  74.     --icons: #776660;
  75.     --accents: #795738;
  76.     --alternating-background:#917660;
  77.     --alternating-text:#d1d0ce;
  78.     --alternating-text-title:#523e21;
  79.     --alternating-accents: #915d3d;
  80.     --alternating-link: #5e431a;
  81.     --toggle-button-icon:rgb(218, 215, 215);
  82.     --toggle-button-background:rgb(51, 49, 49);
  83.     --light-on: none;
  84.     --light-off: block;
  85. }
  86.  
  87. .tmblr-iframe {margin:.7rem;opacity:.6;-ms-transform: scale(0.85);-webkit-transform: scale(0.85); /* Safari */transform: scale(0.85);}
  88. .tmblr-iframe:hover {opacity:.8;}
  89.  
  90. ::-webkit-scrollbar-thumb:vertical {border-left:2px solid var(--borders);}
  91. ::-webkit-scrollbar {width:6px}
  92. ::-webkit-scrollbar-track-piece{margin:5px 0;}
  93.  
  94. pre {font-family:consolas;
  95.   white-space: pre-wrap;       /* css-3 */
  96.   white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
  97.   white-space: -pre-wrap;      /* Opera 4- */
  98.   white-space: -o-pre-wrap;    /* Opera 7 */
  99.   word-wrap: break-word;}      /* Internet Explorer 5.5+ */
  100.  
  101. * {margin: 0;padding: 0; box-sizing: border-box;}
  102. p {margin:1rem 0}
  103. body, figure{margin:0;padding:0}
  104. html{font: 14px 'quicksand', sans-serif;}
  105. body {font-size:17px;color:var(--text);background:var(--background);font-family: 'quicksand', serif;line-height: 170%;}
  106. a {text-decoration: none;color:var(--links);word-break:break-word;}
  107. a:hover {color:var(--links-hover);}
  108. blockquote {margin:0;padding:0;}
  109. img {max-width:100%;height: auto;display: block;margin:0}
  110. hr {border:0;border-top:1px solid var(--borders);margin:0;}
  111. ol,ul,li {list-style-type: none;padding: 0;margin: 0;}
  112.  
  113. @font-face {
  114.   font-family: nygth-regular;
  115.   src: url(https://static.tumblr.com/p5i0ib5/i1sspt31d/nyghtserif-regular.ttf);
  116. }
  117.  
  118. @font-face {
  119.   font-family: nygth-regular-italic;
  120.   src: url(https://static.tumblr.com/p5i0ib5/wGispt31j/nyghtserif-regularitalic.ttf);
  121. }
  122.  
  123. /* dark mode */
  124.  
  125. html.theme-transition,
  126. html.theme-transition *,
  127. html.theme-transition *:before,
  128. html.theme-transition *:after {
  129. transition: 0s !important;
  130. transition-delay: 0 !important;
  131. }
  132.  
  133. button.theme-toggle {
  134.     position: fixed;
  135.     inset:1.5rem auto auto 2rem;
  136.     padding: .5rem;
  137.     border: 0;
  138.     border-radius: 100%;
  139.     outline: none;
  140.     cursor: pointer;
  141.     font-size: 25px;
  142.     color: var(--text);
  143.     background: var(--toggle-button-background);
  144. }
  145. .theme-toggle .ph{color: var(--toggle-button-icon)}
  146. .light-on {display: var(--light-on);}
  147. .light-off {display: var(--light-off);}
  148.  
  149. .cp-stars {
  150.     color: var(--icons);
  151.     margin-right: 2rem;
  152. }
  153.  
  154. /* global navigation */
  155.  
  156. #global-navigation {
  157.     padding: 4.5rem 4rem 2.5rem;
  158.     text-align: center;
  159.     font-family: nygth-regular;
  160.     font-weight: 500;
  161.     font-size: 1.4rem;
  162.     letter-spacing: .08rem;
  163. }
  164.  
  165. #global-navigation ul li {
  166.     display: inline-block;
  167.     margin-right: 6rem;
  168.     text-transform: uppercase;
  169. }
  170.  
  171. #global-navigation ul li:last-of-type {margin-right: 0;}
  172.  
  173. /* updates tab */
  174.  
  175. #updates-button {
  176.     border: 0;
  177.     padding: 0;
  178.     font: inherit;
  179.     cursor:pointer;
  180.     letter-spacing: inherit;
  181.     text-transform: uppercase;
  182.     color: var(--links);
  183.     outline: none;
  184.     background-color: transparent;
  185. }
  186.  
  187. #updates-button:hover {color: var(--links-hover);}
  188.  
  189. #updates-tab {
  190.     display: none;
  191.     position: absolute;
  192.     inset: 5.2rem auto auto 50%;    
  193.     -ms-transform: translate(-50%, -50%);
  194.     transform: translateX(-50%);
  195.     width: 90vw;
  196.     max-width: 20rem;
  197.     padding: 1.5rem;
  198.     border: 2px solid var(--accents);
  199.     border-radius: 4px;
  200.     font: 400 1.1rem 'quicksand', serif;
  201.     text-transform: none;
  202.     line-height: 140%;
  203.     background-color: var(--background);
  204. }
  205.  
  206. #updates-tab h4 {
  207.     margin-top: 1rem;
  208.     font: 500 1.7rem nygth-regular-italic;
  209.     letter-spacing: .1rem;
  210.     color:var(--titles);
  211. }
  212.  
  213. #updates-tab span {
  214.     padding: 0 .5rem;
  215.     box-shadow: inset 0 -7px var(--accents);
  216. }
  217.  
  218. #updates-tab hr {
  219.     width: .8rem;
  220.     height: .8rem;
  221.     margin: 2rem auto;
  222.     border: 0;
  223.     border-radius: 100%;
  224.     background-color: var(--accents);
  225. }
  226.  
  227. #updates-tab a {font-weight: 600;}
  228.  
  229. /* container */
  230.  
  231. #container {
  232.   width: 90vw;
  233.   max-width: 70rem;
  234.   margin: 16rem auto;
  235.   display: flex;
  236.   justify-content: space-between;
  237.   flex-flow: wrap;
  238. }
  239.  
  240. #read-link {
  241.     font-weight: 400;
  242.     font-family: 'quicksand', serif;
  243. }
  244.  
  245. .chapter-span{
  246.     margin-left: 1rem;
  247. }
  248.  
  249. .read-span,.chapter-span{
  250.     box-shadow: inset 0 -8px var(--accents);
  251.     padding: 0 .4rem ;
  252.     font-weight: 500;
  253. }
  254.  
  255. #read-link a {
  256.     margin-top: 1rem;
  257.     display: block;
  258. }
  259.  
  260. #misc,#characters {
  261.     width: 100%;
  262.     flex-shrink: 0;
  263. }
  264.  
  265. /* page title */
  266. h1 {
  267.   font-family: nygth-regular-italic;
  268.   font-size: 6rem;
  269.   color: var(--titles);
  270.   font-weight: 400;
  271.   line-height: 100%;
  272. }
  273.  
  274. header {
  275.     width: 100%;
  276.     display: flex;
  277.     margin-bottom: 12rem;
  278.     justify-content: space-between;
  279. }
  280.  
  281. header section {width: 47%;}
  282.  
  283. /* header image */
  284.  
  285. figure.book-image {
  286.     width:47%;}
  287. img.book-image {
  288.     width: 100%;
  289. }
  290.  
  291. /* page summary */
  292. #summary {margin-top: 6rem;}
  293.  
  294. #left,#right {width: 45%;}
  295.  
  296. .page-box {
  297.     width: 100%;
  298.     margin-bottom: 10rem;
  299.     font-family: 'quicksand', serif;
  300. }
  301.  
  302. /* titles */
  303.  
  304. .box-title {
  305.     margin-bottom: 2.5rem;
  306.     font-family: nygth-regular;
  307.     font-size: 1.8rem;
  308.     font-weight: 400;
  309.     line-height: 200%;
  310. }
  311.  
  312. .box-title .box-title-span {font-size: 2.5rem;}
  313.  
  314. .page-box ul li span {
  315.     margin-right: 1rem;
  316.     padding: 0 .3rem;
  317.     border-bottom: 2px solid var(--accents);
  318.     font-weight: 600;
  319.     letter-spacing: .02rem;
  320. }
  321.  
  322. .page-box li {margin-bottom: 1rem;}
  323.  
  324. /* navigation */
  325.  
  326. #navigation {font-size: 1.1rem;}
  327.  
  328. #navigation li {
  329.     margin: 0 2rem 2rem 0;
  330.     display: inline-block;
  331. }
  332.  
  333. #navigation li a{
  334.     padding:.5rem .7rem;
  335.     background-color:  var(--accents);
  336.     color: var(--text);
  337. }
  338.  
  339. /* progress bars */
  340.  
  341. .progress-bar-wrapper {
  342.     display: flex;
  343.     justify-content: space-between;
  344.     align-items: center;
  345. }
  346.  
  347. .progress-bar-wrapper h4 {
  348.     margin-right: 2rem;
  349.     flex-shrink: 0;
  350.     max-width: 35%;
  351.     font-size: 1.4rem;
  352.     letter-spacing: .04rem;
  353.     font-weight: 500;
  354. }
  355.  
  356. .progress-bar {
  357.     width: 100%;
  358.     height: 5px;
  359.     border-radius: 4px;
  360.     position: relative;
  361.     border-radius: 4px;
  362. }
  363.  
  364. .progress-bar-filling {
  365.     position: absolute;
  366.     inset: 0;
  367.     background:var(--accents);
  368.     border-radius: 4px;
  369. }
  370.  
  371. /* characters */
  372.  
  373. #characters {
  374.     display: flex;
  375.     justify-content: space-between;
  376.     flex-flow: wrap;
  377.     max-width: 65rem;
  378.     margin: 5rem auto;
  379. }
  380.  
  381. .character {
  382.     width: 47%;
  383.     margin-bottom: 7rem;
  384. }
  385.  
  386. figcaption h4{
  387.     margin-top: 1rem;
  388.     font-size: 1.7rem;
  389.     font-weight: 400;
  390.     text-align: center;
  391. }
  392.  
  393. figcaption h4 span{box-shadow: inset 0 -8px var(--accents);}
  394.  
  395. #misc {margin-bottom: 0;}
  396.  
  397. #spotify-player {
  398.     margin-top: 15rem;
  399. }
  400.  
  401. /* MEDIA */
  402.  
  403. @media only screen and (min-width:0) and (max-width:450px) {
  404.  
  405.     #characters {
  406.         display: block;
  407.         width: 100%;
  408.     }
  409. }
  410.  
  411. @media only screen and (min-width:0) and (max-width:850px) {
  412.        
  413.     header {display: block;}
  414.  
  415.     figure.book-image {width:100%;}
  416.  
  417.     header section {width: 100%;}
  418.    
  419.     #left,#right {width: 100%;}
  420.  
  421.     .character {width: 100%;}
  422.    
  423.     #book-title {margin:5rem 0}
  424. }
  425.  
  426. @media only screen and (min-width:0) and (max-width:1400px) {
  427.  
  428.     #global-navigation ul {
  429.       display: flex;
  430.       justify-content: space-evenly;
  431.       flex-wrap:wrap;
  432.       max-width: 75rem;
  433.       margin: 0 auto;
  434.       padding: 2.5rem 1.5rem 2.5rem;
  435.     }
  436.    
  437.     #global-navigation ul li {
  438.       margin: 0 1rem 1rem;
  439.     }
  440.    
  441.   }
  442.  
  443.   @media only screen and (min-width:0) and (max-width:400px) {
  444.  
  445.     #global-navigation ul li {
  446.       display:block;
  447.       margin-right: 0;
  448.     }
  449.  
  450.   }
  451. </style>
  452. </head>
  453. <body>
  454.  
  455. <button class="theme-toggle" aria-label="toggle dark or light mode" type="button"><i class="ph ph-moon light-on" title="toggle dark mode"></i><i class="ph ph-sun light-off" title="toggle light mode"></i></button>
  456.  
  457. <!-- global navigation -->
  458.  
  459. <nav id="global-navigation"><ul>
  460.     <li><a href="/">home</a></li>
  461.     <li><a href="/ask">inbox</a></li>
  462.     <li><a href="/archive">archive</a></li>
  463.     <li><a href="LINK URL">books</a></li>
  464.  
  465.     <!-- open updates tab  -->
  466.     <li style="position: relative;"><button id="updates-button">updates</button>
  467.  
  468.         <!-- updates tab content -->
  469.         <div id="updates-tab">
  470.  
  471.             <h4><span>RAIN ON FIRE</span></h4>
  472.  
  473.             <p>chapter 10 is updated. <a href="#">read the new chapter here.</a></p>
  474.  
  475.             <!-- updates divider -->
  476.             <hr>
  477.  
  478.             <h4><span>rain on fire</span></h4>
  479.  
  480.             <p>chapter 10 is updated. <a href="#">read the new chapter here.</a></p>
  481.  
  482.         </div>
  483.     </li>
  484. </ul></nav>
  485.  
  486. <main id="container">
  487.  
  488.     <header>
  489.  
  490.         <!-- book image -->
  491.         <figure class="book-image"><img src="https://mail.google.com/mail/u/0?ui=2&ik=b5020bf892&attid=0.13&permmsgid=msg-f:1821410995498506444&th=1946f3a670add8cc&view=fimg&fur=ip&permmsgid=msg-f:1821410995498506444&sz=s0-l75-ft&attbid=ANGjdJ-E7ae0AJkP3eCXPZ1Ov2CTfgF8g0sVaawWi7H6d8VXoDRS_vxVs92ldP4V0LJzsAUu1ICpccb6R8_7dwJ9wwRoqGNApihWuZFwEfKmD_85f5lDd7EJ6Xe0Gi0&disp=emb&realattid=3056BC86-BA37-4F19-8135-0935FB242C24&zw" alt="" class="book-image"></figure>
  492.  
  493.         <section>
  494.             <!-- book title -->
  495.             <h1 id="book-title">book title</h1>
  496.  
  497.             <!-- read update link -->
  498.             <h2 id="read-link">
  499.                 new update: <span class="chapter-span">chapter one</span>
  500.                 <a href=""><span class="read-span">read here</span></a>
  501.             </h2>
  502.        
  503.             <!-- book summary -->
  504.             <article id="summary" class="page-box">
  505.                 <p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Ducimus sint doloremque accusamus vero adipisci ex quae voluptatibus tenetur ut id modi ratione, distinctio quis veniam molestias eum animi inventore provident.</p>
  506.                 <p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Ducimus sint doloremque accusamus vero adipisci ex quae voluptatibus tenetur ut id modi ratione, distinctio quis veniam molestias eum animi inventore provident.</p>
  507.             </article>
  508.         </section>
  509.        
  510.     </header>
  511.  
  512.     <section id="left">
  513.  
  514.         <!-- tags and ratings -->
  515.         <section id="tags-ratings">
  516.            
  517.             <!-- details start -->
  518.             <article class="page-box" class="tags-and-tropes">
  519.                 <h3 class="box-title"><span class="box-title-span"><i class="cp cp-stars"></i>
  520.                    
  521.                     details
  522.                
  523.                 </span></h3>
  524.  
  525.                 <ul>
  526.                     <li><span>genre</span> genre</li>
  527.                     <li><span>tropes</span> tropes</li>
  528.                     <li><span>trigger warnings</span> trigger warnings</li>
  529.                 </ul>    
  530.             </article>
  531.             <!-- details end-->
  532.  
  533.             <!-- ratings start -->
  534.             <article class="page-box">
  535.  
  536.                 <h3 class="box-title"><span class="box-title-span"><i class="cp cp-stars"></i>
  537.                
  538.                     ratings
  539.                
  540.                 </span></h3>
  541.  
  542.                 <!-- progress bar start -->
  543.                 <li class="progress-bar-wrapper"><h4>title</h4>
  544.                    
  545.                     <div class="progress-bar">
  546.                    
  547.                         <!-- change number to fill the bar -->
  548.                     <div class="progress-bar-filling" style="width:50%"></div>
  549.                </div></li>
  550.                <!-- progress bar end -->
  551.  
  552.                 <!-- progress bar start -->
  553.                 <li class="progress-bar-wrapper"><h4>title</h4>
  554.                    
  555.                     <div class="progress-bar">
  556.                    
  557.                         <!-- change number to fill the bar -->
  558.                     <div class="progress-bar-filling" style="width:50%"></div>
  559.                </div></li>
  560.                <!-- progress bar end -->
  561.  
  562.                 <!-- progress bar start -->
  563.                 <li class="progress-bar-wrapper"><h4>title</h4>
  564.                    
  565.                     <div class="progress-bar">
  566.                    
  567.                         <!-- change number to fill the bar -->
  568.                     <div class="progress-bar-filling" style="width:100%"></div>
  569.                </div></li>
  570.                <!-- progress bar end -->
  571.                
  572.             </article>
  573.         </section>
  574.         <!-- tags-ratings column end -->
  575.  
  576.     </section>
  577.  
  578.  
  579.     <section id="right">
  580.  
  581.  
  582.         <!-- tags and tropes start -->
  583.         <article class="page-box" class="tags-and-tropes">
  584.             <h3 class="box-title"><span class="box-title-span"><i class="cp cp-stars"></i>
  585.                 tags and tropes
  586.             </span></h3>
  587.  
  588.             <ul>
  589.                 <li><span>genre</span> genre</li>
  590.                 <li><span>tropes</span> tropes</li>
  591.                 <li><span>trigger warnings</span> trigger warnings</li>
  592.             </ul>    
  593.         </article>
  594.         <!-- tags and tropes end -->
  595.  
  596.         <!-- navigation -->
  597.         <article id="navigation" class="page-box">
  598.             <h3 class="box-title"><span class="box-title-span">
  599.                
  600.                 <i class="cp cp-stars"></i>navigation</span></h3>
  601.             <ul>
  602.                 <li><a href="">link</a></li>
  603.                 <li><a href="">link lorem</a></li>
  604.                 <li><a href="">link</a></li>
  605.                 <li><a href="">link</a></li>
  606.             </ul>
  607.         </article>
  608.  
  609.  
  610.  
  611.     </section>
  612.     <!-- right end -->
  613.  
  614.     <!-- characters start -->
  615.     <article id="characters" class="page-box">
  616.  
  617.         <!-- character image -->
  618.         <figure class="character"><img src="https://images.unsplash.com/photo-1610050062210-afc2df76cb55?q=80&w=1470&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="" class="character-image">
  619.            
  620.             <figcaption><h4><span>character name</span></h4></figcaption>
  621.         </figure>
  622.        
  623.         <!-- character image -->
  624.         <figure class="character"><img src="https://images.unsplash.com/photo-1610050062210-afc2df76cb55?q=80&w=1470&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="" class="character-image">
  625.            
  626.             <figcaption><h4><span>character name</span></h4></figcaption>
  627.         </figure>
  628.        
  629.         <!-- character image -->
  630.         <figure class="character"><img src="https://images.unsplash.com/photo-1610050062210-afc2df76cb55?q=80&w=1470&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="" class="character-image">
  631.            
  632.             <figcaption><h4><span>character name</span></h4></figcaption>
  633.         </figure>
  634.        
  635.     </article>
  636.     <!-- characters end -->
  637.  
  638.     <!-- misc content -->
  639.     <article id="misc" class="page-box">
  640.         <h3 class="box-title"><span class="box-title-span">
  641.            
  642.         <i class="cp cp-stars"></i>
  643.        
  644.             misc
  645.        
  646.         </span></h3>
  647.         <ul>
  648.            
  649.         <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Nostrum similique veniam accusantium minus, corrupti eveniet consequuntur! Laboriosam, placeat omnis? Sequi impedit temporibus vel, officiis explicabo excepturi. Eius velit rem distinctio.</p>
  650.         <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Nostrum similique veniam accusantium minus, corrupti eveniet consequuntur! Laboriosam, placeat omnis? Sequi impedit temporibus vel, officiis explicabo excepturi. Eius velit rem distinctio.</p>
  651.     </article>
  652.  
  653.      <!-- spotify iframe -->
  654. <iframe id="spotify-player" style="border-radius:12px" src="https://open.spotify.com/embed/track/3JoNcUUiRmDHMXmvNilMu4?utm_source=generator" width="100%" height="352" frameBorder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>
  655.      
  656. </main>
  657.      
  658. <!-- do not touch -->
  659. <div style="position:fixed;bottom:2rem;right:2rem;z-index:999999999999999999999!important;font-size:.7rem;letter-spacing:.03rem;"><a href="https://southcodes.tumblr.com" title="coded by southcodes" target="_blank">SC</a></div>
  660.  
  661. <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js'></script>
  662.  
  663. <!-- icons font -->
  664. <script src="https://unpkg.com/@phosphor-icons/web"></script>
  665.  
  666. <!-- isotope filters -->
  667. <script src='https://npmcdn.com/isotope-layout@3/dist/isotope.pkgd.js'></script>
  668.  
  669. <script>
  670.  
  671. $(window).load(function(){
  672.     var $container = $('#main-wrapper');
  673.     $container.isotope({
  674.         filter: '*',
  675.         animationOptions: {
  676.             duration: 750,
  677.             easing: 'linear',
  678.             queue: false
  679.         }
  680.     });
  681.  
  682.     $('#header a').click(function(){
  683.         $('#header .current').removeClass('current');
  684.         $(this).addClass('current');
  685.  
  686.         var selector = $(this).attr('data-filter');
  687.         $container.isotope({
  688.             filter: selector,
  689.             animationOptions: {
  690.                 duration: 750,
  691.                 easing: 'linear',
  692.                 queue: false
  693.             }
  694.          });
  695.          return false;
  696.     });
  697. });
  698.  
  699. // updates tab popup
  700. $("#updates-button").click(function(){
  701.     $("#updates-tab").fadeToggle();
  702. });
  703.  
  704. </script>
  705.  
  706. <script>
  707.  
  708. const themeToggleButtons = document.querySelectorAll(".theme-toggle");
  709.  
  710. themeToggleButtons.forEach((btn) => {
  711.     btn.addEventListener("click", function () {
  712.  
  713.         // Add theme-transition class for smooth transitions
  714.         document.documentElement.classList.add("theme-transition");
  715.  
  716.         // Retrieve the current theme and determine the target theme
  717.         let currentTheme = document.documentElement.getAttribute("data-theme");
  718.         let targetTheme = (currentTheme === "light") ? "dark" : "light";
  719.  
  720.         // Remove theme-transition class after a short delay
  721.         window.setTimeout(function () {
  722.             document.documentElement.classList.remove("theme-transition");
  723.         }, 50);
  724.  
  725.         // Set the data-theme attribute and store in local storage
  726.         document.documentElement.setAttribute("data-theme", targetTheme);
  727.         localStorage.setItem("theme", targetTheme);
  728.     });
  729. });
  730. </script>
  731. </body>
  732. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement