Use tags for date and draft in the page_summary; add taxonomies
This commit is contained in:
parent
4c689f0f5c
commit
d89f1b62b4
2 changed files with 24 additions and 29 deletions
|
@ -18,15 +18,18 @@
|
|||
margin-block-end: var(--space-xl);
|
||||
}
|
||||
|
||||
.page-summary__date {
|
||||
color: var(--text-color-secondary);
|
||||
display: block;
|
||||
}
|
||||
|
||||
.page-summary__title {
|
||||
font-size: var(--text-l);
|
||||
> hgroup {
|
||||
line-height: 1;
|
||||
margin-block: 0;
|
||||
margin-block: 0 var(--space-xs);
|
||||
|
||||
h2 {
|
||||
font-size: var(--text-l);
|
||||
margin-block: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-block-start: var(--space-xs);
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--text-color-body);
|
||||
|
@ -43,17 +46,7 @@
|
|||
font-weight: normal;
|
||||
}
|
||||
|
||||
.page-summary__date,
|
||||
.page-summary__draft {
|
||||
> .tag {
|
||||
font-size: var(--text-s);
|
||||
}
|
||||
|
||||
:is(
|
||||
.page-summary__heading,
|
||||
.page-summary__subtitle,
|
||||
.page-summary__content,
|
||||
.page-summary__date
|
||||
):not(:last-child) {
|
||||
margin-block-end: var(--space-xs);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
<article class="page-summary">
|
||||
<header class="page-summary__heading">
|
||||
<h2 class="page-summary__title"><a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a></h2>
|
||||
</header>
|
||||
{{ if (.Params.rendersSummary | default true) -}}
|
||||
{{ with .Description }}
|
||||
<div class="page-summary__content">{{ . | markdownify }}</div>
|
||||
<hgroup>
|
||||
<h2><a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a></h2>
|
||||
{{ if and (.Params.rendersSummary | default true) -}}
|
||||
{{ with .Description }}
|
||||
<p>{{ . | markdownify }}</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</hgroup>
|
||||
{{- if .Date -}}
|
||||
{{- partial "page/date.html" (dict "page" .) -}}
|
||||
{{- end }}
|
||||
{{- if ne hugo.Environment "production" -}}
|
||||
{{ partial "page/taxonomy_draft.html" (dict "page" . "class" "page-summary__draft") }}
|
||||
{{ partial "page/taxonomy_draft.html" (dict "page" .) }}
|
||||
{{- end -}}
|
||||
{{- if .Date -}}
|
||||
{{- partial "page/date.html" (dict "page" . "class" "page-summary__date") -}}
|
||||
{{- end }}
|
||||
{{ partial "page/taxonomy_list.html" (dict "page" . "taxonomy" "categories") }}
|
||||
{{ partial "page/taxonomy_list.html" (dict "page" . "taxonomy" "tags") }}
|
||||
</article>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue