Skip to content

Commit 17032db

Browse files
authored
Improve blog post metadata rendering (#357)
- Use secondary dark for all text - Use FontAwesome instead of custom SVG icons - Render tag pages by enabling page kind `term`
1 parent 039e8cd commit 17032db

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

assets/theme-css/posts.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ div.post-list {
77
color: var(--pst-color-text-base) !important;
88
}
99

10+
.post-meta {
11+
color: var(--colorSecondaryDark);
12+
}
13+
1014
.post-list article {
1115
padding-top: 1.5rem;
1216
}
@@ -17,16 +21,15 @@ div.post-list {
1721
}
1822

1923
.post-author {
20-
color: var(--colorSecondaryDark);
2124
display: inline;
2225
}
2326

2427
.post-author:not(:first-child):before {
2528
content: ", ";
2629
}
2730

28-
.post-list .post-date {
29-
color: var(--colorSecondaryDark);
31+
.post-date {
32+
padding-left: 0.5rem;
3033
}
3134

3235
.post-list .post-summary {

doc/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ languageCode: "en-us"
33
title: "Scientific Python Hugo Theme documentation"
44
theme: scientific-python-hugo-theme
55
relativeURLs: true
6-
disableKinds: ["term", "taxonomy"]
6+
disableKinds: ["taxonomy"]
77

88
markup:
99
highlight:

layouts/partials/posts/meta.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<div class="post-meta">
22
<span class="post-authors">
33
{{- range .Params.author -}}
4-
<div class="post-author">{{ partial "svg-icon" "person" }} {{ . }}</div>
4+
<div class="post-author"><i class="fa-solid fa-user"></i> {{ . }}</div>
55
{{- end -}}
66
</span>
77
{{ if .Date }}
8-
<span class="post-date">{{ partial "svg-icon" "calendar" }} {{.Date.Format "January 2, 2006"}}</span>
8+
<span class="post-date"><i class="fa-regular fa-calendar"></i> {{.Date.Format "January 2, 2006"}}</span>
99
{{ end }}
1010
{{- if .Params.tags -}}
1111
<div class="post-tags">
12-
{{ partial "svg-icon" "tag" }}
12+
<i class="fa-solid fa-tag"></i>
1313
{{- range .Params.tags -}}
1414
{{- $tag := lower . }}
1515
<span class="post-tag"><a href="{{ path.Join "/tags/" $tag | relURL }}">#{{ $tag }}</a></span>

0 commit comments

Comments
 (0)