Advertisement
southcodes

artsbyannz: chapters

Mar 4th, 2025
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 14.65 KB | None | 0 0
  1. <!--
  2.  
  3.     book theme and pages coded by skye southcodes.tumblr.com for artsbyannz.tumblr.com
  4.    
  5.     - normalize css by https://github.com/necolas
  6.     - fonts:
  7.         google fonts
  8.         https://online-fonts.com/fonts/palatino-linotype
  9.         https://www.tunera.xyz/fonts/nyght-serif/
  10.     - dark mode https://mournstera.tumblr.com/post/724742111455592448/a-dark-mode-guide-with-css-variables-and-js-this by https://mournstera.tumblr.com/
  11.     - icons by https://phosphoricons.com/
  12.  
  13. -->
  14. <!DOCTYPE html>
  15. <html lang="en" data-theme="light">
  16. <head>
  17.     <title>{title}</title>
  18.  
  19.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  20.  
  21.     <script>
  22.         const storedTheme = localStorage.getItem("theme") || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
  23.         if (storedTheme) {
  24.             document.documentElement.setAttribute("data-theme", storedTheme);
  25.         }
  26.     </script>
  27.  
  28.     <link rel="shortcut icon" href="{favicon}">
  29.     <meta name="description" content="{MetaDescription}"/>
  30.  
  31.     <!-- normalize -->
  32.     <link href="https://necolas.github.io/normalize.css/7.0.0/normalize.css" rel="stylesheet">
  33.  
  34.     <!-- quicksand font -->
  35.     <link rel="preconnect" href="https://fonts.googleapis.com">
  36.     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  37.     <link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap" rel="stylesheet">
  38.  
  39. <style>
  40.     /* colors for light mode */
  41. :root, html[data-theme='light'] {
  42.     --text: #333;
  43.     --background:white;
  44.     --titles:  #b88f80;
  45.     --links: #b88f80;
  46.     --links-hover: #9b6b59;
  47.     --icons: #b88f80;
  48.     --accents: #d1a990;
  49.     --toggle-button-icon:rgb(218, 215, 215);
  50.     --toggle-button-background:rgb(51, 49, 49);
  51.     --light-on: block;
  52.     --light-off: none;
  53. }
  54.  
  55. /* colors for dark mode */
  56. :root, html[data-theme='dark'] {
  57.     --light-on: none;
  58.     --light-off: block;
  59.     --text: #b9b7b7;
  60.     --background:rgb(60, 60, 61);
  61.     --titles:  #b88f80;
  62.     --links: #b88f80;
  63.     --links-hover: #9b6b59;
  64.     --icons: #776660;
  65.     --accents: #795738;
  66.     --toggle-button-icon:rgb(218, 215, 215);
  67.     --toggle-button-background:rgb(51, 49, 49);
  68.     --light-on: none;
  69.     --light-off: block;
  70. }
  71.  
  72. .tmblr-iframe {margin:.7rem;opacity:.6;-ms-transform: scale(0.85);-webkit-transform: scale(0.85); /* Safari */transform: scale(0.85);}
  73. .tmblr-iframe:hover {opacity:.8;}
  74.  
  75. ::-webkit-scrollbar-thumb:vertical {border-left:2px solid var(--titles);}
  76. ::-webkit-scrollbar {width:6px}
  77. ::-webkit-scrollbar-track-piece{margin:5px 0;}
  78.  
  79. pre {font-family:consolas;
  80.   white-space: pre-wrap;       /* css-3 */
  81.   white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
  82.   white-space: -pre-wrap;      /* Opera 4- */
  83.   white-space: -o-pre-wrap;    /* Opera 7 */
  84.   word-wrap: break-word;}      /* Internet Explorer 5.5+ */
  85.  
  86. * {margin: 0;padding: 0; box-sizing: border-box;}
  87. body, figure{margin:0;padding:0}
  88. html{font: 14px 'Palatino', serif;}
  89. body {font-size:1.1rem;color: var(--text); background-color: var(--background);}
  90. p {margin:1rem 0}
  91. a {text-decoration: none;color:var(--links);word-break:break-word;}
  92. a:hover {color:var(--links-hover);}
  93. a:focus {outline: 0;}
  94. blockquote {margin:0;padding:0;}
  95. img {max-width:100%;height: auto;display: block;margin:0}
  96. hr {border:0;margin:0;}
  97. ol, ul, li {list-style-type:none;margin:0;padding:0;}
  98.  
  99. @font-face {
  100.     font-family: Palatino;
  101.     src: url(https://static.tumblr.com/p5i0ib5/Lr2spt320/palatinolinotype_roman.ttf);
  102. }
  103.   @font-face {
  104.     font-family: nygth-regular;
  105.     src: url(https://static.tumblr.com/p5i0ib5/i1sspt31d/nyghtserif-regular.ttf);
  106.     font-weight: 400;
  107. }
  108.   @font-face {
  109.     font-family: nygth-regular-italic;
  110.     src: url(https://static.tumblr.com/p5i0ib5/wGispt31j/nyghtserif-regularitalic.ttf);
  111.     font-weight: 400;
  112. }
  113.  
  114. /* dark mode */
  115.  
  116. html.theme-transition,
  117. html.theme-transition *,
  118. html.theme-transition *:before,
  119. html.theme-transition *:after {
  120. transition: 0s !important;
  121. transition-delay: 0 !important;
  122. }
  123.  
  124. button.theme-toggle {
  125.     position: fixed;
  126.     inset:1.5rem auto auto 2rem;
  127.     padding: .5rem;
  128.     border: 0;
  129.     border-radius: 100%;
  130.     outline: none;
  131.     cursor: pointer;
  132.     font-size: 25px;
  133.     color: var(--text);
  134.     background: var(--toggle-button-background);
  135. }
  136. .theme-toggle .ph{color: var(--toggle-button-icon)}
  137. .light-on {display: var(--light-on);}
  138. .light-off {display: var(--light-off);}
  139.  
  140. /* global navigation */
  141.  
  142. #global-navigation {
  143.     padding: 4.5rem 4rem 2.5rem;
  144.     text-align: center;
  145.     font-family: nygth-regular;
  146.     font-weight: 500;
  147.     font-size: 1.4rem;
  148.     letter-spacing: .08rem;
  149. }
  150.  
  151. #global-navigation ul li {
  152.     display: inline-block;
  153.     margin-right: 6rem;
  154.     text-transform: uppercase;
  155. }
  156.  
  157. #global-navigation ul li:last-of-type {margin-right: 0;}
  158.  
  159. /* updates tab */
  160.  
  161. #updates-button {
  162.     border: 0;
  163.     padding: 0;
  164.     font: inherit;
  165.     cursor:pointer;
  166.     letter-spacing: inherit;
  167.     text-transform: uppercase;
  168.     color: var(--links);
  169.     outline: none;
  170.     background-color: transparent;
  171. }
  172.  
  173. #updates-button:hover {color: var(--links-hover);}
  174.  
  175. #updates-tab {
  176.     display: none;
  177.     position: absolute;
  178.     inset: 5.2rem auto auto 50%;    
  179.     -ms-transform: translate(-50%, -50%);
  180.     transform: translateX(-50%);
  181.     width: 90vw;
  182.     max-width: 20rem;
  183.     padding: 1.5rem;
  184.     border: 2px solid var(--accents);
  185.     border-radius: 4px;
  186.     font: 400 1.1rem 'quicksand', serif;
  187.     text-transform: none;
  188.     line-height: 140%;
  189.     background-color: var(--background);
  190.     z-index: 9999!important;
  191. }
  192.  
  193. #updates-tab h4 {
  194.     margin-top: 1rem;
  195.     font: 500 1.7rem nygth-regular-italic;
  196.     letter-spacing: .1rem;
  197.     color:var(--titles);
  198. }
  199.  
  200. #updates-tab span {
  201.     padding: 0 .5rem;
  202.     box-shadow: inset 0 -7px var(--accents);
  203. }
  204.  
  205. #updates-tab hr {
  206.     width: .8rem;
  207.     height: .8rem;
  208.     margin: 2rem auto;
  209.     border: 0;
  210.     border-radius: 100%;
  211.     background-color: var(--accents);
  212. }
  213.  
  214. #updates-tab a {font-weight: 600;}
  215.  
  216. /*  content  */
  217.  
  218. #container {
  219.   width: 90vw;
  220.   max-width: 60rem;
  221.   margin: 16rem auto;
  222. }
  223.  
  224. /* header */
  225.  
  226. #container-header {
  227.     display: flex;
  228.     justify-content: space-between;
  229.     align-items: center;
  230.     margin-top: 5rem;
  231. }
  232.  
  233. #book-title,#choose-chapter, .chapter-number {
  234.     font-family: nygth-regular-italic;
  235.     font-weight: 400;
  236.     margin: 0;
  237. }
  238.  
  239. #book-title {
  240.     color: var(--titles);
  241.     font-size: 3rem;
  242.     margin:0 0 .5rem;
  243.     width: 95%;
  244.     letter-spacing: .05rem;
  245. }
  246.  
  247. #navigate-link {
  248.     font-family: 'quicksand', sans-serif;
  249.     text-transform: uppercase;
  250.     color: var(--text);
  251.     letter-spacing: .05rem;
  252. }
  253.  
  254. #choose-chapter {
  255.     text-align: center;
  256.     width: 13rem;
  257.     font-size: 2.1rem;
  258.     letter-spacing: 0.06rem;
  259.     letter-spacing: .08em;
  260.     color: var(--text);
  261.     flex-shrink: 0;
  262.     position: relative;
  263.     background-color: var(--background);
  264.     cursor: pointer;
  265. }
  266.  
  267. #chapter-navigation {
  268.     display: none;
  269.     position: absolute;
  270.     font:500 1.1rem 'quicksand', serif;
  271.     text-transform: uppercase;
  272.     text-align: center;
  273.     inset:4rem 0 auto ;
  274.     background-color: var(--background);
  275. }
  276.  
  277.  
  278. #chapter-navigation li{
  279.     margin-bottom: 1rem;
  280. }
  281.  
  282. /* book content */
  283.  
  284. main {
  285.     margin-top: 17rem;
  286. }
  287.  
  288. #book-content {
  289.     margin-top: 5rem;
  290.     line-height: 160%;
  291.     font-size: 1.6rem;
  292. }
  293.  
  294. .book-chapter {
  295. }
  296.  
  297. .chapter-divider {
  298.     margin:10rem auto;
  299.     border-top: 1px solid var(--links);
  300. }
  301.  
  302. .chapter-header {
  303.     text-align: center;
  304. }
  305.  
  306. .chapter-number {
  307.     font-size: 6rem;
  308.     letter-spacing: .3rem;
  309.     color: var(--titles);
  310. }
  311.  
  312. .chapter-title {
  313.     font-family: ;
  314.     font-weight: 400;
  315.     text-transform: uppercase;
  316.     font: 400 1.9rem nygth-regular;
  317.     letter-spacing: .5rem;
  318. }
  319.  
  320. /* MEDIA */
  321.  
  322. @media only screen and (min-width:0) and (max-width:586px) {
  323.  
  324.     main {
  325.         margin-top: 10rem;
  326.     }
  327.  
  328.     #container-header {
  329.         display: block;
  330.         text-align: center;
  331.     }
  332.  
  333.     #book-title {
  334.         text-align: center;
  335.         margin-right:auto ;
  336.         margin-left:auto ;
  337.     }
  338.  
  339.     #choose-chapter {
  340.         margin: 2rem auto 0;
  341.         display: block;
  342.        
  343.     }
  344.  
  345. }
  346.  
  347.  
  348. @media only screen and (min-width:0) and (max-width:1400px) {
  349.  
  350.     #global-navigation ul {
  351.       display: flex;
  352.       justify-content: space-evenly;
  353.       flex-wrap:wrap;
  354.       max-width: 75rem;
  355.       margin: 0 auto;
  356.       padding: 2.5rem 1.5rem 2.5rem;
  357.     }
  358.    
  359.     #global-navigation ul li {
  360.       margin: 0 1rem 1rem;
  361.     }
  362.    
  363.   }
  364.  
  365.  
  366.   @media only screen and (min-width:0) and (max-width:400px) {
  367.  
  368.     #global-navigation ul li {
  369.       display:block;
  370.       margin-right: 0;
  371.     }
  372.  
  373.   }
  374. </style>
  375.  
  376.    
  377. </head>
  378. <body  oncopy="return false" oncut="return false" onpaste="return false">
  379.    
  380. <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>
  381.  
  382.  
  383. <!-- global navigation -->
  384.  
  385. <nav id="global-navigation"><ul>
  386.     <li><a href="/">home</a></li>
  387.     <li><a href="/ask">inbox</a></li>
  388.     <li><a href="/archive">archive</a></li>
  389.     <li><a href="LINK URL">books</a></li>
  390.  
  391.     <!-- open updates tab  -->
  392.     <li style="position: relative;"><button id="updates-button">updates</button>
  393.  
  394.         <!-- updates tab content -->
  395.         <div id="updates-tab">
  396.  
  397.             <h4><span>RAIN ON FIRE</span></h4>
  398.  
  399.             <p>chapter 10 is updated. <a href="#">read the new chapter here.</a></p>
  400.  
  401.             <!-- updates divider -->
  402.             <hr>
  403.  
  404.             <h4><span>rain on fire</span></h4>
  405.  
  406.             <p>chapter 10 is updated. <a href="#">read the new chapter here.</a></p>
  407.  
  408.         </div>
  409.     </li>
  410. </ul></nav>
  411.  
  412. <section id="container">
  413.    
  414.     <!-- header -->
  415.  
  416.     <header id="container-header">
  417.    
  418.     <section id="header-titles">
  419.         <!-- book title -->
  420.         <h1 id="book-title">
  421.             Lorem ipsum dolor sit amet, consectetur adipiscing.
  422.         </h1>
  423.  
  424.         <!-- to novel info link -->
  425.         <a id="navigate-link" href="LINK URL">navigate to novel info</a>
  426.     </section>
  427.  
  428.     <!-- dropdown -->
  429.     <nav id="choose-chapter">
  430.         chapters:
  431.        
  432.         <ul id="chapter-navigation">
  433.             <li><a href="LINK URL">chapter 1</a></li>
  434.             <li><a href="LINK URL">chapter 2</a></li>
  435.             <li><a href="LINK URL">chapter 1</a></li>
  436.             <li><a href="LINK URL">chapter 2</a></li>
  437.             <li><a href="LINK URL">chapter 1</a></li>
  438.             <li><a href="LINK URL">chapter 2</a></li>
  439.             <li><a href="LINK URL">chapter 1</a></li>
  440.             <li><a href="LINK URL">chapter 2</a></li>
  441.             <li><a href="LINK URL">chapter 1</a></li>
  442.             <li><a href="LINK URL">chapter 2</a></li>
  443.             <li><a href="LINK URL">chapter 1</a></li>
  444.             <li><a href="LINK URL">chapter 2</a></li>
  445.             <li><a href="LINK URL">chapter 1</a></li>
  446.             <li><a href="LINK URL">chapter 2</a></li>
  447.             <li><a href="LINK URL">chapter 1</a></li>
  448.             <li><a href="LINK URL">chapter 2</a></li>
  449.             <li><a href="LINK URL">chapter 1</a></li>
  450.             <li><a href="LINK URL">chapter 2</a></li>
  451.             <li><a href="LINK URL">chapter 3</a></li>
  452.         </ul>
  453.     </nav>
  454.  
  455. </header>
  456.  
  457. <!-- main content -->
  458. <main>
  459.  
  460.     <!-- chapter start -->
  461.     <article class="book-chapter">
  462.  
  463.         <!-- chapter header -->
  464.         <header class="chapter-header">
  465.  
  466.             <h2 class="chapter-number">
  467.                 chapter one
  468.             </h2>
  469.  
  470.             <h3 class="chapter-title">
  471.                 chapter title
  472.             </h3>
  473.         </header>
  474.  
  475.         <!-- book content -->
  476.         <section id="book-content">
  477.             <p>paragraph</p>
  478.             <p>paragraph</p>
  479.             <p>paragraph</p>
  480.             <p>paragraph</p>
  481.             <p>paragraph</p>
  482.         </section>
  483.     </article>
  484.  
  485.     <!-- chapter divider -->
  486.     <hr class="chapter-divider">
  487.  
  488.    
  489.     <!-- chapter start -->
  490.     <article class="book-chapter">
  491.  
  492.         <!-- chapter header -->
  493.         <header class="chapter-header">
  494.  
  495.             <h2 class="chapter-number">
  496.                 chapter one
  497.             </h2>
  498.  
  499.             <h3 class="chapter-title">
  500.                 chapter title
  501.             </h3>
  502.         </header>
  503.  
  504.         <!-- book content -->
  505.         <section id="book-content">
  506.             <p>paragraph</p>
  507.             <p>paragraph</p>
  508.             <p>paragraph</p>
  509.             <p>paragraph</p>
  510.             <p>paragraph</p>
  511.         </section>
  512.     </article>
  513.  
  514. </main>
  515.  
  516. </section> <!-- container -->
  517.  
  518. <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>
  519.  
  520. <!-- jquery -->
  521. <script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
  522.  
  523. <!-- icon font -->
  524. <script src="https://unpkg.com/@phosphor-icons/web"></script>
  525.  
  526. <script>
  527.  
  528. // updates tab popup
  529. $("#updates-button").click(function(){
  530.     $("#updates-tab").fadeToggle();
  531. });
  532.  
  533. // dropdown
  534. $(document).ready(function(){
  535.     $('#choose-chapter').click(function() {
  536.         $('#chapter-navigation').slideToggle(600);
  537.         return false;
  538.     });
  539. });
  540.  
  541. // disable right click
  542. document.addEventListener('contextmenu', event => {
  543.     event.preventDefault();
  544. });
  545.  
  546. // dark mode
  547.     const themeToggleButtons = document.querySelectorAll(".theme-toggle");
  548.    
  549.     themeToggleButtons.forEach((btn) => {
  550.         btn.addEventListener("click", function () {
  551.    
  552.             // Add theme-transition class for smooth transitions
  553.             document.documentElement.classList.add("theme-transition");
  554.    
  555.             // Retrieve the current theme and determine the target theme
  556.             let currentTheme = document.documentElement.getAttribute("data-theme");
  557.             let targetTheme = (currentTheme === "light") ? "dark" : "light";
  558.    
  559.             // Remove theme-transition class after a short delay
  560.             window.setTimeout(function () {
  561.                 document.documentElement.classList.remove("theme-transition");
  562.             }, 50);
  563.    
  564.             // Set the data-theme attribute and store in local storage
  565.             document.documentElement.setAttribute("data-theme", targetTheme);
  566.             localStorage.setItem("theme", targetTheme);
  567.         });
  568.     });
  569.     </script>
  570. </body>
  571. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement