summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-04-24 15:56:56 +0800
committerEltrac <hi@guhub.cn>2025-04-24 15:56:56 +0800
commit64b0ad0bb4ecc89844b276e9bf9e40e142162a57 (patch)
tree768212ca81eb008af29f9ec638d93e499e3806e6
parent56aeca141c37a63f70c47e354678fccc0d495553 (diff)
style: unify all category link style
-rw-r--r--assets/css/components/_post.scss8
-rw-r--r--assets/css/components/_postlist.scss7
-rw-r--r--assets/css/utils/_variables.scss10
3 files changed, 12 insertions, 13 deletions
diff --git a/assets/css/components/_post.scss b/assets/css/components/_post.scss
index 01c0deff..3c8ca39c 100644
--- a/assets/css/components/_post.scss
+++ b/assets/css/components/_post.scss
@@ -28,13 +28,7 @@
}
.post-category {
- background-color: var(--block-background-color);
- font-size: 0.9rem;
- padding: 0.2rem 0.5rem;
- border-radius: 0.2rem;
- &:hover {
- text-decoration: none;
- }
+ @include postCategoryPill;
}
}
diff --git a/assets/css/components/_postlist.scss b/assets/css/components/_postlist.scss
index 3369766e..5deae15a 100644
--- a/assets/css/components/_postlist.scss
+++ b/assets/css/components/_postlist.scss
@@ -108,12 +108,7 @@
.posts-item-category {
a {
- border: 2px solid var(--border-color);
- border-radius: 0.2rem;
- padding: 0.2rem 0.5rem;
- text-decoration: none;
- font-size: 0.8rem;
- display: inline-block;
+ @include postCategoryPill;
}
}
diff --git a/assets/css/utils/_variables.scss b/assets/css/utils/_variables.scss
index 455fa5b9..f55b5205 100644
--- a/assets/css/utils/_variables.scss
+++ b/assets/css/utils/_variables.scss
@@ -56,3 +56,13 @@ html[lang="en-US"] {
border-radius: 0.5rem;
border: 1px solid var(--border-color);
}
+
+@mixin postCategoryPill {
+ background-color: var(--block-background-color);
+ font-size: 0.9rem;
+ padding: 0.2rem 0.5rem;
+ border-radius: 0.2rem;
+ &:hover {
+ text-decoration: none;
+ }
+}