]> jfr.im git - irc/freenode/web-7.0.git/blobdiff - static/css/style.css
Merge pull request #41 from freenode/design-spacing
[irc/freenode/web-7.0.git] / static / css / style.css
index df7fc4c33158db000513d4283d339ad596641860..812d73c2a0d36095c6449b2f9cced4063941aa61 100644 (file)
 /* vars */
+:root {
+    --navbar-bg: #292f2f;
+    --jumbotron-bg: #3a4346;
+    --copyright-bg: #292f2f;
+    --link-color: #2fa6bc;
+    --footer-link-color: #ecf7fa;
+    --nlink-col: #000;
+    --text-color: #292f2f;
+    --footer-text-color: #ecf7fa;
+    --copyright-text-color: #ecf7fa;
+    --jumbotron-text-color: #ecf7fa;
+    --border-color: #292f2f;
+    --box-color: #4c5456;
+    --box-hover-color: #292f2f;
+    --box-round: 10px;
+    --max-width: 600px;
+}
 
 /* reset css for browser compat */
-
 * {
-  margin: 0;
-  padding: 0;
-  box-sizing: border-box;
+    margin: 0;
+    padding: 0;
+    box-sizing: border-box;
 }
 
 /* global */
-
 body {
-  font-family: 'Open Sans';
-  color: #333;
-  font-size: 14px;
-  min-height: 100vh;
-  height: auto;
+    font-family: 'Open Sans';
+    color: var(--text-color);
+    font-size: 14px;
+    min-height: 100vh;
+    height: auto;
 }
 
 a {
-  color: rgb(66,139,202);
-  text-decoration: none;
+    color: var(--link-color);
+    text-decoration: none;
 }
 
 /* navbar */
-
 .navbar {
-  width: 100%;
-  height: 50px;
-  background-color: #fff;
-  position: fixed;
-  left: 0;
-  right: 0;
-  top: 0;
-  display: -webkit-box;
-  display: -webkit-flex;
-  display: -ms-flexbox;
-  display: flex;
-  -webkit-flex-wrap: nowrap;
-  -ms-flex-wrap: nowrap;
-  flex-wrap: nowrap;
-  -webkit-box-pack: justify;
-  -webkit-justify-content: space-between;
-  -ms-flex-pack: justify;
-  justify-content: space-between;
-  -webkit-box-align: center;
-  -webkit-align-items: center;
-  -ms-flex-align: center;
-  align-items: center;
-  border-bottom: 1px solid rgba(0,0,0,.3);
-  z-index: 100;
+    width: 100%;
+    height: 50px;
+    background-color: var(--navbar-bg);
+    box-shadow: 0 3px 4px rgba(0, 0, 0, 0.5);
+    position: fixed;
+    left: 0;
+    right: 0;
+    top: 0;
+    display: flex;
+    flex-wrap: nowrap;
+    justify-content: space-between;
+    align-items: center;
+    border-bottom: 1px solid var(--border-color);
+    z-index: 100;
+    padding-right: 5px;
+}
+
+@media all and (max-width: 600px) {
+    .navbar {
+        position: absolute;
+    }
+}
+
+.navbar a {
+    margin-top: 2px;
+    height: 40px;
 }
 
 .nlogo {
-  height: 40px;
+    height: 40px;
 }
 
 .navlinks {
-  display: -webkit-box;
-  display: -webkit-flex;
-  display: -ms-flexbox;
-  display: flex;
-  -webkit-justify-content: space-around;
-  -ms-flex-pack: distribute;
-  justify-content: space-around;
-  -webkit-flex-wrap: nowrap;
-  -ms-flex-wrap: nowrap;
-  flex-wrap: nowrap;
+    display: flex;
+    justify-content: space-around;
+    flex-wrap: nowrap;
 }
 
 .nlink {
-  text-decoration: none;
-  color: #000;
+    text-decoration: none;
+    color: var(--nlink-col);
 }
 
 /* main */
-
 .container {
-  padding: 50px 0 0;
-  width: 100%;
-  min-height: 68vh;
+    width: 100%;
+    min-height: 98vh;
+    padding-top: 50px;
+    padding-bottom: 11.5rem;
 }
 
 .main {
-  margin-left: .5em;
-  margin-top: 1em;
-  margin-bottom: 1em;
+    margin: 0 auto;
+    margin-top: .75em;
+    padding: 0 .75em;
+    max-width: var(--max-width);
+    line-height: 1.3;
 }
 
-/* jumbotron */
+.main h1,
+.main h2,
+.main h3,
+.main li,
+.main p + p,
+.main ul + p {
+    margin-top: .7em;
+}
+
+.main ul {
+    padding-left: 2em;
+    list-style-type: disc;
+}
 
+/* jumbotron */
 .jumbotron {
-  position: relative;
-  width: 100%;
-  margin-top: -16px;
-  background: #000;
-  background: #eee;
-  box-shadow: 0 3px 5px rgba(150,150,150,.36);
-  color: #333;
+    position: relative;
+    width: 100%;
+    margin-top: -16px;
+    background: var(--jumbotron-bg);
+    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
+    color: var(--jumbotron-text-color);
+    padding: 2em 0;
 }
 
 .child {
-  text-align: center;
-  margin: .5em;
-  font-size: 32px;
-  line-height: 48px;
+    text-align: center;
+    margin: .5em auto;
+    font-size: 32px;
+    line-height: 48px;
+    max-width: 75%;
 }
 
 .box-container {
-  display: -webkit-box;
-  display: -webkit-flex;
-  display: -ms-flexbox;
-  display: flex;
-  -webkit-flex-wrap: wrap;
-  -ms-flex-wrap: wrap;
-  flex-wrap: wrap;
-  -webkit-justify-content: space-around;
-  -ms-flex-pack: distribute;
-  justify-content: space-around;
-  -webkit-box-align: stretch;
-  -webkit-align-items: stretch;
-  -ms-flex-align: stretch;
-  align-items: stretch;
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-around;
+    align-items: stretch;
+    max-width: 800px;
+    margin: 0 auto;
 }
 
 .box {
-  text-align: left;
-  text-decoration: none;
-  color: #333;
-  margin-bottom: 5px;
-  padding: 5px;
-  -webkit-flex-basis: 30%;
-  -ms-flex-preferred-size: 30%;
-  flex-basis: 30%;
-  background-color: #fff;
-  border-radius: 10px;
-  -webkit-border-radius: 10px;
-  -moz-border-radius: 10px;
-}
-
-.box:hover,
-.box:active {
-  background-color: #ddd;
-}
-
-.box div {
-  font-size: 28px;
-  line-height: 28px;
-  padding-left: 8px;
-  font-weight: 700;
-  position: relative;
-  display: inline;
-  top: -10px;
+    text-align: center;
+    text-decoration: none;
+    color: var(--jumbotron-text-color);
+    margin-bottom: 5px;
+    padding: 5px;
+    flex-basis: 30%;
+    background-color: var(--box-color);
+    border-radius: var(--box-round);
 }
 
-.fa-users {
-  margin-top: 5px;
+.box:hover,.box:active {
+    background-color: var(--box-hover-color);
+}
+
+.box div{
+    position: relative;
+    top: initial;
+    font-size: 20px;
+    font-weight: 600;
+    line-height: 16px;
+    padding: 10px 0;
+    display: block;
 }
 
-.fa-comment,
-.fa-question {
-  margin-bottom: 5px;
+.fa-users {
+    margin-top: 5px;
 }
 
-.fa-4x {
-  padding-left: 8px;
+.fa-comment,.fa-question {
+    margin-bottom: 5px;
 }
 
 .title {
-  text-align: center;
+    text-align: center;
 }
 
 /* articles feed */
-
 h1 {
-  margin: 0;
+    margin: 0;
 }
 
 div.art {
-  border-bottom: 1px solid rgba(0,0,0,.3);
+    clear: right;
+    flex-grow: 1;
+}
+
+div.artlist {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: flex-start;
+    align-items: stretch;
+    max-width: var(--max-width);
+    margin: 0 auto;
+    margin-top: .5em;
 }
 
-div.art:last-child {
-  border-bottom: none;
+div.art:not(:first-child) {
+    border-top: 1px solid var(--border-color);
 }
 
 b.art {
-  margin-bottom: 0;
-  font-size: 18px;
+    margin-bottom: 0;
+    font-size: 18px;
 }
 
 p.art {
-  margin: 0;
+    margin: 0;
 }
 
 p.art-ingress {
-  font-style: italic;
-  margin: 0;
+    font-style: italic;
+    margin: 0;
 }
 
 .art-date {
-  color: #ccc;
-  margin: 0;
+    float: right;
+    color: #ccc;
+    margin: 0 .5em;
+    line-height: 24px;
 }
 
 p.heading {
-  white-space: nowrap;
+    white-space: nowrap;
 }
 
 p.art-link {
-  margin-top: 0;
+    margin-top: 0;
 }
 
-/* Article */
-
 /* help */
-
 .hmain {
-  display: -webkit-box;
-  display: -webkit-flex;
-  display: -ms-flexbox;
-  display: flex;
-  -webkit-flex-wrap: wrap;
-  -ms-flex-wrap: wrap;
-  flex-wrap: wrap;
-  -webkit-justify-content: space-around;
-  -ms-flex-pack: distribute;
-  justify-content: space-around;
-  -webkit-box-align: stretch;
-  -webkit-align-items: stretch;
-  -ms-flex-align: stretch;
-  align-items: stretch;
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-around;
+    align-items: stretch;
 }
 
 a.hchild {
-  color: #333;
-  /*height: 40px;*/
-  width: 95%;
-  text-align: center;
-  border-top: 1px solid rgba(0,0,0,.6);
-  border-left: 1px solid rgba(0,0,0,.6);
-  border-right: 1px solid rgba(0,0,0,.6);
+    color: var(--text-color);
+/*height: 40px;*/
+    width: 95%;
+    text-align: center;
+    border-top: 1px solid var(--border-color);
+    border-left: 1px solid var(--border-color);
+    border-right: 1px solid var(--border-color);
 }
 
-a.hchild:hover,
-a.hchild:active {
-  background-color: #ddd;
+a.hchild:hover,a.hchild:active {
+    background-color: var(--box-hover-color);
 }
 
 .hchild:first-child {
-  margin-top: 10px;
-  -webkit-border-top-left-radius: 10px;
-  -webkit-border-top-right-radius: 10px;
-  -moz-border-radius-topleft: 10px;
-  -moz-border-radius-topright: 10px;
-  border-top-left-radius: 10px;
-  border-top-right-radius: 10px;
+    margin-top: 10px;
+    -webkit-border-top-left-radius: var(--box-round);
+    -webkit-border-top-right-radius: var(--box-round);
+    -moz-border-radius-topleft: var(--box-round);
+    -moz-border-radius-topright: var(--box-round);
+    border-top-left-radius: var(--box-round);
+    border-top-right-radius: var(--box-round);
 }
 
 .hchild:last-child {
-  margin-bottom: 10px;
-  border-bottom: 1px solid rgba(0,0,0,.6);
-  -webkit-border-bottom-right-radius: 10px;
-  -webkit-border-bottom-left-radius: 10px;
-  -moz-border-radius-bottomright: 10px;
-  -moz-border-radius-bottomleft: 10px;
-  border-bottom-right-radius: 10px;
-  border-bottom-left-radius: 10px;
+    margin-bottom: 10px;
+    border-bottom: 1px solid var(--border-color);
+    -webkit-border-bottom-right-radius: var(--box-round);
+    -webkit-border-bottom-left-radius: var(--box-round);
+    -moz-border-radius-bottomright: var(--box-round);
+    -moz-border-radius-bottomleft: var(--box-round);
+    border-bottom-right-radius: var(--box-round);
+    border-bottom-left-radius: var(--box-round);
 }
 
 /* footer */
-
 .footers {
-  min-height: 30vh;
+    /*min-height: 30vh;*/
+    margin-top: -11rem;
+    min-height: 11rem;
 }
 
 .footer {
-  background: #eee;
-  color: rgba(51,51,51,.9);
-  margin-top: 2vh;
-  display: -webkit-box;
-  display: -webkit-flex;
-  display: -ms-flexbox;
-  display: flex;
-  -webkit-flex-wrap: nowrap;
-  -ms-flex-wrap: nowrap;
-  flex-wrap: nowrap;
-  min-height: 27vh;
-  -webkit-box-pack: justify;
-  -webkit-justify-content: space-between;
-  -ms-flex-pack: justify;
-  justify-content: space-between;
-  -webkit-box-align: start;
-  -webkit-align-items: flex-start;
-  -ms-flex-align: start;
-  align-items: flex-start;
-  box-shadow: 0 -3px 5px rgba(150,150,150,.36);
+    background: var(--jumbotron-bg);
+    color: var(--footer-text-color);
+    margin-top: 2vh;
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+    align-items: flex-start;
+    box-shadow: 0 -3px 5px rgba(150,150,150,.36);
+    min-height: 9.5rem;
 }
 
 .footerchild {
-  margin-top: .5em;
+    margin-top: .5em;
+    flex: 1 1 1px;
+    min-width: 12rem;
+}
+
+.footerchild:last-child {
+    margin-bottom: 1em;
+}
+
+@media all and (max-width: 60rem) {
+    .footer-push {
+        margin-left: auto;
+        width: max-content;
+    }
 }
 
 .footer a {
-  color: #000;
+    color: var(--footer-link-color);
+}
+
+.footer a:hover {
+    color: #fff;
 }
 
 .footer h2 {
-  margin-bottom: 9px;
-  display: inline-block;
+    margin-bottom: .1em;
+    display: inline-block;
 }
 
-.footerchild ul,
-.footerchild ul ul {
-  margin-left: 10px;
-  margin-right: 10px;
-  list-style-type: none;
+.footerchild ul,.footerchild ul ul {
+    margin-left: 10px;
+    margin-right: 10px;
+    list-style-type: none;
 }
 
 .footerchild ul ul {
-  padding-left: 30px;
+    padding-left: 30px;
 }
 
-@media all and (max-width: 500px) {
-  .footer {
-    -webkit-box-orient: vertical;
-    -webkit-box-direction: normal;
-    -webkit-flex-direction: column;
-    -ms-flex-direction: column;
-    flex-direction: column;
-  }
+@media all and (max-width: 600px) {
+    .footer {
+        flex-direction: column;
+    }
 
-  .footerchild {
-    width: 100%;
-  }
+    .footerchild {
+        width: 100%;
+    }
 
-  .footerchild ul li:last-child {
-    margin-bottom: .5em;
-  }
+    .footer-push {
+        margin-left: 0;
+    }
 
-  .hdn {
-    display: none;
-  }
+    .footerchild ul li:last-child {
+        margin-bottom: .5em;
+    }
 
-  .box {
-    text-align: center;
-  }
+    .hdn {
+        display: none;
+    }
 
-  .child {
-    font-size: 20px;
-    line-height: 30px;
-    padding: 10px 0 5px;
-  }
+    .box {
+        text-align: center;
+    }
 
-  .fa-4x {
-    padding: 0;
-    margin: 0;
-  }
+    .child {
+        font-size: 20px;
+        line-height: 30px;
+        padding: 10px 0 5px;
+    }
 
-  .box div {
-    position: relative;
-    top: initial;
-    font-size: 16px;
-    font-weight: normal;
-    line-height: 16px;
-    padding: 10px 0;
-    display: block;
-  }
+    .fa-4x {
+        padding: 0;
+        margin: 0;
+        width: 60px;
+        text-align: center;
+        font-size: 28px;
+    }
+
+    .box-container {
+        flex-direction: column;
+        margin: 0 .5em;
+    }
+
+    .box div {
+        font-size: 22px;
+        line-height: 22px;
+        padding-left: 8px;
+        font-weight: 700;
+        position: relative;
+        display: inline;
+        text-align: center;
+
+    }
+
+    .box {
+        text-align: left;
+        border-radius: calc(var(--box-round) / 2);
+        margin: 5px 0;
+    }
 }
 
-.footer h2,
-.footer h3 {
-  margin-left: 10px;
-  margin-right: 10px;
+.footer h2,.footer h3 {
+    margin-left: 10px;
+    margin-right: 10px;
 }
 
 .copyright {
-  display: -webkit-box;
-  display: -webkit-flex;
-  display: -ms-flexbox;
-  display: flex;
-  -webkit-flex-wrap: nowrap;
-  -ms-flex-wrap: nowrap;
-  flex-wrap: nowrap;
-  -webkit-box-pack: justify;
-  -webkit-justify-content: space-between;
-  -ms-flex-pack: justify;
-  justify-content: space-between;
-  -webkit-box-align: center;
-  -webkit-align-items: center;
-  -ms-flex-align: center;
-  align-items: center;
-  background: rgba(170,178,171,.5);
-  height: 3vh;
-  color: rgba(0,0,0,.8);
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+    align-items: center;
+    background: var(--copyright-bg);
+    min-height: 1.5rem;
+    color: var(--copyright-text-color);
 }
 
 a.copyright {
-  background: rgba(170,178,171,.5);
-  margin-bottom: 0;
-  margin-top: 0;
-  margin-left: .5em;
-  margin-right: .5em;
-  width: auto;
-  height: auto;
+    background: var(--copyright-bg);
+    margin-bottom: 0;
+    margin-top: 0;
+    margin-left: .5em;
+    margin-right: .5em;
+    width: auto;
+    height: auto;
 }
 
 .copyright a img {
-  height: 3vh;
-  width: auto;
+    height: 1.5rem;
+    width: auto;
 }
 
 .copyright p {
-  margin-bottom: 0;
-  margin-top: 0;
-  margin-left: .5em;
-  margin-right: .5em;
-  text-align: right;
-}
-
-@media all and (max-width: 500px) {
-  .copyright {
-    height: 5vh;
-  }
-
-  .copyright a img {
-    height: 5vh;
-  }
-}
\ No newline at end of file
+    margin-bottom: 0;
+    margin-top: 0;
+    margin-left: .5em;
+    margin-right: .5em;
+    text-align: right;
+}