Page summary view template

This commit is contained in:
Eryn Wells 2024-06-28 09:10:55 -07:00
parent bc73df76cf
commit 11a677476b
2 changed files with 21 additions and 6 deletions

View file

@ -2,24 +2,25 @@
# COMPONENT: PAGE SUMMARY
**************************/
.summary {
.page-summary {
&:not(:last-child) {
margin-block-end: var(--space-l);
}
.summary__post-title {
.page-summary__title {
margin-block: 0 var(--space-xs);
}
.summary__post-subtitle {
font-weight: 500;
.page-summary__subtitle {
font-family: var(--font-family-heading);
font-weight: normal;
}
.summary__content {
.page-summary__content {
margin-block-end: var(--space-m);
}
:is(.summary__post-title, .summary__post-subtitle):last-child {
:is(.page-summary__title, .page-summary__subtitle):last-child {
margin-block-end: var(--space-m);
}
}

View file

@ -0,0 +1,14 @@
<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>
<div class="page-summary__content">
{{ .Summary }}
</div>
<footer class="page-summary__footer">
<a href="{{ .RelPermalink }}">More →</a>
</footer>
</article>