Update cover styling and show the cover caption also on the list of contents

This commit is contained in:
panr 2020-07-07 18:56:33 +02:00
parent d4d477e3b6
commit c08fe10125
4 changed files with 24 additions and 12 deletions

View File

@ -37,11 +37,17 @@
{{ end }}
{{ if .Params.Cover }}
{{ if .Params.UseRelativeCover }}
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}" class="post-cover" />
{{ else }}
<img src="{{ .Params.Cover | absURL }}" class="post-cover" />
{{ end }}
<figure class="post-cover">
{{ if .Params.UseRelativeCover }}
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}" />
{{ else }}
<img src="{{ .Params.Cover | absURL }}" />
{{ end }}
{{ if .Params.CoverCaption }}
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
{{ end }}
</figure>
{{ end }}
<div class="post-content">

View File

@ -28,11 +28,17 @@
{{ end }}
{{ if .Params.Cover }}
{{ if .Params.UseRelativeCover }}
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}" class="post-cover" />
{{ else }}
<img src="{{ .Params.Cover | absURL }}" class="post-cover" />
{{ end }}
<figure class="post-cover">
{{ if .Params.UseRelativeCover }}
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}" />
{{ else }}
<img src="{{ .Params.Cover | absURL }}" />
{{ end }}
{{ if .Params.CoverCaption }}
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
{{ end }}
</figure>
{{ end }}
<div class="post-content">

View File

@ -51,12 +51,12 @@
}
&-cover {
border-radius: 8px;
margin: 40px -50px;
width: 860px;
max-width: 860px;
img {
border-radius: 8px;
box-shadow: 0 12px 40px rgba(0, 0, 0, .15);
}

File diff suppressed because one or more lines are too long