mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-11-24 16:55:07 +01:00
Update cover styling and show the cover caption also on the list of contents
This commit is contained in:
parent
d4d477e3b6
commit
c08fe10125
@ -37,11 +37,17 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if .Params.Cover }}
|
{{ if .Params.Cover }}
|
||||||
|
<figure class="post-cover">
|
||||||
{{ if .Params.UseRelativeCover }}
|
{{ if .Params.UseRelativeCover }}
|
||||||
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}" class="post-cover" />
|
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}" />
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<img src="{{ .Params.Cover | absURL }}" class="post-cover" />
|
<img src="{{ .Params.Cover | absURL }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Params.CoverCaption }}
|
||||||
|
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
||||||
|
{{ end }}
|
||||||
|
</figure>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
|
@ -28,11 +28,17 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if .Params.Cover }}
|
{{ if .Params.Cover }}
|
||||||
|
<figure class="post-cover">
|
||||||
{{ if .Params.UseRelativeCover }}
|
{{ if .Params.UseRelativeCover }}
|
||||||
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}" class="post-cover" />
|
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}" />
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<img src="{{ .Params.Cover | absURL }}" class="post-cover" />
|
<img src="{{ .Params.Cover | absURL }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Params.CoverCaption }}
|
||||||
|
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
||||||
|
{{ end }}
|
||||||
|
</figure>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
|
@ -51,12 +51,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&-cover {
|
&-cover {
|
||||||
border-radius: 8px;
|
|
||||||
margin: 40px -50px;
|
margin: 40px -50px;
|
||||||
width: 860px;
|
width: 860px;
|
||||||
max-width: 860px;
|
max-width: 860px;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
border-radius: 8px;
|
||||||
box-shadow: 0 12px 40px rgba(0, 0, 0, .15);
|
box-shadow: 0 12px 40px rgba(0, 0, 0, .15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user