From d5f9f2a76566727b845eee2bed4cd91d4dcec526 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 14 Oct 2022 14:30:35 -0700 Subject: [PATCH] Overhaul the look of tags; integrate a category and a cute little triangle --- content/blog/blog.css | 54 +++++++++++++++++++++---------- layouts/partials/single_main.html | 22 ++++++++++--- static/styles/root.css | 10 ++++++ 3 files changed, 65 insertions(+), 21 deletions(-) diff --git a/content/blog/blog.css b/content/blog/blog.css index 7d6e90b..ca45c0b 100644 --- a/content/blog/blog.css +++ b/content/blog/blog.css @@ -1,18 +1,20 @@ :root { --post-item-highlight-color: #efefef; - --tag-text-color: #666; - --tag-background-color: #eee; - --tag-hover-background-color: #bbb; + --tag-foreground-color: rgb(var(--super-dk-gray)); + --tag-background-color: rgb(var(--super-lt-gray)); + --tag-spacer-foreground-color: rgb(var(--super-dk-gray)); + --tag-hover-background-color: rgb(var(--sub-lt-gray)); } @media (prefers-color-scheme: dark) { :root { --post-item-highlight-color: #121212; - --tag-text-color: #888; - --tag-background-color: rgb(40, 40, 40); - --tag-hover-background-color: rgb(73, 73, 73); - --tag-hover-foreground-color: #666; + --tag-foreground-color: rgb(var(--sub-lt-gray)); + --tag-background-color: rgb(var(--dk-gray)); + --tag-spacer-foreground-color: rgb(var(--super-dk-gray)); + --tag-hover-background-color: rgb(var(--super-dk-gray)); + --tag-hover-foreground-color: rgb(var(--mid-gray)); } } @@ -32,36 +34,54 @@ margin-block-start: 3.5rem; } -.blog footer .tags { +.blog .tags { display: flex; padding-inline-start: 0; } -.blog footer .tags li { +.blog .tags li { background-color: var(--tag-background-color); + color: var(--tag-foreground-color); border-radius: 4px; display: inline-block; font-size: 75%; - letter-spacing: 2px; + letter-spacing: 1px; } -.blog footer .tags li:hover { +.blog .tags li:hover { background-color: var(--tag-hover-background-color); } -.blog footer .tags li a { - color: var(--tag-text-color); +.blog .tags li a { + color: inherit; display: block; height: 100%; width: 100%; - padding: 0.75rem 1rem; + padding: 0.6rem 1rem; } -.blog footer .tags li a:hover { +.blog .tags li a:hover { color: var(--tag-hover-foreground-color); text-decoration: none; } -.blog footer .tags li + li { - margin-inline-start: 1rem; +.blog .tags li + li { margin-inline-start: 1rem; } +.blog .tags li.chevron + li { margin-inline-start: 0 } + +.blog .tags .chevron { + align-items: center; + border: 0; + border-radius: 0; + color: var(--tag-spacer-foreground-color); + background-color: inherit; + display: flex; + justify-content: center; + margin-inline-start: 0; + padding-inline-start: 1px; + width: 2rem; +} + +.blog .tags .chevron:hover { + color: var(--tag-background-color); + background-color: inherit; } diff --git a/layouts/partials/single_main.html b/layouts/partials/single_main.html index 29326ad..a6d2299 100644 --- a/layouts/partials/single_main.html +++ b/layouts/partials/single_main.html @@ -14,11 +14,25 @@