diff options
| author | Eltrac <hi@guhub.cn> | 2025-02-02 21:38:33 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-02-02 21:38:33 +0800 |
| commit | 633ed98ce80185fb7cb1f2fe751c1c359398b533 (patch) | |
| tree | 1a08b87dd2cd2c64e015fea56d80fe060289fe16 /assets/css/components | |
| parent | 4b154e28516b51182b186f04348ea92901363005 (diff) | |
feat(theme): shorter index page
show only current year's posts on index page; show all posts in /posts with folded sections
Diffstat (limited to 'assets/css/components')
| -rw-r--r-- | assets/css/components/_pages.scss | 53 | ||||
| -rw-r--r-- | assets/css/components/_utility.scss | 4 |
2 files changed, 56 insertions, 1 deletions
diff --git a/assets/css/components/_pages.scss b/assets/css/components/_pages.scss index c7d679de..503af72e 100644 --- a/assets/css/components/_pages.scss +++ b/assets/css/components/_pages.scss @@ -1,6 +1,6 @@ /* posts list */ -#posts-list { +.posts-list { min-height: 600px; & > section:nth-child(1) > ul:nth-child(3) > li.first-post > div > div.posts-title.col-xs-9.col-sm-10 > div { @@ -236,3 +236,54 @@ section.taxonomy { display: none; } } + +/* posts archive */ + +#posts-archive { + @mixin section-title { + display: flex; + justify-content: space-between; + align-items: center; + small { + color: var(--secondary-text-color); + font-size: .8rem; + } + } + + .posts-year-archive { + .posts-year-title { + border-bottom: 2px solid var(--border-color); + padding: .5rem 0; + font-size: 1.5rem; + @include section-title; + } + } + + .posts-month-archive { + summary { + list-style: none; + + .posts-month-title { + font-size: 1.1rem; + border-bottom: 1px dashed var(--border-color); + display: inline-block; + width: 100%; + padding: 0.5rem 0.25rem; + margin: 0; + @include section-title; + } + } + } +} + +#previous-post-link { + display: block; + width: fit-content; + margin: 2rem auto; + + &::before, &::after { + content: "-"; + margin: 0 0.5rem; + text-decoration: none; + } +} diff --git a/assets/css/components/_utility.scss b/assets/css/components/_utility.scss index f247c850..a9907339 100644 --- a/assets/css/components/_utility.scss +++ b/assets/css/components/_utility.scss @@ -46,3 +46,7 @@ figure { margin: 0 -10rem; } } + +.font-mono { + font-family: var(--mono-font-family); +} |
