Skip to content

Commit

Permalink
Update .category-list-count style
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Apr 17, 2024
1 parent 6bf97f6 commit 3d34a11
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 43 deletions.
11 changes: 2 additions & 9 deletions source/css/_common/components/pages/categories.styl
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,8 @@
}

.category-list-count {
color: $grey;

&::before {
content: ' (';
}

&::after {
content: ') ';
}
font-size: $font-size-smallest;
badge();
}

.category-list-child {
Expand Down
3 changes: 1 addition & 2 deletions source/css/_common/outline/header/menu.styl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
}

.badge {
font-weight: bold;
line-height: 1;
badge();
}
}

Expand Down
11 changes: 11 additions & 0 deletions source/css/_mixins.styl
Original file line number Diff line number Diff line change
Expand Up @@ -281,3 +281,14 @@ menu-item-row() {
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;
}
9 changes: 0 additions & 9 deletions source/css/_schemes/Mist/_menu.styl
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,5 @@
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);
}
}
}
7 changes: 0 additions & 7 deletions source/css/_schemes/Muse/_menu.styl
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,4 @@
width: 100%;
}
}

.badge {
background: $gainsboro;
color: $black-light;
margin-left: .35em;
padding: 1px 4px;
}
}
8 changes: 0 additions & 8 deletions source/css/_schemes/Pisces/_menu.styl
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@
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')) {
Expand Down
4 changes: 4 additions & 0 deletions source/css/_variables/Mist.styl
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ $btn-default-hover-bg = transparent;
$btn-default-border-color = var(--link-color);
$btn-default-hover-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);
22 changes: 14 additions & 8 deletions source/css/_variables/Pisces.styl
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,19 @@ $site-state-item-name-color = $grey-dark;
// --------------------------------------------------

// Button
$btn-default-radius = 2px;
$btn-default-bg = white;
$btn-default-color = $text-color;
$btn-default-border-color = $text-color;
$btn-default-hover-bg = $black-deep;
$btn-default-hover-color = white;
$btn-default-radius = 2px;
$btn-default-bg = white;
$btn-default-color = $text-color;
$btn-default-border-color = $text-color;
$btn-default-hover-bg = $black-deep;
$btn-default-hover-color = white;

// Back to top
$b2t-opacity = .6;
$b2t-opacity-hover = .8;
$b2t-opacity = .6;
$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);
9 changes: 9 additions & 0 deletions source/css/_variables/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -387,3 +387,12 @@ $label = {
warning : lighten(spin($note-border.warning, 10), 83% + $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;

0 comments on commit 3d34a11

Please sign in to comment.