From 8a8de24caa91d59b2d7953893ff8e7e8da944b5d Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Sun, 15 Sep 2024 12:49:33 -0700 Subject: [PATCH] chore: remove utility classes + cleanup --- package-lock.json | 4 +- package.json | 2 +- src/assets/styles/base/index.css | 57 ++--- src/assets/styles/components/badge-grid.css | 1 - src/assets/styles/components/buttons.css | 3 - src/assets/styles/components/forms.css | 11 +- src/assets/styles/components/media-grid.css | 6 +- src/assets/styles/components/menu.css | 232 +++++++++--------- src/assets/styles/components/modal.css | 2 +- src/assets/styles/components/paginator.css | 8 + src/assets/styles/components/progress-bar.css | 2 +- src/assets/styles/components/tab-buttons.css | 8 +- src/assets/styles/defaults/fonts.css | 2 +- src/assets/styles/defaults/vars.css | 4 + src/assets/styles/pages/about.css | 9 +- src/assets/styles/pages/contact.css | 5 + src/assets/styles/pages/watching.css | 2 + src/assets/styles/pages/webrings.css | 8 + src/includes/partials/blocks/avatar.liquid | 2 +- src/includes/partials/footer.liquid | 8 +- src/includes/partials/home/posts.liquid | 4 +- .../partials/media/watching/grid.liquid | 4 +- src/includes/partials/nav/menu.liquid | 4 +- src/includes/partials/nav/paginator.liquid | 6 +- src/includes/webrings/css-joy.liquid | 8 +- src/includes/webrings/the-claw.liquid | 8 +- src/pages/dynamic/music/index.html | 8 +- src/pages/static/about.md | 4 +- src/pages/static/contact.html | 10 +- src/pages/static/search.html | 29 ++- 30 files changed, 247 insertions(+), 214 deletions(-) diff --git a/package-lock.json b/package-lock.json index 874d4c95..20475c4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "24.8.7", + "version": "24.9.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "24.8.7", + "version": "24.9.0", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.5.0", diff --git a/package.json b/package.json index ff71a6af..a55d9aa5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "24.8.7", + "version": "24.9.0", "description": "The source for my personal site. Built using 11ty (and other tools).", "type": "module", "scripts": { diff --git a/src/assets/styles/base/index.css b/src/assets/styles/base/index.css index 92bc917b..150e8df2 100644 --- a/src/assets/styles/base/index.css +++ b/src/assets/styles/base/index.css @@ -83,6 +83,13 @@ p { } } +.highlight-text { + color: var(--color-lightest); + background-color: var(--accent-color); + padding: var(--spacing-xs); + border-radius: var(--border-radius-slight); +} + blockquote { font-size: var(--font-size-lg); color: var(--gray-dark); @@ -98,7 +105,7 @@ code { border-radius: var(--border-radius-slight); } -p:not(.flex-centered):not(.banner p) > svg { +p:not(.banner p) > svg { margin-bottom: var(--inline-margin-bottom); } @@ -289,6 +296,7 @@ h6 { } .section-header { + display: flex; margin: var(--spacing-xl) 0 var(--spacing-lg); line-height: var(--line-height-sm); @@ -470,22 +478,32 @@ article { } footer { - & p:first-of-type { - margin: var(--spacing-3xl) 0 var(--spacing-lg); + & .updated { + text-align: center; font-size: var(--font-size-sm); + margin: var(--spacing-3xl) 0 var(--spacing-lg); } & nav { + &.social, + &.sub-pages { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + } + &.social { gap: var(--spacing-md); margin-bottom: var(--spacing-lg); width: 100%; - & svg { - margin-top: 0; + & .icon > span, + & .active > span { + display: none; } - & a { + & .active { display: flex; } } @@ -510,7 +528,6 @@ footer { article { & h3 { margin: 0; - display: inline-block; } & time { @@ -539,30 +556,4 @@ ul, ol { height: auto; width: 100%; display: block; -} - -/* utilities */ -.highlight-text { - color: var(--color-lightest); - background-color: var(--accent-color); - padding: var(--spacing-xs); - border-radius: var(--border-radius-slight); -} - -.hidden { - display: none !important; -} - -.text-centered { - text-align: center !important; -} - -.flex-centered { - display: flex; - flex-direction: row; - align-items: center; -} - -.justify-centered { - justify-content: center; } \ No newline at end of file diff --git a/src/assets/styles/components/badge-grid.css b/src/assets/styles/components/badge-grid.css index bd19392a..aa3c972c 100644 --- a/src/assets/styles/components/badge-grid.css +++ b/src/assets/styles/components/badge-grid.css @@ -2,7 +2,6 @@ display: grid; gap: var(--spacing-md); grid-template-columns: repeat(3, 1fr); - margin-top: var(--spacing-2xl); @media screen and (min-width: 768px) { grid-template-columns: repeat(4, 1fr); diff --git a/src/assets/styles/components/buttons.css b/src/assets/styles/components/buttons.css index f30e464b..0bdec78f 100644 --- a/src/assets/styles/components/buttons.css +++ b/src/assets/styles/components/buttons.css @@ -15,9 +15,6 @@ button, border-radius: var(--border-radius-full); padding: var(--spacing-xs) var(--spacing-md); cursor: pointer; - display: inline-flex; - flex-direction: row; - justify-content: center; font-size: var(--font-size-base); font-weight: var(--font-weight-bold); line-height: var(--line-height-base); diff --git a/src/assets/styles/components/forms.css b/src/assets/styles/components/forms.css index 96ade4e4..9622555d 100644 --- a/src/assets/styles/components/forms.css +++ b/src/assets/styles/components/forms.css @@ -7,9 +7,7 @@ input[type="text"], input[type="email"], input[type="search"], textarea { - font-family: var(--font-mono); - font-size: var(--font-size-base); - font-weight: var(--font-weight-base); + font: var(--font-weight-base) var(--font-size-base) var(--font-mono); line-height: var(--line-height-base); color: var(--text-color); background-color: var(--background-color); @@ -47,7 +45,7 @@ select:focus-within { select { color: var(--text-color); - border: 1px solid var(--text-color); + border: var(--border-gray); border-radius: var(--border-radius-slight); background-color: var(--background-color); padding: var(--spacing-xs) var(--spacing-sm); @@ -55,12 +53,17 @@ select { .search__form { margin-top: 0; + + & .search__form--input::-webkit-search-cancel-button { + cursor: pointer; + } } .search__results { margin: 0 0 var(--spacing-base); padding: 0; list-style: none; + display: none; & li { margin: var(--spacing-sm) 0; diff --git a/src/assets/styles/components/media-grid.css b/src/assets/styles/components/media-grid.css index 079087cb..fe8208de 100644 --- a/src/assets/styles/components/media-grid.css +++ b/src/assets/styles/components/media-grid.css @@ -66,9 +66,7 @@ height: 100%; border: var(--border-default); border-radius: var(--border-radius-slight); - transition-property: border-color; - transition-timing-function: var(--transition-ease-in-out); - transition-duration: var(--transition-duration-default); + transition: border-color var(--transition-duration-default) var(--transition-ease-in-out); } } @@ -104,8 +102,8 @@ display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; - overflow: hidden; text-overflow: ellipsis; + overflow: hidden; } } } \ No newline at end of file diff --git a/src/assets/styles/components/menu.css b/src/assets/styles/components/menu.css index 5977564a..7a1fb72a 100644 --- a/src/assets/styles/components/menu.css +++ b/src/assets/styles/components/menu.css @@ -1,141 +1,147 @@ -.menu-primary { +menu { display: flex; flex-direction: row; - list-style: none; - margin: 0; - padding: 0; - gap: var(--spacing-md); + align-items: center; - & > li { - margin: 0; + & .menu-primary { display: flex; - - & .icon > svg, - & .active > svg { - display: block; - } - - & .icon > span, - & .active > span { - display: none; - } - } -} - -.menu-button-container { - display: none; - outline: none; - margin-left: var(--spacing-md); - - & svg { - cursor: pointer; - } - - &:focus, - &:focus-within { - outline: var(--outline-default); - border-radius: var(--border-radius-slight); - } - - &:hover svg, - &:focus svg, - &:focus-within svg, - &:active svg { - stroke: var(--accent-color-hover); - } -} - -#menu-toggle { - display: none; - - &:checked + .menu-button-container { - & .menu-closed { - display: none; - } - - & .menu-open { - display: block; - } - } - - &:not(:checked) + .menu-button-container { - & .menu-closed { - display: block; - } - - & .menu-open { - display: none; - } - } -} - -@media (max-width: 768px) { - .menu-primary { - position: absolute; - top: 0; - left: 0; - gap: 0; - margin-top: calc(var(--spacing-3xl) * 2.25); - flex-direction: column; - width: 100%; - z-index: 3; + flex-direction: row; + list-style: none; + margin: 0; + padding: 0; + gap: var(--spacing-md); & > li { - overflow: hidden; - align-items: center; - justify-content: center; margin: 0; - padding: var(--spacing-sm) 0; - width: 100%; - color: var(--text-color); - background: var(--background-color); + display: flex; & .icon > svg, & .active > svg { - display: none; + display: block; } & .icon > span, & .active > span { - display: inline; + display: none; } } } - #menu-toggle ~ .menu-primary li { - height: 0; - border: 0; - padding: 0; - } + & .menu-button-container { + display: none; + outline: none; + margin-left: var(--spacing-md); - #menu-toggle:checked ~ .menu-primary li { - border-bottom: var(--border-gray); - height: calc(var(--sizing-3xl) * 1.5); - - &:first-child { - border-top: var(--border-gray); - } - - & a, - & .active { - font-size: var(--font-size-lg); - } - - &:focus a, - &:focus-within a { - outline: none; + & svg { + cursor: pointer; } &:focus, &:focus-within { - border-top: var(--outline-default); - border-bottom: var(--outline-default); + outline: var(--outline-default); + border-radius: var(--border-radius-slight); + } + + &:hover svg, + &:focus svg, + &:focus-within svg, + &:active svg { + stroke: var(--accent-color-hover); } } - .menu-button-container { - display: unset; - width: var(--sizing-svg-base); - height: var(--sizing-svg-base); + & #menu-toggle { + display: none; + + &:checked + .menu-button-container { + & .menu-closed { + display: none; + } + + & .menu-open { + display: block; + } + } + + &:not(:checked) + .menu-button-container { + & .menu-closed { + display: block; + } + + & .menu-open { + display: none; + } + } + } + + @media (max-width: 768px) { + .menu-primary { + position: absolute; + top: 0; + left: 0; + gap: 0; + margin-top: calc(var(--spacing-3xl) * 2.25); + flex-direction: column; + width: 100%; + z-index: 3; + + & > li { + overflow: hidden; + align-items: center; + justify-content: center; + margin: 0; + padding: var(--spacing-sm) 0; + width: 100%; + color: var(--text-color); + background: var(--background-color); + + & .icon > svg, + & .active > svg { + display: none; + } + + & .icon > span, + & .active > span { + display: inline; + } + } + } + + #menu-toggle ~ .menu-primary li { + height: 0; + border: 0; + padding: 0; + } + + #menu-toggle:checked ~ .menu-primary li { + border-bottom: var(--border-gray); + height: calc(var(--sizing-3xl) * 1.5); + + &:first-child { + border-top: var(--border-gray); + } + + & a, + & .active { + font-size: var(--font-size-lg); + } + + &:focus a, + &:focus-within a { + outline: none; + } + + &:focus, + &:focus-within { + border-top: var(--outline-default); + border-bottom: var(--outline-default); + } + } + + .menu-button-container { + display: unset; + width: var(--sizing-svg-base); + height: var(--sizing-svg-base); + } } } \ No newline at end of file diff --git a/src/assets/styles/components/modal.css b/src/assets/styles/components/modal.css index c5890c40..221c0899 100644 --- a/src/assets/styles/components/modal.css +++ b/src/assets/styles/components/modal.css @@ -2,7 +2,7 @@ width: 100%; height: 100%; inset: 0; - background: #000000b3; + background: var(--gray-overlay); position: fixed; z-index: 3; diff --git a/src/assets/styles/components/paginator.css b/src/assets/styles/components/paginator.css index c69b9789..759076d1 100644 --- a/src/assets/styles/components/paginator.css +++ b/src/assets/styles/components/paginator.css @@ -1,4 +1,7 @@ .pagination { + display: flex; + flex-direction: row; + align-items: center; justify-content: space-between; & button { @@ -11,6 +14,11 @@ display: flex; } + & p { + text-align: center; + margin: 0; + } + & span.disabled svg[data-tablericon-name^="arrow-"] { cursor: not-allowed; stroke: color-mix(in srgb, var(--text-color), transparent 50%); diff --git a/src/assets/styles/components/progress-bar.css b/src/assets/styles/components/progress-bar.css index f10195b2..682c33d2 100644 --- a/src/assets/styles/components/progress-bar.css +++ b/src/assets/styles/components/progress-bar.css @@ -2,7 +2,7 @@ display: flex; height: var(--sizing-lg); width: 100%; - background-color: #d9dee499; + background-color: var(--gray-background-transparent); border-radius: var(--border-radius-full); & .progress-bar { diff --git a/src/assets/styles/components/tab-buttons.css b/src/assets/styles/components/tab-buttons.css index 09db3feb..6506591c 100644 --- a/src/assets/styles/components/tab-buttons.css +++ b/src/assets/styles/components/tab-buttons.css @@ -1,3 +1,5 @@ +#tracks-recent, +#tracks-window, #tracks-recent ~ .tracks-recent, #tracks-window ~ .tracks-window { display: none; @@ -8,9 +10,9 @@ display: block; } -input[id="tracks-recent"] ~ [for="tracks-recent"], -input[id="tracks-window"] ~ [for="tracks-window"] { - margin-bottom: var(--spacing-base); +input[id="tracks-recent"] ~ .tracks-recent, +input[id="tracks-window"] ~ .tracks-window { + margin-top: var(--spacing-base); } input[id="tracks-recent"] ~ [for="tracks-recent"]:has(+ [for="tracks-window"]) { diff --git a/src/assets/styles/defaults/fonts.css b/src/assets/styles/defaults/fonts.css index 30e8303d..3970376b 100644 --- a/src/assets/styles/defaults/fonts.css +++ b/src/assets/styles/defaults/fonts.css @@ -1,5 +1,5 @@ @font-face { font-family: MonoLisa; src: url('/assets/fonts/MonoLisa.min.woff2') format('woff2'); - font-display: optional + font-display: optional; } \ No newline at end of file diff --git a/src/assets/styles/defaults/vars.css b/src/assets/styles/defaults/vars.css index eb3dc3f6..556e1078 100644 --- a/src/assets/styles/defaults/vars.css +++ b/src/assets/styles/defaults/vars.css @@ -30,6 +30,10 @@ --gray-lighter: var(--gray-100); --gray-dark: var(--gray-950); + /* semi-transparent overlay color */ + --gray-overlay: #000000b3; + --gray-background-transparent: #d9dee499; + /* base theme */ --color-lightest: var(--gray-50); --color-darkest: var(--gray-1000); diff --git a/src/assets/styles/pages/about.css b/src/assets/styles/pages/about.css index 674014ee..213e88e3 100644 --- a/src/assets/styles/pages/about.css +++ b/src/assets/styles/pages/about.css @@ -7,9 +7,12 @@ } .avatar-wrapper { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; margin-bottom: var(--spacing-sm); width: 100%; - justify-content: center; & .interior { display: flex; @@ -20,4 +23,8 @@ image-rendering: pixelated; } } +} + +.about-title { + text-align: center; } \ No newline at end of file diff --git a/src/assets/styles/pages/contact.css b/src/assets/styles/pages/contact.css index c45746fa..a14a5e21 100644 --- a/src/assets/styles/pages/contact.css +++ b/src/assets/styles/pages/contact.css @@ -6,6 +6,11 @@ flex-direction: row; } + & label.hp, + & label > span { + display: none; + } + & textarea { height: calc(var(--sizing-3xl) * 5); resize: none; diff --git a/src/assets/styles/pages/watching.css b/src/assets/styles/pages/watching.css index 11b95602..97a6991a 100644 --- a/src/assets/styles/pages/watching.css +++ b/src/assets/styles/pages/watching.css @@ -126,6 +126,8 @@ a:active > .watching.hero::after { } .subheader { + display: flex; + align-items: center; gap: var(--spacing-xs); } diff --git a/src/assets/styles/pages/webrings.css b/src/assets/styles/pages/webrings.css index 75612456..29cf09a7 100644 --- a/src/assets/styles/pages/webrings.css +++ b/src/assets/styles/pages/webrings.css @@ -1,7 +1,15 @@ .webring-wrapper { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + text-align: center; margin: var(--margin-vertical-base-horizontal-zero); & .webring-navigation { + display: flex; + align-items: center; + justify-content: center; gap: var(--spacing-sm); & a { diff --git a/src/includes/partials/blocks/avatar.liquid b/src/includes/partials/blocks/avatar.liquid index e74146cc..dda934f4 100644 --- a/src/includes/partials/blocks/avatar.liquid +++ b/src/includes/partials/blocks/avatar.liquid @@ -1,4 +1,4 @@ -
+
{%- if updated -%} -

This page was last updated on {{ updated | strip }}.

+

This page was last updated on {{ updated | strip }}.

{%- endif -%} -