Clean up page summary and update styles

This commit is contained in:
Eryn Wells 2024-07-23 09:04:22 -07:00
parent 234acb08b8
commit 0cfc91d26e
2 changed files with 32 additions and 18 deletions

View file

@ -1,16 +1,13 @@
<article class="page-summary">
<header>
<h2 class="page-summary__title">{{ .Title }}</h2>
{{ with .Params.subtitle | default .Description | markdownify }}
<p class="page-summary__subtitle">{{ . }}</p>
{{ end }}
<header class="page-summary__heading">
<h2 class="page-summary__title"><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></h2>
</header>
{{ if (.Params.rendersSummary | default true) -}}
<div class="page-summary__content">
{{ .Summary }}
</div>
{{ with .Description }}
<div class="page-summary__content">{{ . | markdownify }}</div>
{{ end }}
{{- end }}
<footer class="page-summary__footer">
<a href="{{ .RelPermalink }}">More →</a>
</footer>
{{ with .Date }}
<time class="page-summary__date" datetime="{{ . | time.Format "2006-01-02" }}">{{ . | time.Format ":date_medium" }}</time>
{{ end }}
</article>