Commit 848d7c4742
848d7c4742ce0a4fcf75190f44ce57870bee8aa9
parent: e7963b42bb
Unsigned
cmc <hello@cleberg.net> · 2025-06-03 21:21 UTC
feat(blog): show filetags on blog roll
Layout: unified · split
theme/static/styles.css
+27
| @@ -525,6 +525,33 @@ span.tag::before { |
| 525 | display: none; |
525 | display: none; |
| 526 | } |
526 | } |
| 527 | |
527 | |
| |
528 | .post { |
| |
529 | display: flex; |
| |
530 | flex-direction: row; |
| |
531 | margin-bottom: 1rem; |
| |
532 | } |
| |
533 | |
| |
534 | .post-content { |
| |
535 | display: flex; |
| |
536 | flex-direction: column; |
| |
537 | } |
| |
538 | |
| |
539 | .post-tags { |
| |
540 | font-size: 0.75rem; |
| |
541 | color: #999; |
| |
542 | margin-top: 0.1rem; |
| |
543 | } |
| |
544 | |
| |
545 | .tag { |
| |
546 | margin-right: 0.3rem; |
| |
547 | font-style: normal; |
| |
548 | opacity: 0.8; |
| |
549 | } |
| |
550 | |
| |
551 | .tag::before { |
| |
552 | content: "#"; |
| |
553 | } |
| |
554 | |
| 528 | @media (prefers-color-scheme: dark) { |
555 | @media (prefers-color-scheme: dark) { |
| 529 | :root { |
556 | :root { |
| 530 | --bg: #141617; |
557 | --bg: #141617; |
theme/templates/blog.html
+10 −1
| @@ -13,6 +13,15 @@ main %} |
| 13 | <time datetime='{{ post.date | strftime("%Y-%m-%d") }}' |
13 | <time datetime='{{ post.date | strftime("%Y-%m-%d") }}' |
| 14 | >{{ post.date|strftime("%Y-%m-%d") }}</time |
14 | >{{ post.date|strftime("%Y-%m-%d") }}</time |
| 15 | > |
15 | > |
| 16 | <a href='{{ url_for("blog", slug=post.slug) }}'>{{ post.title }}</a> |
16 | <div class="post-content"> |
| |
17 | <a href='{{ url_for("blog", slug=post.slug) }}'>{{ post.title }}</a> |
| |
18 | {% if post.filetags %} |
| |
19 | <div class="post-tags"> |
| |
20 | {% for tag in post.filetags %} |
| |
21 | <span class="tag">{{ tag }}</span> |
| |
22 | {% endfor %} |
| |
23 | </div> |
| |
24 | {% endif %} |
| |
25 | </div> |
| 17 | </div> |
26 | </div> |
| 18 | {% endfor %} {% endblock %} |
27 | {% endfor %} {% endblock %} |
theme/templates/post.html
+1 −1
| @@ -15,7 +15,7 @@ |
| 15 | ><{{ post.date|strftime("%Y-%m-%d %a %H:%M:%S") }}></time |
15 | ><{{ post.date|strftime("%Y-%m-%d %a %H:%M:%S") }}></time |
| 16 | > |
16 | > |
| 17 | {% endif %} {% if post.filetags %} |
17 | {% endif %} {% if post.filetags %} |
| 18 | <p class="tags"> |
18 | <p class="post-tags"> |
| 19 | {% for tag in post.filetags %} |
19 | {% for tag in post.filetags %} |
| 20 | <span class="tag">{{ tag }}</span> |
20 | <span class="tag">{{ tag }}</span> |
| 21 | {% endfor %} |
21 | {% endfor %} |