From a4d012ef5135c4a4575393309ca5014ccb3036c9 Mon Sep 17 00:00:00 2001 From: Ayo Ayco Date: Sun, 19 Jan 2025 11:39:29 +0100 Subject: [PATCH] style: adjust hashtag pills colors --- static/pills.css | 55 ++++++++++++++++++++++++++++++++++++++++ templates/_home.html | 35 +++---------------------- templates/_tag.html | 35 +++---------------------- templates/card.html | 17 +++---------- templates/tag-pills.html | 6 +++-- 5 files changed, 71 insertions(+), 77 deletions(-) create mode 100644 static/pills.css diff --git a/static/pills.css b/static/pills.css new file mode 100644 index 0000000..03fc910 --- /dev/null +++ b/static/pills.css @@ -0,0 +1,55 @@ +.featured-tags, +.tag-bar { + & .pill { + border-radius: 5px; + border: 1px solid; + border-color: rgba(197, 209, 222, 0.25); + background-color: rgba(197, 209, 222, 0.15); + margin-bottom: 0.5em; + padding: 0.25em 1em; + display: inline-block; + font-size: var(--font-size-sm); + color: var(--text-color-dark-faded); + text-decoration: none; + + &:hover { + color: var(--color-link); + border: 1px solid var(--color-link); + } + + & .pill-label { + background-color: rgba(0, 0, 0, 0.15); + border-radius: 0.5em; + padding: 0 0.25em; + margin-right: 0.25em; + font-weight: bold; + } + } +} +@media (prefers-color-scheme: dark) { + .featured-tags, + .tag-bar { + & .pill { + color: var(--text-color-light-faded); + border: 1px solid; + border-color: rgba(0, 0, 0, 0.25); + background-color: rgba(0, 0, 0, 0.15); + text-decoration: none; + + &:hover { + color: var(--color-brand-complement); + border: 1px solid var(--color-brand-complement); + } + } + } +} + +.featured-tags .pill { + color: var(--text-color-dark); +} + +@media (prefers-color-scheme: dark) { + .featured-tags .pill { + color: var(--text-color-light); + } +} diff --git a/templates/_home.html b/templates/_home.html index 714ec5a..9a22a2a 100644 --- a/templates/_home.html +++ b/templates/_home.html @@ -25,6 +25,10 @@ + + + + diff --git a/templates/_tag.html b/templates/_tag.html index 5129238..516e7ae 100644 --- a/templates/_tag.html +++ b/templates/_tag.html @@ -25,6 +25,10 @@ + + + + diff --git a/templates/card.html b/templates/card.html index 2251295..299571f 100644 --- a/templates/card.html +++ b/templates/card.html @@ -17,8 +17,8 @@ & .body { - .hashtag, - .mention { + .hashtag:not(.pill), + .mention:not(.pill) { color: var(--text-color-dark-faded); text-decoration: none; @@ -128,8 +128,8 @@ & .body { - .hashtag, - .mention { + .hashtag:not(.pill), + .mention:not(.pill) { color: var(--text-color-light-faded); text-decoration: none; @@ -158,15 +158,6 @@ } } } - - .pill { - background-color: rgba(0, 0, 0, 0.15); - color: var(--text-color-light-faded); - - &:hover { - color: var(--color-brand-complement); - } - } }
diff --git a/templates/tag-pills.html b/templates/tag-pills.html index 4bf2ea3..d367388 100644 --- a/templates/tag-pills.html +++ b/templates/tag-pills.html @@ -1,8 +1,10 @@ \ No newline at end of file