Update logic for Back Home, and also add metadata to homepage

This commit is contained in:
Evan G. 2024-05-20 10:20:24 -05:00
parent 378d0f14d6
commit 50be8a59ca
4 changed files with 16 additions and 3 deletions

View File

@ -1,4 +1,5 @@
{{ define "main" }} {{ define "main" }}
{{ partial "head.html" }}
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
{{ range .Pages.ByLastmod.Reverse }} {{ range .Pages.ByLastmod.Reverse }}
<p> <p>

View File

@ -12,6 +12,7 @@
{{ range where .Site.RegularPages "Section" "in" .Site.MainSections }} {{ range where .Site.RegularPages "Section" "in" .Site.MainSections }}
<section class="articles"> <section class="articles">
<h3><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h3> <h3><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h3>
{{ partial "metadata.html" . }}
<p class="summary">{{ .Summary }}</p> <p class="summary">{{ .Summary }}</p>
</section> </section>
{{ end }} {{ end }}

View File

@ -12,7 +12,7 @@ config change. -->
{{- end }} {{- end }}
</nav> </nav>
<h1>{{ $.Site.Title }}</h1> <h1>{{ $.Site.Title }}</h1>
{{ else if .IsPage }} {{ else }}
<a href="/">Go Home</a> <a href="/">Go Home</a>
</nav> </nav>
<p>{{ $.Site.Params.subtitle }}</p> <p>{{ $.Site.Params.subtitle }}</p>

View File

@ -25,6 +25,17 @@
text-decoration: none; text-decoration: none;
} }
.summary { .summary {
padding-left: 3.5rem; padding-left: 1.5rem;
color: #f1f3f7 color: #f1f3f7;
margin-top: 0.1rem;
}
.metadata {
padding-left: 0.5rem;
border-top-style: none;
border-bottom-style: none;
padding-bottom: 0.3rem;
}
.metadata a {
text-decoration: underline;
color: pink;
} }