Add a post's category to the right of the list item
This commit is contained in:
parent
61b6f361d2
commit
e18e207530
2 changed files with 9 additions and 2 deletions
|
@ -1,5 +1,7 @@
|
||||||
:root {
|
:root {
|
||||||
--post-item-highlight-color: #efefef;
|
--post-item-highlight-color: #efefef;
|
||||||
|
|
||||||
|
--blog-list-grid-template-columns: minmax(min-content, 10vh) minmax(min-content, 3vh) auto max-content max-content;
|
||||||
}
|
}
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
:root {
|
:root {
|
||||||
|
@ -31,7 +33,7 @@
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
grid-template-columns: minmax(min-content, 10vh) minmax(min-content, 3vh) auto max-content;
|
grid-template-columns: var(--blog-list-grid-template-columns);
|
||||||
margin-block-end: 0.25rem;
|
margin-block-end: 0.25rem;
|
||||||
transition: background-color 0.25s;
|
transition: background-color 0.25s;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +49,7 @@
|
||||||
.blog.list {
|
.blog.list {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
grid-template-columns: minmax(min-content, 10vh) minmax(min-content, 3vh) auto max-content;
|
grid-template-columns: var(--blog-list-grid-template-columns);
|
||||||
}
|
}
|
||||||
.blog.list > ul {
|
.blog.list > ul {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|
|
@ -2,5 +2,10 @@
|
||||||
<time class="nobreak" datetime="{{ .Date | time.Format "2006-01-02" }}">{{ .Date | time.Format "January" }}</time>
|
<time class="nobreak" datetime="{{ .Date | time.Format "2006-01-02" }}">{{ .Date | time.Format "January" }}</time>
|
||||||
<time class="nobreak" datetime="{{ .Date | time.Format "2006-01-02" }}">{{ .Date | time.Format "2" }}</time>
|
<time class="nobreak" datetime="{{ .Date | time.Format "2006-01-02" }}">{{ .Date | time.Format "2" }}</time>
|
||||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
|
<div class="category">
|
||||||
|
{{ with index (.GetTerms "categories") 0 }}
|
||||||
|
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
{{ partial "development/draft_tag.html" . }}
|
{{ partial "development/draft_tag.html" . }}
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue