Advertisement
Laighlin

#2: Tabula Rasa

Oct 25th, 2018
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 4.12 KB | None | 0 0
  1. <!DOCTYPE xhtml>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <meta name="viewport" content="width=device-width">
  6. <link href="https://fonts.googleapis.com/css?family=Raleway:900|Muli:400,400i,700,700i" rel="stylesheet">
  7. <link rel="icon" href="{Favicon}">
  8. <title>Page #2: Tabula Rasa</title>
  9.  
  10. <style type="text/css">
  11.  
  12. :root {
  13.     /* All colors can be changed right here! The variables are named after their properties, what you see is what you get. You can use hex codes, rgb/rgba, or hsl */
  14.     --bg-top:#2d1920;
  15.     --bg-bottom:#092121;
  16.     --title:#51b5ac;
  17.     --text-bg:rgba(255,255,255,0);
  18.     --text:#eee;
  19.     --text-accent:#ffa435;
  20.     --border:#ea598e;
  21.     --desc-border:#297a73;
  22. }
  23.  
  24. a { transition:.2s all ease; }
  25.  
  26. body, html {
  27.     padding:0;
  28.     margin:0;
  29.     position:absolute;
  30. }
  31.  
  32. body {
  33.     /*Fallback*/
  34.     background-color:var(--bg-top);
  35.     background-image:linear-gradient(to bottom right, var(--bg-top), var(--bg-bottom));
  36.     background-attachment:fixed;
  37.     font-family:'Muli', sans-serif;
  38.     color:var(--text);
  39.     width:100vw;
  40.     height:100vh;
  41.     font-size:.9em;
  42. }
  43.  
  44. ::selection {
  45.     background:var(--text-accent);
  46.     color:var(--bg-bottom);
  47. }
  48.  
  49. ::-moz-selection {
  50.     background:var(--text-accent);
  51.     color:var(--bg-bottom);
  52. }
  53.  
  54. a {
  55.     color:var(--text-accent);
  56.     text-decoration:none;
  57. }
  58.  
  59. a:hover {
  60.     color:var(--text);
  61. }
  62.  
  63. #title {
  64.     color:var(--title);
  65.     font-family:'Raleway', sans-serif;
  66.     font-weight:bold;
  67.     letter-spacing:1px;
  68.     line-height:1em;
  69.     text-transform:uppercase;
  70.     margin:0 0 20px;
  71.     box-sizing:border-box;
  72.     text-align:right;
  73. }
  74.  
  75. .linx, #description {
  76.     background:var(--text-bg);
  77.     padding:10px;
  78.     margin:0;
  79.     margin-bottom:10px;
  80.     border-radius:calc(.5em + 10px);
  81.     box-sizing:border-box;
  82.     border:1px solid var(--border);
  83. }
  84.  
  85. main {
  86.     position:relative;
  87.     margin:30px;
  88.     /*Ensures the content doesn't expand indefinitely. Can you imagine lol*/
  89.     max-width:500px;
  90. }
  91.  
  92. /*Centers the content on wide screens*/
  93. @media all and (min-width:560px) {
  94.     main {
  95.         margin:auto;
  96.         top:45%;
  97.         transform:translateY(-50%);
  98.         transform-style:preserve-3d;
  99.     }
  100. }
  101.  
  102. .link-wrap.second {
  103.     justify-content:initial;
  104. }
  105.  
  106. .link-wrap {
  107.     position:relative;
  108.     margin:0 -5px;
  109.     /*This is where the magic happens!*/
  110.     display:flex;
  111.     /*Ensures the elements display in a row and then wrap around to the next line if they run out of space*/
  112.     flex-flow:row wrap;
  113. }
  114.  
  115. .linx {
  116.     margin:0 5px;
  117.     text-transform:uppercase;
  118.     font-weight:bold;
  119.     margin-bottom:10px;
  120.     line-height:1em;
  121. }
  122.  
  123. .big.linx {
  124.     /*Ensures the links conform to certain sizes even if theyre flexy. The min-max constraints let them expand if they need to but otherwise stay put*/
  125.     min-width:calc(50% - 10px);
  126.     max-width:calc(100% - 10px);
  127.     flex-grow:5;
  128. }
  129.  
  130. #description {
  131.     margin:20px 0 30px;
  132.     padding:15px;
  133.     line-height:1.5em;
  134.     border-color:var(--desc-border);
  135. }
  136.  
  137. /*Causes the last navigation link in the top row to expand if there's leftover space*/
  138. .first .linx:last-of-type { flex-grow:9; }
  139.  
  140. </style>
  141. </head>
  142.  
  143. <body>
  144.  
  145. <main>
  146.  
  147. <h1 id="title">Page #2: Tabula Rasa</h1>
  148. <nav class="link-wrap first">
  149.     <a class="linx" href="/">Index</a>
  150.     <a class="linx" href="/ask">Ask</a>
  151.     <a class="linx" href="https://linthm.tumblr.com" title="Tabula Rasa &copy; Laighlin">Credit</a>
  152.     <a class="linx" href="https://tumblr.com/dashboard">Dash</a>
  153. </nav>
  154. <aside id="description">
  155.     You can put some custom text here if you'd like. Or delete this section entirely if you don't want it. Be my guest!
  156. </aside>
  157. <nav class="link-wrap second">
  158.     <a class="big linx" href="/">Link 1</a>
  159.     <a class="big linx" href="/">Link 2</a>
  160.     <a class="big linx" href="/">Link 3</a>
  161.     <a class="big linx" href="/">Link 4</a>
  162.     <a class="big linx" href="/">Link 5</a>
  163.     <a class="big linx" href="/">Link 6</a>
  164.     <a class="big linx" href="/">Link 7</a>
  165. </nav>
  166.    
  167. </main>
  168.  
  169. </body>
  170. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement