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;
|
||||
}
|
||||
|
||||
.entry-cover {
|
||||
margin-bottom: var(--gap);
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
color: var(--secondary);
|
||||
}
|
||||
|
||||
.entry-cover img {
|
||||
border-radius: var(--radius);
|
||||
margin-bottom: var(--gap);
|
||||
pointer-events: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
{{- else}}
|
||||
<img src="{{ .Permalink -}} {{- .Params.cover.image }}" alt="{{ .Params.cover.alt | plainify }}">
|
||||
{{- end}}
|
||||
<p>{{.Params.cover.caption}}</p>
|
||||
</figure>
|
||||
{{- end }}
|
||||
{{- if .Params.ShowToc }}
|
||||
|
|
Loading…
Reference in New Issue