diff options
| author | Eltrac <hi@guhub.cn> | 2024-12-22 16:54:54 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2024-12-22 16:54:54 +0800 |
| commit | 2fe905e9ea22f2d1d3b84a7845e00e0e0e261906 (patch) | |
| tree | ad7a1aef317c6ad0a5113116ff4634695a50cae5 | |
| parent | bb55feb0a30eb40b52ef0c3403bcb86acba80364 (diff) | |
feat: add subscribe link for individual category
| -rw-r--r-- | assets/css/index.css | 18 | ||||
| -rw-r--r-- | layouts/_default/term.html | 6 |
2 files changed, 22 insertions, 2 deletions
diff --git a/assets/css/index.css b/assets/css/index.css index 2c652fef..3345cba7 100644 --- a/assets/css/index.css +++ b/assets/css/index.css @@ -393,12 +393,13 @@ ul { padding: 0.5rem 1rem; border-radius: 1rem; width: fit-content; - margin: 2rem auto + margin: 2rem auto; + margin-bottom: 0; } .termlist-title::before, .termlist-title::after { - margin: 0.5rem; + margin: 0.5rem 0; color: var(--secondary-text-color); font-size: 0.75em } @@ -411,6 +412,19 @@ ul { content: "》"; } +.termlist-subscribe { + text-align: center; + font-size: .9rem +} + +.termlist-subscribe a { + color: var(--secondary-text-color) +} + +.termlist-subscribe a:hover { + text-decoration: none +} + /* category page */ section.taxonomy { diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 58456393..0e4d5798 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -2,6 +2,12 @@ <article class="posts"> {{ partial "header.html" . }} <h1 class="termlist-title">{{.Data.Term}}</h1> + <p class="termlist-subscribe"> + <a href="/categories/{{.Data.Term | urlize}}/index.xml" target="_blank" title="RSS"> + <img src="/rss.svg" style="width:.9rem;height:.9rem" /> + 单独订阅这个系列 + </a> + </p> <div id="posts-list"> {{ range .Pages }} <div class="row posts-line"> |
