summaryrefslogtreecommitdiff
path: root/assets/css/components/_taxonomy.scss
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-04-16 23:24:53 +0800
committerEltrac <hi@guhub.cn>2025-04-16 23:24:53 +0800
commitbd2a14f400a2ebbb0de0bb1e152f8c3ff9ff20ed (patch)
tree002c635e664b7adfbc3197e7fa74caa6f5bc2bbd /assets/css/components/_taxonomy.scss
parent039f7f02e0baf2916e5776eb54ee3c9952cf24f9 (diff)
feat: better category page
Diffstat (limited to 'assets/css/components/_taxonomy.scss')
-rw-r--r--assets/css/components/_taxonomy.scss77
1 files changed, 77 insertions, 0 deletions
diff --git a/assets/css/components/_taxonomy.scss b/assets/css/components/_taxonomy.scss
new file mode 100644
index 00000000..b13f3ac5
--- /dev/null
+++ b/assets/css/components/_taxonomy.scss
@@ -0,0 +1,77 @@
+.taxonomy {
+ margin: 2rem auto;
+ .taxonomy-categories {
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
+ grid-template-rows: masonry;
+ gap: 1rem;
+ .taxonomy-categories-item {
+ ul.category-articles {
+ padding-inline-start: 1.5rem;
+ list-style-type: square;
+ }
+ a.category-link {
+ @include small-button;
+ font-size: 0.9rem
+ }
+ h3.category-title {
+ a:hover {
+ text-decoration: none;
+ }
+ span {
+ display: inline-block;
+ }
+ &:hover span {
+ animation: bounce 0.5s ease-in-out;
+ }
+ @keyframes bounce {
+ 0%, 20%, 50%, 80%, 100% {
+ transform: translateY(0);
+ }
+ 40% {
+ transform: translateY(-7px)
+ rotate(5deg)
+ scale(1.1);
+ }
+ 60% {
+ transform: translateY(-5px) rotate(-3deg);
+ }
+ }
+ }
+ }
+ }
+
+ .taxonomy-tags {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 0.5rem;
+
+ .taxonomy-tags-item {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.3rem;
+
+ padding: 0.25rem 0.75rem;
+ background-color: var(--block-background-color);
+ transition:
+ color,
+ background 0.3s;
+ border-radius: 0.3rem;
+
+ &:hover {
+ text-decoration: none;
+ background-color: var(--text-color);
+ color: var(--block-background-color);
+ }
+
+ .tag-count {
+ font-size: 0.8rem;
+ color: var(--secondary-text-color);
+ }
+ }
+ }
+
+ .taxonomy-description hr {
+ margin: 0.5rem 0;
+ }
+}