@import "_reset.scss"; @import url("https://fonts.googleapis.com/css2?family=Martel:wght@400;700&family=Raleway:ital,wght@0,900;1,700&display=swap"); // __ __ _ _ _ // \ \ / / (_) | | | | // \ \ / /__ _ _ __ _ __ _ | |__ | | ___ ___ // \ \/ // _` || '__|| | / _` || '_ \ | | / _ \/ __| // \ /| (_| || | | || (_| || |_) || || __/\__ \ // \/ \__,_||_| |_| \__,_||_.__/ |_| \___||___/ // Global Variables $border: #333; $unit: 10; :root { --unit: $unit; --primary: #000; --secondary: white; --background: white; --border: #333; --hover: #f2f2f2; --pressed: #d9d9d9; --highlight: #00ffff; --highlight-soft: rgba(0, 255, 255, 0.3); --body-copy: "Martel", Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; --headlines: "Raleway", Univers, Calibri, "Gill Sans", "Gill Sans MT", "Helvetica Neue", Helvetica, Arial, sans-serif; // @media screen and (prefers-color-scheme: dark) { // --primary: #fff; // --background: #000; // --border: #fff; // } } /* || Typography */ @import "_typography.scss"; /* |x End Typography */ /* || Helpers */ .border-all { border: 1px solid var(--border); } .border-top { border-top: 1px solid var(--border); } .border-bottom { border-bottom: 1px solid var(--border); } .border-right { border-right: 1px solid var(--border); } .border-left { border-left: 1px solid var(--border); } /* Icons */ i.icon { display: block; &-20 { width: 20px; height: 20px; } &-40 { width: 40px; height: 40px; } &.frame { box-shadow: inset 0px 0px 0px 1px $border; background-color: var(--background); } } /* || Layout */ /* Layout Helpers */ .layout-frame { padding: 10px 10px; &.large { padding: 20px 20px; } } .layout-card { background-color: var(--background); @extend .layout-frame.large; } .flex-row { display: flex; justify-content: space-between; align-items: flex-start; } .flex-space-between { display: flex; justify-content: space-between; } .layout-space { margin-bottom: 10px; } .layout-space-large { margin-bottom: 20px; } .layout-text-columns { &.two { columns: auto 2; } &.three { columns: auto 2; } } .layout-width { display: block; &.sixty { max-width: 60%; } } // TODO: Move this to general helpers .interactable { &:hover { background-color: var(--hover); } &:pressed { background-color: var(--pressed); } } /* Layout Lists */ .layout-list { .list-item, .list-context, .list-header { list-style: none; &:not(:last-child) { @extend .layout-space; } } .list-item header { @extend .flex-space-between; } .list-title { flex-grow: 2; flex-shrink: 0; flex-basis: 55%; margin-right: 5%; } .list-meta { flex-basis: 40%; flex-grow: 1; flex-shrink: 0; @extend .flex-space-between; } .list-context { max-width: 500px; } .list-content { margin-top: $unit + px; } .list-description { max-width: 80%; } a { @extend .text-link; } p { margin: 0; } /* Special Lists */ &.spaced-list { .list-header, .list-item:not(:last-child) { @extend .layout-space-large; } } } .collapsible-card-list { display: grid; position: relative; min-height: 0; grid-template-rows: 0.1fr; grid-template-columns: auto; gap: 1px; background-color: var(--border); *:not(.bullet-list), *:not(.numbered-list) { list-style: none; } .card-header { @extend .flex-space-between; @extend .layout-space-large; .collapse-control { .icon { @extend .interactable; } &.active { .minus { display: none; } } &:not(.active) { .plus { display: none; } } } } .list-item[aria-current="section"], .list-item[aria-current="page"] { text-shadow: 2px 4px 2px rgba(0, 255, 255, 0.5); } .list-item:not(:last-child) { @extend .layout-space; } } /* ================================ */ /* Layout Sections */ /* ============================== */ /* Base Layout */ body { min-height: 100vh; background-color: var(--background); @extend .border-all; } .site-grid { display: flex; height: 100%; justify-content: space-between; // max-width: 1660px; @media all and (min-width: 1677px) { border-right: 1px solid $border; } @media all and (max-width: 900px) { flex-direction: column; } } /* Skip navigation for accessibility */ .skip-nav { position: absolute; margin: 20px; background-color: var(--background); transform: translateY(-150%); transition: transform 0.2s; z-index: 99; @extend .layout-frame.large; @extend .border-all; &:active, &:focus-within { transform: translateY(0%); } } main { display: flex; min-height: 100%; flex-direction: column; flex-grow: 1; } .card-grid { display: grid; background-color: var(--border); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); grid-template-rows: repeat(auto-fill, 1fr); grid-column-gap: 1px; grid-row-gap: 1px; & > article, & > div { background-color: var(--background); width: 100%; overflow: hidden; .content { @extend .layout-frame.large; } p { // display: none; // max-height: 140px; // @extend .text-overflow-ellipsis; width: 100%; } .thumbnail img { width: 100%; height: auto; } .thumbnail-2x1 { display: none; } &.no-thumb { p { display: block; } } @media all and (min-width: 700px) { // When in desktop layout, enable wide thumbnails &.wide { grid-column-end: span 2; .thumbnail-2x1 { display: block; } .thumbnail-1x1 { display: none; } } } &.double-wide { grid-column-end: span 4; } } } .grid-card { display: flex; flex-direction: column; justify-content: space-between; } // .site-content { // display: grid; // position: relative; // grid-template-rows: auto auto auto; // grid-template-columns: 1fr; // gap: 1px; // background-color: var(--border); // & > article, // & > section { // background-color: var(--background); // } // } /* ================================ */ /* Main Nav */ /* ============================== */ #main-nav { display: flex; position: relative; flex-direction: column; min-height: 0; background-color: var(--border); flex-grow: 0; flex-shrink: 0; min-height: 80px; // Desktop Nav @media all and (min-width: 900px) { width: 300px; } @extend .border-right; // Mobile Nav > *:not(:last-child) { border-bottom: 1px solid var(--border); } .footer { background-color: var(--background); flex-grow: 1; } .brand-link[aria-current="page"] { svg { -webkit-filter: drop-shadow(4px 4px 0px #00ffff); filter: drop-shadow(4px 4px 0px #00ffff); } } } .nav-top { height: 20px; @extend .layout-space-large; .brand svg { margin: 2px; } } #system-theme-toggle { transition: transform 0.8s ease-in-out; &:hover { transform: rotateZ(90deg); transition: transform 0.8s ease-in-out; } } .nav-search { @extend .layout-space-large; form { position: relative; padding: 0; border: 1px solid var(--border); // TODO: Figure out why this doesn't work. &:focus { .input[type="submit"] { display: block; } } label { display: none; } input { border: 0; background-color: transparent; } input[type="text"] { width: 100%; height: 40px; padding: 10px 10px 10px 40px; border-radius: 0; font-family: var(--body-copy); } input[type="submit"] { display: none; position: absolute; top: 0; right: 0; width: 40px; height: 40px; } .icon { position: absolute; top: 10px; left: 10px; } } } .nav-list { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px 10px; li { list-style: none; border: 1px solid var(--border); min-height: 80px; @extend .layout-frame; } a { display: block; text-decoration: none; @extend .interactable; & > [aria-current="page"] { box-shadow: 2px 2px 0 var(--highlight); } } } .nav-toc { // list-style: inside; // display: list-item; li { @extend .layout-space; & > ol { margin-top: $unit + px; } li { margin-left: 2 * $unit + px; } } } /* ================================ */ /* Footer */ /* ============================== */ #main-content > footer { background-color: var(--background); @extend .border-top; @extend .flex-space-between; } /* ================================ */ /* Page Layouts */ /* ============================== */ /* --- Home --- */ .featured-post-grid { min-height: 100%; grid-auto-flow: dense; // Makes it so we don't end up with gaps due to wide tiles @extend .card-grid; & > article, & > div { min-height: 400px; } } .home-header { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); grid-column-gap: 1px; grid-row-gap: 1px; background-color: var(--border); width: 100%; grid-column-end: span 4; & > div { background-color: var(--background); @extend .layout-frame.large; } } /* --- Blog & Post --- */ #blog, #post { // TODO: Span grid column 2-3 grid-column-start: 2; grid-column-end: 4; max-width: 910px; } #post { header { border-bottom: 1px solid var(--border); @extend .layout-frame.large; .inner { max-width: 540px; margin: 0 auto; } h1, h2 { margin-bottom: 10px; } } .hero-image-wrapper { @extend .layout-space-large; @extend .border-all; } .hero-image { position: relative; margin: 0; img { display: block; object-fit: cover; } figcaption { position: absolute; right: 20px; bottom: 2 * $unit + px; background-color: var(--background); @extend .layout-frame; @extend .border-all; } } .edit { display: inline-block; border-left-width: 5px; @extend .border-all; @extend .layout-frame; @extend .layout-space-large; } .post-content { border-bottom: 1px solid var(--border); @extend .layout-frame.large; .inner { max-width: 540px; margin: 0 auto; } } } .post-rich-text { p:not(:last-child) { margin-bottom: 10px; } p a { @extend .text-link; } h1, h2 { margin: 50px 0 10px 0; widows: 2; } h3, h4 { margin: 20px 0 10px 0; } h5 { @extend .layout-space; } } #posts { } /* |x End Layout */ /* Site BG */ .site-bg { position: fixed; top: 0; left: 0; z-index: -1; width: 100%; height: 100%; }