Add date to posts

This commit is contained in:
Lukas Joswiak 2020-05-15 00:43:44 -07:00
parent 3e882d86e6
commit 9e0a8f73d9
3 changed files with 31 additions and 7 deletions

View file

@ -1,6 +1,9 @@
{{ define "main" }}
<article>
<header id="post-title"><h1>{{ .Title }}</h1></header>
<header id="post-header">
<h1>{{ .Title }}</h1>
<time>{{ .Date.Format "January 2, 2006" }}</time>
</header>
{{- .Content -}}
</article>
{{ end }}

View file

@ -109,6 +109,7 @@ main#content h4,
main#content h5,
main#content h6 {
margin-bottom: 0;
line-height: 1.15;
}
main#content h1 + p,
@ -145,6 +146,12 @@ main#content ul#posts small {
margin-left: 10px;
}
@media (prefers-color-scheme: dark) {
main#content ul#posts small {
color: #a7a7a7;
}
}
main#content ul#posts li a {
text-decoration: none;
}
@ -164,9 +171,23 @@ main#content ul#posts li a:hover small {
}
/* single.html styles */
main#content header#post-title {
font-size: 16px;
font-size: 1.6rem;
main#content header#post-header h1 {
display: block;
font-size: 23px;
font-size: 2.3rem;
line-height: 1.15;
}
main#content header#post-header time {
display: block;
font-size: 0.85em;
color: #767676;
}
@media (prefers-color-scheme: dark) {
main#content header#post-header time {
color: #a7a7a7;
}
}
main#content img {

View file

@ -20,9 +20,9 @@ main#content ul#posts {
}
/* single.html styles */
main#content header#post-title {
font-size: 20px;
font-size: 2rem;
main#content header#post-header h1 {
font-size: 26px;
font-size: 2.6rem;
}
main#content img {