Update .category-list-count style

This commit is contained in:
Mimi 2024-04-17 12:14:19 +08:00
parent 6bf97f6e49
commit 3d34a1163f
9 changed files with 41 additions and 43 deletions

View File

@ -18,15 +18,8 @@
} }
.category-list-count { .category-list-count {
color: $grey; font-size: $font-size-smallest;
badge();
&::before {
content: ' (';
}
&::after {
content: ') ';
}
} }
.category-list-child { .category-list-child {

View File

@ -36,8 +36,7 @@
} }
.badge { .badge {
font-weight: bold; badge();
line-height: 1;
} }
} }

View File

@ -281,3 +281,14 @@ menu-item-row() {
margin-left: auto; margin-left: auto;
} }
} }
badge() {
background: $badge-background;
border-radius: $badge-border-radius;
color: $badge-color;
font-weight: bold;
line-height: 1;
margin-left: .35em;
padding: $badge-padding;
text-shadow: $badge-text-shadow;
}

View File

@ -34,14 +34,5 @@
menu-item-row(); menu-item-row();
} }
} }
.badge {
background: white;
border-radius: 10px;
color: $black-light;
margin-left: .35em;
padding: 1px 4px;
text-shadow: 1px 1px 0 rgba(0, 0, 0, .1);
}
} }
} }

View File

@ -48,11 +48,4 @@
width: 100%; width: 100%;
} }
} }
.badge {
background: $gainsboro;
color: $black-light;
margin-left: .35em;
padding: 1px 4px;
}
} }

View File

@ -19,14 +19,6 @@
display: none; display: none;
} }
} }
.badge {
background: $grey-light;
border-radius: 10px;
color: var(--content-bg-color);
padding: 2px 5px;
text-shadow: 1px 1px 0 rgba(0, 0, 0, .1);
}
} }
if (not hexo-config('menu_settings.badges')) { if (not hexo-config('menu_settings.badges')) {

View File

@ -25,3 +25,7 @@ $btn-default-hover-bg = transparent;
$btn-default-border-color = var(--link-color); $btn-default-border-color = var(--link-color);
$btn-default-hover-color = var(--link-hover-color); $btn-default-hover-color = var(--link-hover-color);
$btn-default-hover-border-color = var(--link-hover-color); $btn-default-hover-border-color = var(--link-hover-color);
$badge-background = white;
$badge-border-radius = 10px;
$badge-text-shadow = 1px 1px 0 rgba(0, 0, 0, .1);

View File

@ -67,3 +67,9 @@ $btn-default-hover-color = white;
// Back to top // Back to top
$b2t-opacity = .6; $b2t-opacity = .6;
$b2t-opacity-hover = .8; $b2t-opacity-hover = .8;
$badge-background = $grey-light;
$badge-border-radius = 10px;
$badge-color = var(--content-bg-color);
$badge-padding = 2px 5px;
$badge-text-shadow = 1px 1px 0 rgba(0, 0, 0, .1);

View File

@ -387,3 +387,12 @@ $label = {
warning : lighten(spin($note-border.warning, 10), 83% + $lbg), warning : lighten(spin($note-border.warning, 10), 83% + $lbg),
danger : lighten(spin($note-border.danger, -10), 87% + $lbg) danger : lighten(spin($note-border.danger, -10), 87% + $lbg)
}; };
// Badge colors
// --------------------------------------------------
$badge-padding = 1px 4px;
$badge-border-radius = 0;
$badge-background = $gainsboro;
$badge-color = $black-light;
$badge-text-shadow = none;