aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Cleberg <hello@cleberg.net>2025-06-03 16:21:27 -0500
committerChristian Cleberg <hello@cleberg.net>2025-06-03 16:21:27 -0500
commit1180b9f0c3224534732c29b3023d0b5f0c34a2f0 (patch)
tree68714c1778ad89137187f98f3f9ebaf49496cb56
parent6ea755771f373fbe80e91c4460a523118e8e737a (diff)
downloadcleberg.net-1180b9f0c3224534732c29b3023d0b5f0c34a2f0.tar.gz
cleberg.net-1180b9f0c3224534732c29b3023d0b5f0c34a2f0.tar.bz2
cleberg.net-1180b9f0c3224534732c29b3023d0b5f0c34a2f0.zip
feat(blog): show filetags on blog roll
-rw-r--r--theme/static/styles.css27
-rw-r--r--theme/templates/blog.html11
-rw-r--r--theme/templates/post.html2
3 files changed, 38 insertions, 2 deletions
diff --git a/theme/static/styles.css b/theme/static/styles.css
index 54e34ed..d21b23f 100644
--- a/theme/static/styles.css
+++ b/theme/static/styles.css
@@ -525,6 +525,33 @@ span.tag::before {
display: none;
}
+.post {
+ display: flex;
+ flex-direction: row;
+ margin-bottom: 1rem;
+}
+
+.post-content {
+ display: flex;
+ flex-direction: column;
+}
+
+.post-tags {
+ font-size: 0.75rem;
+ color: #999;
+ margin-top: 0.1rem;
+}
+
+.tag {
+ margin-right: 0.3rem;
+ font-style: normal;
+ opacity: 0.8;
+}
+
+.tag::before {
+ content: "#";
+}
+
@media (prefers-color-scheme: dark) {
:root {
--bg: #141617;
diff --git a/theme/templates/blog.html b/theme/templates/blog.html
index aa2566c..ff09d37 100644
--- a/theme/templates/blog.html
+++ b/theme/templates/blog.html
@@ -13,6 +13,15 @@ main %}
<time datetime='{{ post.date | strftime("%Y-%m-%d") }}'
>{{ post.date|strftime("%Y-%m-%d") }}</time
>
- <a href='{{ url_for("blog", slug=post.slug) }}'>{{ post.title }}</a>
+ <div class="post-content">
+ <a href='{{ url_for("blog", slug=post.slug) }}'>{{ post.title }}</a>
+ {% if post.filetags %}
+ <div class="post-tags">
+ {% for tag in post.filetags %}
+ <span class="tag">{{ tag }}</span>
+ {% endfor %}
+ </div>
+ {% endif %}
+ </div>
</div>
{% endfor %} {% endblock %}
diff --git a/theme/templates/post.html b/theme/templates/post.html
index fe38bc1..b7f059d 100644
--- a/theme/templates/post.html
+++ b/theme/templates/post.html
@@ -15,7 +15,7 @@
>&lt;{{ post.date|strftime("%Y-%m-%d %a %H:%M:%S") }}&gt;</time
>
{% endif %} {% if post.filetags %}
- <p class="tags">
+ <p class="post-tags">
{% for tag in post.filetags %}
<span class="tag">{{ tag }}</span>
{% endfor %}