]> jfr.im git - irc/freenode/web-7.0.git/blobdiff - static/css/style.css
Technical styleguide
[irc/freenode/web-7.0.git] / static / css / style.css
index facab32828e9a40d53d14bfb707aa65e8d7ed7c3..74930e4ee19dd25d5b4a78696de7b3ad88315f7e 100644 (file)
@@ -6,6 +6,7 @@
     --c-light:    #ecf7fa;
     --c-hl-dark:  #008499;
     --c-hl-light: #3baec4;
+    --c-shadow:   #dae5e2;
 
     /* backgrounds */
     --navbar-bg:    var(--c-dark);
@@ -49,7 +50,7 @@
 
 /* global */
 body {
-    font-family: 'Open Sans';
+    font-family: 'Open Sans', sans-serif;
     font-feature-settings: "lnum";
     font-variant-numeric: lining-nums;
     color: var(--text-color);
@@ -58,6 +59,10 @@ body {
     height: auto;
 }
 
+.invisible {
+    display: none;
+}
+
 a {
     color: var(--link-color);
     text-decoration: none;
@@ -72,6 +77,7 @@ img {
 
 /* navbar */
 .navbar {
+    color: var(--c-light);
     width: 100%;
     height: 50px;
     background-color: var(--navbar-bg);
@@ -89,7 +95,7 @@ img {
     padding-right: 5px;
 }
 
-@media (--max-sm); {
+@media (--max-sm) {
     .navbar {
         position: absolute;
     }
@@ -100,8 +106,99 @@ img {
     height: 40px;
 }
 
-.nlogo {
-    height: 40px;
+/* nav = navbar
+ * pia = Private Internet access
+ */
+#nav-logo { order: 10; }
+#nav-pia  { order: 30; }
+
+#nav-jump { order: 1000; }
+
+#nav-search {
+    order: 20;
+    margin-left: auto;
+    line-height: 35px;
+}
+
+#nav-search input {
+    background-color: var(--c-bg-dark);
+    border-style: none;
+    border-radius: 2px;
+    color: var(--c-light);
+    padding: .5em;
+    padding-right: 2em;
+    margin-right: -2em;
+}
+
+#nav-label {
+    display: inline-block;
+    width: 2em;
+    margin-right: .7em;
+}
+
+@media (--max-sm) {
+    #nav-search {
+        order: 100;
+        margin: 0 .5em;
+    }
+
+    #nav-pia {
+        margin-left: auto;
+    }
+
+    #nav-label {
+        width: auto;
+        margin: 0 .5em;
+    }
+
+    #nav-searchbox:not(:focus) {
+        display: inline-block;
+        position: absolute;
+        height: 0;
+        width: 0;
+        padding: 0;
+        margin: 0;
+        background: transparent;
+        overflow: hidden;
+    }
+
+    #nav-searchbox:focus {
+        position: absolute;
+        visibility: visible;
+        outline: none;
+        top: 0;
+        left: 0;
+        right: 0;
+        height: 50px;
+        line-height: 50px;
+        font-size: 1.5em;
+        padding-right: 2.5em;
+        width: 100%;
+    }
+
+    #nav-searchbox:focus + #nav-label {
+        display: block;
+        position: absolute;
+        pointer-events: none;
+        top: 0;
+        right: 0;
+        width: 1.5em;
+        font-size: 2em;
+        line-height: 50px;
+        padding-top: -.1em;
+        margin: 0;
+    }
+}
+
+/* n = nav */
+.nlogo { height: 40px; }
+
+/* t = text (used in jumbotron for small logo as text) */
+.tlogo {
+    height: 2.4ex;
+    margin-bottom: -.47ex;
+    margin-left: -10px;
+    margin-right: -10px;
 }
 
 /* main */
@@ -109,30 +206,40 @@ img {
     width: 100%;
     min-height: 100vh;
     padding-top: 50px;
-    padding-bottom: 17rem;
+    padding-bottom: 17.5rem;
 }
 
 .main {
     margin: 2em auto;
     padding: 0 .75em;
     max-width: var(--max-width);
-    line-height: 1.4;
+    line-height: 1.8;
 }
 
 .main h1,
 .main h2,
 .main h3,
 .main h4,
+.main h5,
+.main h6,
 .main li,
 .main pre,
-.main p {
+.main p,
+.main blockquote {
     margin-top: .7em;
 }
 
+.artlist li {
+    margin-top: 0;
+}
+
 .main h1 + p,
 .main h2 + p,
 .main h3 + p,
-.main h3 + p {
+.main h4 + p,
+.main h5 + p,
+.main h6 + p,
+.main blockquote > p:first-child {
     margin-top: 0;
 }
 
@@ -151,6 +258,32 @@ hr {
     margin-bottom: .8em;
 }
 
+table {
+    border: 1px solid var(--c-dark);
+    border-collapse: collapse;
+}
+
+th, td {
+    margin: .2em;
+}
+
+th {
+    background-color: var(--c-bg-dark);
+    color: var(--c-light);
+}
+
+td {
+    padding: .2em .5em;
+}
+
+td:not(:first-child), th:not(:first-child) {
+    border-left: 1px solid var(--c-dark);
+}
+
+tr:nth-child(odd) {
+    background-color: var(--c-shadow);
+}
+
 /* jumbotron */
 .jumbotron {
     position: relative;
@@ -159,7 +292,34 @@ hr {
     background: var(--jumbotron-bg);
     box-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
     color: var(--jumbotron-text-color);
-    padding: 8em 0 4em 0;
+    padding: 4em 0 4em 0;
+}
+
+/* j = jumbotron */
+.jindex {
+    z-index: 99;
+}
+
+.jlogo {
+    display: block;
+    margin: 25px auto;
+}
+
+.jpia {
+    position: absolute;
+    height: 40px;
+    right: 0;
+    top: 0;
+    margin: 25px;
+}
+
+@media (--max-sm) {
+    .jlogo {
+        margin: 2em auto -2em auto;
+    }
+    .jumbotron {
+        padding-bottom: 2em;
+    }
 }
 
 .child {
@@ -206,6 +366,7 @@ hr {
     margin-top: .75em;
 }
 
+/* fa = font awesome */
 .fa-users {
     margin-top: var(--margin-box-fa);
 }
@@ -264,9 +425,13 @@ hr {
 h1 {
     margin: 0;
 }
+/* art = article */
+.artlist ul {
+    padding: 0;
+    list-style-type: none;
+}
 
 .art-info {
-    line-height: 2.1;
     display: flex;
     flex-direction: row;
     flex-wrap: wrap;
@@ -280,23 +445,36 @@ h1 {
     margin-right: 2em;
 }
 
+.art-warning {
+    margin-bottom: 2em;
+    padding: .5em;
+    border: 1px solid var(--border-color);
+    color: red;
+}
+
 .art-body {
     margin-bottom: 1em;
 }
 
-.artlist {
+@media(--max-sm) {
+    .artlist .heading {
+        padding: 0 0.75em;
+    }
+}
+
+.artlist ul {
     max-width: var(--max-width);
-    margin: 0 auto;
+    margin: 2em auto;
     margin-top: .5em;
 }
 
-.artlist.heading {
-    margin: 8em auto 2em auto;
-    padding: 0 0.75em;
+.artlist li:not(:first-child) {
+    border-top: 1px solid var(--border-color);
 }
 
-.artlist .art-info:not(:first-child) {
-    border-top: 1px solid var(--border-color);
+.artlist .art {
+    font-weight: bold;
+    font-size: 120%;
 }
 
 .art-date {
@@ -309,6 +487,10 @@ h1 {
     font-variant-numeric: tabular-nums;
 }
 
+.artlist .art-date {
+    margin-bottom: .5em;
+}
+
 .art-nav {
     display: flex;
     flex-direction: row;
@@ -316,6 +498,21 @@ h1 {
     width: 100%;
 }
 
+.art-nav * {
+    flex-basis: 30%;
+}
+
+.art-nav *:nth-child(1) { text-align: left; }
+.art-nav *:nth-child(2) { text-align: center; }
+.art-nav *:nth-child(3) { text-align: right; }
+
+blockquote {
+    padding-left: 1em;
+    display: inline-block;
+    border-left: .5em solid var(--c-shadow);
+    font-style: italic;
+}
+
 @media (--max-md) {
     .main.artlist {
         padding-left: 0;
@@ -328,6 +525,7 @@ h1 {
 }
 
 /* faq */
+/* kb = knowledge base */
 .kb-index {
     list-style-type: none;
     padding-left: 0;
@@ -340,7 +538,7 @@ h1 {
 .kb-index li {
     display: block;
     flex: 1 1 15em;
-    height: 7em;
+    height: 3em;
     margin: 1em;
 }
 
@@ -373,11 +571,14 @@ h1 {
     color: var(--footer-text-color);
     width: 100%;
     box-shadow: 0 -3px 5px rgba(150,150,150,.36);
-    min-height: 15.5rem;
-
+    min-height: 15.4rem;
     padding: 3em 0;
 }
 
+.footer .fa-fw {
+    height: 14px;
+}
+
 .footer-container {
     display: flex;
     flex-wrap: wrap;
@@ -394,7 +595,7 @@ h1 {
 }
 
 .footerchild:last-child {
-    margin-bottom: 1em;
+    margin-bottom: .5em;
 }
 
 .footer-push {
@@ -426,22 +627,50 @@ footer a:hover {
     padding-left: 30px;
 }
 
-@media (--max-md) {
+@media (--max-sm) {
     .footer-container {
         flex-direction: column;
     }
 
     .footer-push {
         margin-left: 0;
+        width: 100%;
     }
 
     .footerchild ul li:last-child {
         margin-bottom: .5em;
     }
 
+    .footer-push ul li:last-child {
+        margin-bottom: .1em;
+    }
+
+    /* hdn = hidden */
     .hdn {
         display: none;
     }
+    .footer {
+        padding: .5em 0;
+    }
+    .footer li a {
+        line-height: 1.8;
+    }
+    .footer-push ul {
+        display: flex;
+        flex-wrap: wrap;
+        flex-direction: row;
+        justify-content: space-between;
+        align-items: flex-start;
+        text-align: center;
+    }
+    .footer-push ul li {
+        display: inline-block;
+        font-size: 2.5rem;
+    }
+    .footerchild ul li img,
+    .footerchild ul li .fa-fw {
+        height: 2.5rem;
+    }
 }
 
 .footer h2, .footer h3 {
@@ -464,15 +693,15 @@ footer.copyright {
 footer.copyright div {
     display: flex;
     align-items: center;
-    height: 1.5rem;
-    line-height: 1.5rem;
+    height: 1.6rem;
+    line-height: 1.6rem;
     vertical-align: top;
 }
 
 .copyright * {
     margin: 0;
-    height: 1.5rem;
-    line-height: 1.5rem;
+    height: 1.6rem;
+    line-height: 1.6rem;
 }
 
 .copyright .fa {
@@ -487,6 +716,5 @@ footer.copyright div {
 }
 
 .copyright img {
-    height: 1.5rem;
     width: auto;
 }