hugo-theme-stack/assets/scss/partials/widgets.scss
Jacob Zhong 4be110e540
refactor(widget): taxonomy widget (#763)
* Add link to navbar sections and refactor names

* Prevent duplicate tags and categories information

* Add style to the widget links

* refactor: add `taxonomy` widget

Replaces `categories` and `tag-cloud` widget.

* style: remove unused `font_size_{{ .Count }}` in `taxonomy` widget

---------

Co-authored-by: Jimmy Cai <hi@jimmycai.com>
2023-08-27 18:26:53 +02:00

76 lines
1.6 KiB
SCSS

.widget {
display: flex;
flex-direction: column;
.widget-icon {
svg {
width: 32px;
height: 32px;
stroke-width: 1.6;
color: var(--body-text-color);
}
}
}
/* Tag cloud widget */
.tagCloud {
.tagCloud-tags {
display: flex;
flex-wrap: wrap;
gap: 10px;
a {
background: var(--card-background);
box-shadow: var(--shadow-l1);
border-radius: var(--tag-border-radius);
padding: 8px 20px;
color: var(--card-text-color-main);
font-size: 1.4rem;
transition: box-shadow 0.3s ease;
&:hover {
box-shadow: var(--shadow-l2);
}
}
}
}
/* Archives widget */
.widget.archives {
.widget-archive--list {
border-radius: var(--card-border-radius);
box-shadow: var(--shadow-l1);
background-color: var(--card-background);
}
.archives-year {
&:not(:last-of-type) {
border-bottom: 1.5px solid var(--card-separator-color);
}
a {
font-size: 1.4rem;
padding: 18px 25px;
display: flex;
span.year {
flex: 1;
color: var(--card-text-color-main);
font-weight: bold;
}
span.count {
color: var(--card-text-color-tertiary);
}
}
}
}
/* Color for widget titles */
.widget-title a.widget-link {
color: var(--accent-color);
&:hover {
color: var(--accent-color-darker);
}
}