X-Git-Url: https://jfr.im/git/irc/freenode/web-7.0.git/blobdiff_plain/5a171aa6dc0f6aea42ea3f7146ca5c0c72851aaa..457df43b590b71dfda2178d36b477796f25447a3:/static/css/style.css diff --git a/static/css/style.css b/static/css/style.css index 1cd1b7550..74930e4ee 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1,21 +1,45 @@ /* 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; -} + --c-dark: #292f2f; + --c-bg-dark: #3a4346; + --c-bg-light: #4c5456; + --c-light: #ecf7fa; + --c-hl-dark: #008499; + --c-hl-light: #3baec4; + --c-shadow: #dae5e2; + + /* backgrounds */ + --navbar-bg: var(--c-dark); + --jumbotron-bg: var(--c-bg-dark); + --copyright-bg: var(--c-dark); + + /* link colors */ + --link-color: var(--c-hl-dark); + --link-hover-color: var(--c-hl-light); + --footer-link-color: var(--c-light); + --footer-hover-color: #fff; + + /* text colors */ + --text-color: var(--c-dark); + --footer-text-color: var(--c-light); + --copyright-text-color: var(--c-light); + --jumbotron-text-color: var(--c-light); + --art-date-color: color(var(--c-dark) tint(50%)); + + /* box colors */ + --border-color: var(--c-dark); + --box-color: var(--c-bg-light); + --box-hover-color: var(--c-dark);; + --box-round: 10px; + + /* other */ + --max-width: 600px; + --max-width-box: 800px; + --margin-box-fa: 5px; +} +@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); /* reset css for browser compat */ * { @@ -26,20 +50,34 @@ /* 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); font-size: 14px; min-height: 100vh; height: auto; } +.invisible { + display: none; +} + a { color: var(--link-color); text-decoration: none; } +a:hover { + color: var(--link-hover-color); +} +img { + max-width: 100%; +} + /* navbar */ .navbar { + color: var(--c-light); width: 100%; height: 50px; background-color: var(--navbar-bg); @@ -56,23 +94,8 @@ a { z-index: 100; padding-right: 5px; } -[class*='fn-'] { - margin-top: auto; - margin-bottom: auto; - font-size: 30px; - color: #E6E6E6; - text-shadow: .5px .5px #000; -} -.fn-f, -.fn-n, -.fn-d { - font-size: 35px; -} -.green { - color: #4BEB4A; -} -@media all and (max-width: 600px) { +@media (--max-sm) { .navbar { position: absolute; } @@ -83,60 +106,220 @@ a { 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; } -.navlinks { - display: flex; - justify-content: space-around; - flex-wrap: nowrap; +#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; } -.nlink { - text-decoration: none; - color: var(--nlink-col); +#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 */ .container { width: 100%; - min-height: 98vh; + min-height: 100vh; padding-top: 50px; - padding-bottom: 11.5rem; + padding-bottom: 17.5rem; } .main { - margin: 0 auto; - margin-top: .75em; + margin: 2em auto; padding: 0 .75em; max-width: var(--max-width); - line-height: 140%; + line-height: 1.8; } .main h1, .main h2, .main h3, +.main h4, +.main h5, +.main h6, .main li, -.main p + p, -.main ul + p { +.main pre, +.main p, +.main blockquote { margin-top: .7em; } -.main ul { +.artlist li { + margin-top: 0; +} + +.main h1 + p, +.main h2 + p, +.main h3 + p, +.main h4 + p, +.main h5 + p, +.main h6 + p, +.main blockquote > p:first-child { + margin-top: 0; +} + +ul { padding-left: 2em; list-style-type: disc; } +ol { + padding-left: 2em; + list-style-type: decimal; +} + +hr { + margin-top: .8em; + 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; width: 100%; - margin-top: -16px; + margin-top: -50px; background: var(--jumbotron-bg); box-shadow: 0 1px 5px rgba(0, 0, 0, 0.6); color: var(--jumbotron-text-color); - padding: 2em 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 { @@ -152,7 +335,7 @@ a { flex-wrap: wrap; justify-content: space-around; align-items: stretch; - max-width: 800px; + max-width: var(--max-width-box); margin: 0 auto; } @@ -161,176 +344,271 @@ a { text-decoration: none; color: var(--jumbotron-text-color); margin-bottom: 5px; - padding: 5px; flex-basis: 30%; + min-width: 26%; background-color: var(--box-color); border-radius: var(--box-round); + padding: 1em; } .box:hover,.box:active { + color: var(--jumbotron-text-color); background-color: var(--box-hover-color); } -.box div{ +.box span { position: relative; top: initial; font-size: 20px; font-weight: 600; line-height: 16px; - padding: 10px 0; display: block; + margin-top: .75em; } +/* fa = font awesome */ .fa-users { - margin-top: 5px; + margin-top: var(--margin-box-fa); } -.fa-comment,.fa-question { - margin-bottom: 5px; +.fa-comments,.fa-question { + margin-bottom: var(--margin-box-fa); } .title { text-align: center; } -/* articles feed */ +@media (--max-md) { + .box { + text-align: center; + } + + .child { + font-size: 20px; + line-height: 30px; + padding: 10px 0 5px; + } + + .fa-4x { + padding: 0; + margin: 0; + width: 60px; + text-align: center; + font-size: 28px; + } + + .box-container { + flex-direction: column; + margin: 0 .5em; + } + + .box span { + font-size: 22px; + line-height: 22px; + padding-left: 8px; + font-weight: bold; + position: relative; + display: inline-block; + text-align: center; + margin-top: 0; + } + + .box { + text-align: left; + border-radius: calc(var(--box-round) / 2); + margin: 5px 0; + } +} + +/* articles */ h1 { margin: 0; } - -div.art { - clear: right; - min-height: 3em; - flex-grow: 1; +/* art = article */ +.artlist ul { + padding: 0; + list-style-type: none; } -div.artlist { +.art-info { display: flex; + flex-direction: row; flex-wrap: wrap; - justify-content: flex-start; - align-items: stretch; + justify-content: space-between; + align-items: baseline; +} + +.art-info h1 { + margin-top: 0; + display: inline; + margin-right: 2em; +} + +.art-warning { + margin-bottom: 2em; + padding: .5em; + border: 1px solid var(--border-color); + color: red; +} + +.art-body { + margin-bottom: 1em; +} + +@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; } -div.art:not(:first-child) { +.artlist li:not(:first-child) { border-top: 1px solid var(--border-color); } -b.art { - margin-bottom: 0; - font-size: 18px; +.artlist .art { + font-weight: bold; + font-size: 120%; } -p.art { - margin: 0; +.art-date { + display: inline-block; + vertical-align: baseline; + line-height: 1; + white-space: nowrap; + color: var(--art-date-color); + font-feature-settings: "tnum"; + font-variant-numeric: tabular-nums; } -p.art-ingress { - font-style: italic; - margin: 0; +.artlist .art-date { + margin-bottom: .5em; } -.art-date { - float: right; - color: #ccc; - margin: 0 .5em; +.art-nav { + display: flex; + flex-direction: row; + justify-content: space-between; + width: 100%; } -p.heading { - white-space: nowrap; +.art-nav * { + flex-basis: 30%; } -p.art-link { - margin-top: 0; +.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; + padding-right: 0; + } + + .artlist .art-info { + padding: 0 .75em; + } } -/* help */ -.hmain { +/* faq */ +/* kb = knowledge base */ +.kb-index { + list-style-type: none; + padding-left: 0; display: flex; + flex-direction: row; flex-wrap: wrap; - justify-content: space-around; - align-items: stretch; + justify-content: stretch; } -a.hchild { - 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); +.kb-index li { + display: block; + flex: 1 1 15em; + height: 3em; + margin: 1em; } -a.hchild:hover,a.hchild:active { - background-color: var(--box-hover-color); +.kb-index li h2 { + margin-top: 0; } -.hchild:first-child { - 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); +.kb-index a { + display: block; + color: var(--text-color); + width: 100%; + height: 100%; } - -.hchild:last-child { - 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); +.kb-index a h2 { + color: var(--link-color); +} +.kb-index a:hover h2 { + color: var(--link-hover-color); } /* footer */ .footers { /*min-height: 30vh;*/ - margin-top: -11rem; - min-height: 11rem; + margin-top: -17rem; + min-height: 17rem; } .footer { background: var(--jumbotron-bg); color: var(--footer-text-color); - margin-top: 2vh; + width: 100%; + box-shadow: 0 -3px 5px rgba(150,150,150,.36); + min-height: 15.4rem; + padding: 3em 0; +} + +.footer .fa-fw { + height: 14px; +} + +.footer-container { display: flex; flex-wrap: wrap; - justify-content: space-between; + justify-content: center; align-items: flex-start; - box-shadow: 0 -3px 5px rgba(150,150,150,.36); - min-height: 9.5rem; + margin: 0 auto; } .footerchild { + margin: 0 2em; margin-top: .5em; - flex: 1 1 1px; - min-width: 12rem; + flex-grow: 1; + flex-shrink: 0; } .footerchild:last-child { - margin-bottom: 1em; + margin-bottom: .5em; } -@media all and (max-width: 60rem) { - .footer-push { - margin-left: auto; - width: max-content; - } +.footer-push { + margin-left: auto; + width: max-content; } -.footer a { +footer a { color: var(--footer-link-color); } -.footer a:hover { - color: #fff; +footer a:hover { + color: var(--footer-hover-color); } .footer h2 { @@ -338,7 +616,8 @@ a.hchild:hover,a.hchild:active { display: inline-block; } -.footerchild ul,.footerchild ul ul { +.footerchild ul, .footerchild ul ul { + padding-left: 0; margin-left: 10px; margin-right: 10px; list-style-type: none; @@ -348,106 +627,94 @@ a.hchild:hover,a.hchild:active { padding-left: 30px; } -@media all and (max-width: 600px) { - .footer { +@media (--max-sm) { + .footer-container { flex-direction: column; } - .footerchild { - width: 100%; - } - .footer-push { margin-left: 0; + width: 100%; } .footerchild ul li:last-child { margin-bottom: .5em; } - .hdn { - display: none; - } - - .box { - text-align: center; + .footer-push ul li:last-child { + margin-bottom: .1em; } - .child { - font-size: 20px; - line-height: 30px; - padding: 10px 0 5px; + /* hdn = hidden */ + .hdn { + display: none; } - - .fa-4x { - padding: 0; - margin: 0; - width: 60px; - text-align: center; - font-size: 28px; + .footer { + padding: .5em 0; } - - .box-container { - flex-direction: column; - margin: 0 .5em; + .footer li a { + line-height: 1.8; } - - .box div { - font-size: 22px; - line-height: 22px; - padding-left: 8px; - font-weight: 700; - position: relative; - display: inline; + .footer-push ul { + display: flex; + flex-wrap: wrap; + flex-direction: row; + justify-content: space-between; + align-items: flex-start; text-align: center; - } - - .box { - text-align: left; - border-radius: calc(var(--box-round) / 2); - margin: 5px 0; + .footer-push ul li { + display: inline-block; + font-size: 2.5rem; } - - div.artlist { - padding: 0 .3em; + .footerchild ul li img, + .footerchild ul li .fa-fw { + height: 2.5rem; } } -.footer h2,.footer h3 { +.footer h2, .footer h3 { margin-left: 10px; margin-right: 10px; } -.copyright { +footer.copyright { 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); + padding-left: .5em; + padding-right: .5em; + overflow: hidden; } -a.copyright { - background: var(--copyright-bg); - margin-bottom: 0; - margin-top: 0; - margin-left: .5em; - margin-right: .5em; - width: auto; - height: auto; +footer.copyright div { + display: flex; + align-items: center; + height: 1.6rem; + line-height: 1.6rem; + vertical-align: top; } -.copyright a img { - height: 1.5rem; - width: auto; +.copyright * { + margin: 0; + height: 1.6rem; + line-height: 1.6rem; } -.copyright p { - margin-bottom: 0; - margin-top: 0; - margin-left: .5em; +.copyright .fa { + height: 100%; + vertical-align: top; + font-size: 1.4em; +} + +.copyright .footer-link { + height: 28px; margin-right: .5em; - text-align: right; +} + +.copyright img { + width: auto; }