post-cover: add support for adding caption (#17)
* shown only on single page usage => in page-vars front-matter cover: image: '<image path/url>' alt: '<alt text>' caption: '<text>'
This commit is contained in:
parent
3068647f58
commit
35788daad1
|
@ -88,9 +88,15 @@
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.entry-cover {
|
||||||
|
margin-bottom: var(--gap);
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
color: var(--secondary);
|
||||||
|
}
|
||||||
|
|
||||||
.entry-cover img {
|
.entry-cover img {
|
||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
margin-bottom: var(--gap);
|
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
{{- else}}
|
{{- else}}
|
||||||
<img src="{{ .Permalink -}} {{- .Params.cover.image }}" alt="{{ .Params.cover.alt | plainify }}">
|
<img src="{{ .Permalink -}} {{- .Params.cover.image }}" alt="{{ .Params.cover.alt | plainify }}">
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
<p>{{.Params.cover.caption}}</p>
|
||||||
</figure>
|
</figure>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Params.ShowToc }}
|
{{- if .Params.ShowToc }}
|
||||||
|
|
Loading…
Reference in New Issue