@import "_reset.scss"; /* // __ __ _ _ _ // \ \ / / (_) | | | | // \ \ / /__ _ _ __ _ __ _ | |__ | | ___ ___ // \ \/ // _` || '__|| | / _` || '_ \ | | / _ \/ __| // \ /| (_| || | | || (_| || |_) || || __/\__ \ // \/ \__,_||_| |_| \__,_||_.__/ |_| \___||___/ */ // Global Variables $border: #333; $unit: 10; :root { --unit: $unit; --primary: #000; --body: rgba(41, 41, 41, 1); --secondary: rgba(41, 41, 41, 1); --background: white; --border: #333; --hover: #f2f2f2; --pressed: #d9d9d9; --highlight: #00ffff; --highlight-soft: rgba(0, 255, 255, 0.3); // @media screen and (prefers-color-scheme: dark) { // --primary: #fff; // --background: #000; // --border: #fff; // } } /* || Typography */ @import "_typography.scss"; /* |x End Typography */ @import "_grid.scss"; /* || 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); } .listify { &:not(:last-child) { &::after { content: ", "; } } } /* 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 */ ul { li { @extend .layout-space; } } article { img { max-width: 100%; } } /* Layout Helpers */ .list { .list-item { margin-bottom: 2 * $unit + px; header { @extend .flex-space-between; @extend .layout-space; } .title { flex-grow: 2; flex-shrink: 0; flex-basis: 55%; margin-right: 5%; } .meta { flex-basis: 40%; flex-grow: 1; flex-shrink: 0; font-size: 0.8em; @extend .flex-space-between; } .context { max-width: 80%; @extend .flex-space-between; @extend .layout-space; } .content { margin-top: $unit + px; } } } .layout-frame { padding: 10px 10px; &.large { padding: 20px 20px; } } .layout-frame-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; } } .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; @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; } /* ================================ */ /* Main Nav */ /* ============================== */ $mainNavLeftMargin: 50px; .brand-link { display: block; position: relative; bottom: 10px; transform: rotateZ(-3deg); padding-left: $mainNavLeftMargin; } .site-nav { nav ul { margin-top: 2 * $unit + px; padding-bottom: 2 * $unit + px; } nav li { position: relative; margin-left: $mainNavLeftMargin; ::before { position: absolute; top: 2px; left: -$mainNavLeftMargin + 4px; } } .posts::before { content: "✏️ "; } .work::before { content: "🎒 "; } .tips::before { content: "🍎 "; } .lists::before { content: "📒 "; } .about::before { content: "🌱 "; } } #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-toc { // list-style: inside; // display: list-item; li { @extend .layout-space; &>ol { margin-top: $unit + px; } li { margin-left: 2 * $unit + px; } } } .main-nav-link { @extend .flex-space-between; .icon { margin-right: 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: 100vh; grid-auto-flow: dense; // Makes it so we don't end up with gaps due to wide tiles @extend .card-grid; .card { // When in desktop layout, enable wide thumbnails @media all and (min-width: 700px) { &.wide { .thumbnail { padding-top: 1/2 * 100%; // Aspect ratio of thumbnail } .thumbnail-2x1 { display: block; } .thumbnail-1x1 { display: none; } } } .thumbnail { position: relative; height: 0; overflow: hidden; } &:not(.wide) { .thumbnail { padding-top: 1/1 * 100%; // Aspect ratio of thumbnails. In this case, 1x1. } } .thumbnail-1x1, .thumbnail-2x1 { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } p { width: 100%; } img { display: block; } .content p { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-box-orient: vertical; } // Card thumbnails .thumbnail img { width: 100%; height: auto; } .thumbnail-2x1 { display: none; } // Behavior based on thumbnails &:not(.has-thumbnail) { .content p { line-clamp: 15; /* number of lines to show */ -webkit-line-clamp: 15; /* number of lines to show */ } } &.has-thumbnail { .content p { line-clamp: 6; /* number of lines to show */ -webkit-line-clamp: 6; /* number of lines to show */ } } } } .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; } } .nate-avatar { position: relative; margin-top: $unit + px; width: 32px; height: 32px; border-radius: 50%; transition: all 0.2s ease-in; cursor: grab; &:hover { transition: all 0.2s ease-out; transform: skew(30deg, 12deg) scale(1.4, 2.8) rotateX(30deg); box-shadow: 2px 2px 0px var(--highlight); } } /* --- Blog & Post --- */ #post { header { border-bottom: 1px solid var(--border); @extend .layout-frame.large; .inner { max-width: 600px; margin: 0 auto; } h1, h2 { margin-bottom: 10px; } .post-tag { text-transform: capitalize; &:not(:last-child)::after { content: ","; margin-right: 2px; } } } .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: 600px; 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 #posts { .tag-list { a { margin-right: 8px; line-height: 2; } } } /* |x End Layout */ /* Site BG */ .site-bg { position: fixed; top: 0; left: 0; z-index: -1; width: 100%; height: 100%; }