mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
Add [future]/[expired] to future/expired posts
Implements adityatelange/hugo-PaperMod#1119
This commit is contained in:
parent
d3d90be8a4
commit
2a4275686c
@ -81,7 +81,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.entry-cover,
|
.entry-cover,
|
||||||
.entry-isdraft {
|
.entry-isdraft,
|
||||||
|
.entry-isfuture,
|
||||||
|
.entry-isexpired {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: var(--secondary);
|
color: var(--secondary);
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,8 @@
|
|||||||
<h2>
|
<h2>
|
||||||
{{- .Title }}
|
{{- .Title }}
|
||||||
{{- if .Draft }}<sup><span class="entry-isdraft"> [draft]</span></sup>{{- end }}
|
{{- if .Draft }}<sup><span class="entry-isdraft"> [draft]</span></sup>{{- end }}
|
||||||
|
{{- if and (not .Date.IsZero) (gt (time .Date) now) }}<sup><span class="entry-isfuture"> [future]</span></sup>{{- end }}
|
||||||
|
{{- if and (not .ExpiryDate.IsZero) (gt now (time .ExpiryDate)) }}<sup><span class="entry-isexpired"> [expired]</span></sup>{{- end }}
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
{{- if (ne (.Param "hideSummary") true) }}
|
{{- if (ne (.Param "hideSummary") true) }}
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
<h1 class="post-title">
|
<h1 class="post-title">
|
||||||
{{ .Title }}
|
{{ .Title }}
|
||||||
{{- if .Draft }}<sup><span class="entry-isdraft"> [draft]</span></sup>{{- end }}
|
{{- if .Draft }}<sup><span class="entry-isdraft"> [draft]</span></sup>{{- end }}
|
||||||
|
{{- if and (not .Date.IsZero) (gt (time .Date) now) }}<sup><span class="entry-isfuture"> [future]</span></sup>{{- end }}
|
||||||
|
{{- if and (not .ExpiryDate.IsZero) (gt now (time .ExpiryDate)) }}<sup><span class="entry-isexpired"> [expired]</span></sup>{{- end }}
|
||||||
</h1>
|
</h1>
|
||||||
{{- if .Description }}
|
{{- if .Description }}
|
||||||
<div class="post-description">
|
<div class="post-description">
|
||||||
|
Loading…
Reference in New Issue
Block a user