From fa74651a805b0b17aec938af25720acd4d878405 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Sat, 12 Oct 2024 16:19:51 -0700 Subject: [PATCH] fix: styles --- package-lock.json | 4 +- package.json | 2 +- src/assets/styles/base/index.css | 31 -------------- src/assets/styles/index.css | 2 +- .../styles/pages/{post.css => articles.css} | 35 +++++++++++++++- src/includes/base.liquid | 2 +- .../partials/media/watching/grid.liquid | 42 ------------------- 7 files changed, 38 insertions(+), 80 deletions(-) rename src/assets/styles/pages/{post.css => articles.css} (59%) delete mode 100644 src/includes/partials/media/watching/grid.liquid diff --git a/package-lock.json b/package-lock.json index aa0b65b0..3a55d2d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "1.0.4", + "version": "1.0.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "1.0.4", + "version": "1.0.5", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.5.0", diff --git a/package.json b/package.json index ac680863..e3099be6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "1.0.4", + "version": "1.0.5", "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 de12efd3..d919f801 100644 --- a/src/assets/styles/base/index.css +++ b/src/assets/styles/base/index.css @@ -410,37 +410,6 @@ footer { color: var(--text-color); } -/* articles */ -article { - margin-bottom: var(--spacing-base); - border-bottom: var(--border-gray); - - &:last-of-type { - border-bottom: none; - } - - h3, - &:not(:has(h3)) p { - margin-top: 0; - } - - & .post-meta { - display: flex; - align-items: center; - gap: var(--spacing-sm); - - & svg { - stroke: var(--gray-dark); - width: var(--sizing-svg-sm); - height: var(--sizing-svg-sm); - } - - & time { - color: var(--gray-dark); - font-size: var(--font-size-sm); - } - } -} /* lists */ ul, ol { diff --git a/src/assets/styles/index.css b/src/assets/styles/index.css index 1d18aca8..0c5d0897 100644 --- a/src/assets/styles/index.css +++ b/src/assets/styles/index.css @@ -21,7 +21,7 @@ @import url('./pages/feeds.css') layer(page); @import url('./pages/links.css') layer(page); @import url('./pages/music.css') layer(page); -@import url('./pages/post.css') layer(page); +@import url('./pages/articles.css') layer(page); @import url('./pages/watching.css') layer(page); @import url('./pages/webrings.css') layer(page); diff --git a/src/assets/styles/pages/post.css b/src/assets/styles/pages/articles.css similarity index 59% rename from src/assets/styles/pages/post.css rename to src/assets/styles/pages/articles.css index a01ac748..e3f84035 100644 --- a/src/assets/styles/pages/post.css +++ b/src/assets/styles/pages/articles.css @@ -1,5 +1,36 @@ -article.standalone .associated-media:last-of-type > hr { - display: none; +article { + margin-bottom: var(--spacing-base); + border-bottom: var(--border-gray); + + &:last-of-type { + border-bottom: none; + } + + &.standalone .associated-media:last-of-type > hr { + display: none; + } + + & h3, + &:not(:has(h3)) p { + margin-top: 0; + } + + & .post-meta { + display: flex; + align-items: center; + gap: var(--spacing-sm); + + & svg { + stroke: var(--gray-dark); + width: var(--sizing-svg-sm); + height: var(--sizing-svg-sm); + } + + & time { + color: var(--gray-dark); + font-size: var(--font-size-sm); + } + } } p + .associated-media, diff --git a/src/includes/base.liquid b/src/includes/base.liquid index 6f0b60dc..3365b397 100644 --- a/src/includes/base.liquid +++ b/src/includes/base.liquid @@ -47,7 +47,7 @@ {%- assign pageDescription = description -%} {%- endif -%} -{%- assign ogImage = 'https://cdn.coryd.dev/' | append: globals.avatar | append: "?class=w800" -%} +{%- assign ogImage = 'https://cdn.coryd.dev' | append: globals.avatar | append: "?class=w800" -%} {%- case schema -%} {%- when 'music' -%} {%- assign ogImage = 'https://cdn.coryd.dev' | append: page.image -%} diff --git a/src/includes/partials/media/watching/grid.liquid b/src/includes/partials/media/watching/grid.liquid deleted file mode 100644 index 61a5fb2e..00000000 --- a/src/includes/partials/media/watching/grid.liquid +++ /dev/null @@ -1,42 +0,0 @@ -{%- assign pageCount = pagination.pages.size | default: 0 -%} -{%- assign hidePagination = pageCount <= 1 -%} -
- {%- for item in data limit: count -%} - {%- assign alt = item.grid.grid.alt | strip | escape -%} - -
-
- {%- if item.grid.type == 'movie' -%} -
{{ item.grid.title }}
-
- {%- if item.grid.rating -%} - {{ item.grid.rating }} - {%- endif -%} - ({{ item.grid.year }}) -
- {%- else -%} -
{{ item.grid.title }}
-
({{ item.grid.year }})
- {%- endif -%} -
- {%- assign loadingStrategy = loading | default: 'lazy' -%} - {{ alt }} -
-
- {%- endfor -%} -
-{%- unless hidePagination -%} - {% render "partials/nav/paginator.liquid", pagination:pagination %} -{%- endunless -%} \ No newline at end of file