Add coverCaption
This commit is contained in:
parent
bc1a483ef0
commit
0091c33d92
2 changed files with 18 additions and 6 deletions
|
@ -14,6 +14,16 @@
|
||||||
<article>
|
<article>
|
||||||
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
|
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
|
||||||
|
|
||||||
|
{{ if .Params.Cover }}
|
||||||
|
<figure class="post-cover">
|
||||||
|
<img src="{{ .Params.Cover | absURL }}" alt="{{ .Title }}" />
|
||||||
|
|
||||||
|
{{ if .Params.CoverCaption }}
|
||||||
|
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
||||||
|
{{ end }}
|
||||||
|
</figure>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ if .Params.toc }}
|
{{ if .Params.toc }}
|
||||||
<hr />
|
<hr />
|
||||||
<aside id="toc">
|
<aside id="toc">
|
||||||
|
@ -23,10 +33,6 @@
|
||||||
<hr />
|
<hr />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with .Params.Cover }}
|
|
||||||
<img src="{{ . | relURL }}" class="post-cover" />
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -26,8 +26,14 @@
|
||||||
<div class="post-excerpt">{{ . }}</div>
|
<div class="post-excerpt">{{ . }}</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with .Params.Cover }}
|
{{ if .Params.Cover }}
|
||||||
<img src="/{{ . }}" class="post-cover" />
|
<figure class="post-cover">
|
||||||
|
<img src="{{ .Params.Cover | absURL }}" alt="{{ .Title }}" />
|
||||||
|
|
||||||
|
{{ if .Params.CoverCaption }}
|
||||||
|
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
||||||
|
{{ end }}
|
||||||
|
</figure>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- if .Params.toc }}
|
{{- if .Params.toc }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue