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);
|
margin-block-end: var(--space-xl);
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-summary__date {
|
> hgroup {
|
||||||
color: var(--text-color-secondary);
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-summary__title {
|
|
||||||
font-size: var(--text-l);
|
|
||||||
line-height: 1;
|
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 {
|
a {
|
||||||
color: var(--text-color-body);
|
color: var(--text-color-body);
|
||||||
|
@ -43,17 +46,7 @@
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-summary__date,
|
> .tag {
|
||||||
.page-summary__draft {
|
|
||||||
font-size: var(--text-s);
|
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">
|
<article class="page-summary">
|
||||||
<header class="page-summary__heading">
|
<hgroup>
|
||||||
<h2 class="page-summary__title"><a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a></h2>
|
<h2><a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a></h2>
|
||||||
</header>
|
{{ if and (.Params.rendersSummary | default true) -}}
|
||||||
{{ if (.Params.rendersSummary | default true) -}}
|
{{ with .Description }}
|
||||||
{{ with .Description }}
|
<p>{{ . | markdownify }}</p>
|
||||||
<div class="page-summary__content">{{ . | markdownify }}</div>
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
</hgroup>
|
||||||
|
{{- if .Date -}}
|
||||||
|
{{- partial "page/date.html" (dict "page" .) -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if ne hugo.Environment "production" -}}
|
{{- if ne hugo.Environment "production" -}}
|
||||||
{{ partial "page/taxonomy_draft.html" (dict "page" . "class" "page-summary__draft") }}
|
{{ partial "page/taxonomy_draft.html" (dict "page" .) }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if .Date -}}
|
{{ partial "page/taxonomy_list.html" (dict "page" . "taxonomy" "categories") }}
|
||||||
{{- partial "page/date.html" (dict "page" . "class" "page-summary__date") -}}
|
{{ partial "page/taxonomy_list.html" (dict "page" . "taxonomy" "tags") }}
|
||||||
{{- end }}
|
|
||||||
</article>
|
</article>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue