]> jfr.im git - irc/freenode/web-7.0.git/blobdiff - static/css/style.css
2021-06-05: update people
[irc/freenode/web-7.0.git] / static / css / style.css
index c0d22215444efc0fd73fee407b424092744ef681..da8c733accc16926410825da7f8a27d012debe39 100644 (file)
     --jumbotron-text-color: var(--c-light);
     --art-date-color:       color(var(--c-dark) tint(50%));
 
+    /* background colors */
+    --background-color: var(--c-light);
+
     /* box colors */
-    --border-color:    var(--c-dark);
-    --box-color:       var(--c-bg-light);
-    --box-hover-color: var(--c-dark);;
-    --box-round:       10px;
+    --border-color:        var(--c-dark);
+    --box-color:           var(--c-bg-light);
+    --box-hover-color:     var(--c-dark);
+    --box-round:           10px;
+    --navbar-border-color: var(--border-color);
+    --footer-shadow-color: rgba(150,150,150,.36);
 
     /* other */
     --max-width:     600px;
     --max-width-box: 800px;
     --margin-box-fa: 5px;
 }
+
+@media (prefers-color-scheme: dark) {
+    :root {
+        --text-color:        var(--c-light);
+        --background-color:  var(--c-dark);
+        --link-color:        #00c8e8;
+        --link-hover-color:  #21a9c1;
+        --c-shadow:          var(--c-bg-light);
+        --border-color:      #000000;
+        --navbar-border-color: var(--c-dark);
+        --footer-shadow-color: rgba(70, 70, 70, 0.5);
+    }
+}
+
 @custom-media --max-sm all and (max-width: 600px);
 @custom-media --max-md all and (max-width: 800px);
 @custom-media --max-rem all and (max-width: 60rem);
+@custom-media --sm-md (max-width: 850px) and (min-width: 600px);
 
 /* reset css for browser compat */
 * {
@@ -54,6 +74,7 @@ body {
     font-feature-settings: "lnum";
     font-variant-numeric: lining-nums;
     color: var(--text-color);
+    background-color: var(--background-color);
     font-size: 14px;
     min-height: 100vh;
     height: auto;
@@ -71,6 +92,7 @@ a {
 a:hover {
     color: var(--link-hover-color);
 }
+
 img {
     max-width: 100%;
 }
@@ -90,7 +112,7 @@ img {
     flex-wrap: nowrap;
     justify-content: space-between;
     align-items: center;
-    border-bottom: 1px solid var(--border-color);
+    border-bottom: 1px solid var(--navbar-border-color);
     z-index: 100;
     padding-right: 5px;
 }
@@ -106,8 +128,10 @@ img {
     height: 40px;
 }
 
+/* nav = navbar
+ * pia = Private Internet access
+ */
 #nav-logo { order: 10; }
-#nav-pia  { order: 30; }
 
 #nav-jump { order: 1000; }
 
@@ -139,10 +163,6 @@ img {
         margin: 0 .5em;
     }
 
-    #nav-pia {
-        margin-left: auto;
-    }
-
     #nav-label {
         width: auto;
         margin: 0 .5em;
@@ -187,10 +207,10 @@ img {
     }
 }
 
-.nlogo {
-    height: 40px;
-}
+/* n = nav */
+.nlogo { height: 40px; }
 
+/* t = text (used in jumbotron for small logo as text) */
 .tlogo {
     height: 2.4ex;
     margin-bottom: -.47ex;
@@ -198,6 +218,11 @@ img {
     margin-right: -10px;
 }
 
+@media (--max-md) {
+    margin-left: -5px;
+    margin-right: -5px;
+}
+
 /* main */
 .container {
     width: 100%;
@@ -240,6 +265,47 @@ img {
     margin-top: 0;
 }
 
+
+.main pre {
+    padding: .5em .75em;
+    border: 1px solid var(--border-color);
+    overflow-x: auto;
+}
+
+.main :not(pre)>code {
+    padding: 0 0.2em;
+}
+
+.main pre, .main :not(pre)>code {
+    background: var(--c-shadow);
+    border-radius: .25em;
+}
+
+.toclink,
+.toclink:hover {
+    color: var(--text-color);
+}
+
+.toclink::after {
+    content: ' \f13d';
+    font-family: FontAwesome;
+    color: var(--link-color);
+    font-weight: normal;
+    opacity: 0;
+    transition: opacity .08s;
+}
+
+.toclink:hover::after {
+    opacity: 1;
+    color: var(--link-hover-color);
+}
+
+@media (--max-sm) {
+    .toclink::after {
+        opacity: 1;
+    }
+}
+
 ul {
     padding-left: 2em;
     list-style-type: disc;
@@ -256,7 +322,7 @@ hr {
 }
 
 table {
-    border: 1px solid var(--c-dark);
+    border: 1px solid var(--border-color);
     border-collapse: collapse;
 }
 
@@ -274,10 +340,10 @@ td {
 }
 
 td:not(:first-child), th:not(:first-child) {
-    border-left: 1px solid var(--c-dark);
+    border-left: 1px solid var(--border-color);
 }
 
-tr:nth-child(odd) {
+tr:nth-child(even) {
     background-color: var(--c-shadow);
 }
 
@@ -292,6 +358,7 @@ tr:nth-child(odd) {
     padding: 4em 0 4em 0;
 }
 
+/* j = jumbotron */
 .jindex {
     z-index: 99;
 }
@@ -362,6 +429,7 @@ tr:nth-child(odd) {
     margin-top: .75em;
 }
 
+/* fa = font awesome */
 .fa-users {
     margin-top: var(--margin-box-fa);
 }
@@ -420,7 +488,7 @@ tr:nth-child(odd) {
 h1 {
     margin: 0;
 }
-
+/* art = article */
 .artlist ul {
     padding: 0;
     list-style-type: none;
@@ -440,6 +508,13 @@ h1 {
     margin-right: 2em;
 }
 
+.art-warning {
+    margin-bottom: 2em;
+    padding: .5em;
+    border: 1px solid var(--border-color);
+    color: red;
+}
+
 .art-body {
     margin-bottom: 1em;
 }
@@ -513,6 +588,7 @@ blockquote {
 }
 
 /* faq */
+/* kb = knowledge base */
 .kb-index {
     list-style-type: none;
     padding-left: 0;
@@ -557,7 +633,7 @@ blockquote {
     background: var(--jumbotron-bg);
     color: var(--footer-text-color);
     width: 100%;
-    box-shadow: 0 -3px 5px rgba(150,150,150,.36);
+    box-shadow: 0 -3px 5px var(--footer-shadow-color);
     min-height: 15.4rem;
     padding: 3em 0;
 }
@@ -632,6 +708,7 @@ footer a:hover {
         margin-bottom: .1em;
     }
 
+    /* hdn = hidden */
     .hdn {
         display: none;
     }
@@ -655,7 +732,24 @@ footer a:hover {
     }
     .footerchild ul li img,
     .footerchild ul li .fa-fw {
-        height: 2.5rem;
+        height: 3.5rem;
+    }
+}
+
+@media (--sm-md) {
+    .footer-container {
+        flex-flow: row wrap;
+        position: relative;
+        width: 95vw;
+    }
+
+    .footerchild {
+        flex-basis: 40%;
+        margin-bottom: 1em;
+    }
+
+    .footer-push {
+        margin-left: 0;
     }
 }
 
@@ -702,6 +796,5 @@ footer.copyright div {
 }
 
 .copyright img {
-    height: 1.5rem;
     width: auto;
 }