/** * @file speedy.css * @author Ken Grimes * @license AGPL-3.0 * @copyright 2018 - Ken Grimes * @summmary Speedy Theme stylings for very fast rendering across many devices. */ /* Color Definitions */ :root { --color-bg: #111; --color-bg-dark: #090909; --color-bg-darker: #000; --color-text: #eeeeee; --color-text-link: #dbdbdb; --color-text-active: #cccccc; --color-header: #9b7045; --color-header-dark: #8b6035; --color-header-contrast: #eeeeee; /* Fonts */ font-size: calc(12pt + 0.2vw); font-family: Georgia, Cambria, "Times New Roman", Times, serif; line-height: 1.55; letter-spacing: -.003em; background-color: var(--color-bg); color: var(--color-text); } .cursive { font-family: 'Courgette', cursive; } .cursive-header { color: var(--color-header); } /* Common Components */ a { color: var(--color-text-link) } a:hover, a:active { color: var(--color-text-active) } h1 { font-size: 1.66em } h2 { text-decoration: underline; font-size: 1.48em } h3 { font-size: 1.32em } h4 { font-size: 1.24em } h1, h2, h3, h4 { color: var(--color-header) } .center { text-align: center } .center-justify { display: flex; justify-content: center } .float-right { float: right } .float-left { float: left } pre { display: block; border-radius: 3px; background-color: var(--color-bg-light); box-shadow: 1px 1px 1px black; 100%; line-height: 1.18; } code /* Fix safari code view on IPhone */ { -webkit-text-size-adjust: 100%; overflow-wrap: break-word } table { display: block } article code { border-radius: 3px; background-color: var(--color-bg-light); box-shadow: 1px 1px 1px black } body { margin: 0; padding: 0 } img { max-width: 100% } /* Navigation */ body > nav { opacity: 0.8; border-bottom: 1px solid var(--color-header); background: var(--color-bg-darker); padding-left: 20vw; padding-right: calc(20vw - 50px); } .cbox-hidden { position: absolute; z-index: -1; opacity: 0; } .nav-menu { height: 50px; overflow: hidden; } .cbox-hidden:checked ~ .nav-menu { height: auto; } .nav-menu li:last-child { flex-shrink: 0; position: absolute; right: 0px; bottom: 50px; padding-right: 15px; } .cbox-hidden:checked ~ .nav-menu li:last-child { bottom: none; top: 0; } .nav-menu li:last-child > label:after { content: ''; position: absolute; top: 22px; right: 20px; width: 0; height: 0; border-style: solid; border-width: 5px 5px 0 5px; border-color: #fff transparent transparent transparent; } .cbox-hidden:checked ~ .nav-menu li:last-child > label:after { border-width: 0 5px 5px 5px; border-color: transparent transparent #fff transparent; } .cbox-hidden:checked ~ .nav-menu { height: auto; } .nav-menu ul { display: flex; flex-wrap: wrap; margin: 0; padding: 0 55px 0 0; list-style: none; border-right: 0; white-space: nowrap; max-height: 100px; position: relative; } .cbox-hidden:checked ~ .nav-menu ul { max-height: none; } .nav-menu li:last-child > label, .nav-menu > ul > li > a { display: block; padding: 0 20px; font-size: 0.8em; line-height: 50px; text-decoration: none; color: var(--color-header); cursor: pointer; } .nav-menu > ul > li > a:hover { background: var(--color-header); color: var(--color-text); } /* Footer */ footer { color: var(--color-header); background: var(--color-bg-darker); font-size: 0.8rem; text-align: center; border-left: 1vw solid var(--color-bg-darker); border-right: 1vw solid var(--color-bg-darker); border-top: 1px solid var(--color-header); margin-top: -19px; } .footer-legal { font-size: 0.8em; color: var(--color-text); background: var(--color-header); font-family: sans-serif; margin-left: -1vw; margin-right: -1vw; } .footer-info { display: flex; flex-flow: row wrap; justify-content: space-around; } .footer-info > div { display: block; flex: 0 1 1fr; } .footer-info > ul { display: flex; flex-flow: row wrap; align-items: center; flex: 0 1 1fr; list-style: none; padding: 0; } .footer-info > ul > li { margin: 0 5px; } .footer-info > ul i { display: inline-block; line-height: 48px; width: 48px; height: 48px; transition: all 0.3s ease-in-out; border: 2px solid var(--color-header); border-radius: 5px; } .footer-info > ul i:hover { background: var(--color-text); color: var(--color-header); transition: all 0.3s ease-in-out; } /* Articles */ main { border-left: 1vw solid var(--color-bg-darker); border-right: 1vw solid var(--color-bg-darker); background: var(--color-bg-dark); } main > header { background: var(--color-bg-darker); } main > article { padding: 0 1vw; } main > article > section { padding: 0 1vw; margin: 1vh 0; } main > article > section:after { content: ""; margin: 3vh 0; display: block; width: 100%; height: 1px; background: var(--color-header); } main > article > section > * { overflow-y: auto; } /* horizontal rule deco */ hr { height: 2px; border-style: solid; border-width: 1px 20px; border-color: var(--color-header) transparent; } /* Slideshows */ ul.slideshow { display: flex; justify-content: center; position: relative; list-style: none; padding: 0; } ul.slideshow > li { display: block; position: absolute; top: 0; opacity: 0; } ul.slideshow-border > li { border: 3px solid var(--color-header); border-radius: 3px; } ul.slideshow > li img { display: block; } ul.slideshow > li:first-child { opacity: 1; position: relative; } /* Speedy Cards */ div.speedy-cards { display: flex; justify-content: space-around; flex-flow: row wrap; font-size: 0.8em; } div.speedy-cards > a { position: relative; display: block; text-decoration: none; font-size: 1.2em; font-weight: bold; margin: 2vw; padding: 2px; min-width: 128px; width: 14vw; min-height: 128px; height: 14vw; box-shadow: 2px 1px 2px black; border: 1px solid black; border-radius: 3px; padding: 3px; overflow: hidden; background-color: var(--color-bg-dark); } div.speedy-cards > a > div { margin: 0; padding: 0; font-size: 0.9em; font-weight: normal; } div.speedy-cards > a > img { opacity: 0.2; position: absolute; top: 3vmin; right: 1vmin; width: 40%; height: 40%; background-size: 100% 100%; border-radius: 50%; border: 1px solid black; } div.speedy-cards > br { /* Linebreaks are inserted and made invisible to make text browsers and ARIA-readers break between anchors */ display: none; } /* Speedy List */ ul.speedy-list { display: flex; flex-flow: row wrap; place-content: center space-around; align-items: center; padding: 0; margin: 0; } ul.speedy-list > li { display: block; } ul.speedy-list a { display: flex; flex-flow: column nowrap; justify-content: center; text-align: center; width: 128px; height: 128px; } a.speedy-header { display: flex; flex-flow: row wrap; justify-content: center; text-decoration: none; padding: 0; } a.speedy-header > h1 { display: block; position: relative; min-width: 256px; max-width: 33vw; background-color: var(--color-bg); border: 1px solid black; border-radius: 3px; padding: 3px; margin: 0 0 2px 0; text-align: center; } a.speedy-header > h1 > img { position: absolute; left: 0; opacity: 0.2; width: 64px; height: 64px; border-radius: 50%; background-size: 64px 64px; border: 1px solid black; } /* Single-Page Footer Info */ div.last-modified { margin: 0 0 0 3px; padding: 0; font-size: 0.6em; } div.page-nav { font-size: 0.8em; } /* List-Page Footer Info & Pagination */ ul.pagination { padding: 0; list-style: none; text-align: center; } ul.pagination > li { margin: 0 0.2em; display: inline; } ul.pagination > li.disabled { cursor: not-allowed; opacity: 0.5; text-decoration: none; pointer-events: none; } /* Media Queries */ /* Landscape with large width */ /* Header and Nav are fixed to top-left with 192px static width */ /* Sections are decorated with borders */ /* Box Shadows provide an abomination for flat-design purists */ @media screen and (orientation: landscape) and (min-width: 768px) { footer, main { width: 60vw; margin-left: 20vw; margin-right: 20vw; } a.speedy-header { margin: 0 -1vw; /* background-color: var(--color-header-contrast); */ border-radius: 3px; } } /* Portrait View */ /* Header and Nav aligned at top with 100% width */ /* Nav is sticky - top alignment changed on scroll by JS */ /* Sections have no decorations. Instead, section:after pseudo-element makes a horizontal rule between sections */ /* Nav SVGs are smaller */ @media screen and (orientation:portrait) { body > nav { position: sticky; padding: 0; } .nav-menu { width: 100%; max-width: 100%; } } /* Menu Bases */ @media screen and (max-width: 500px) { .nav-menu > ul > li { flex-basis: 50% } } @media screen and (max-width: 364px) { .nav-menu > ul > li { flex-basis: 100% } }