mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-11-14 12:25: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 }}
|
||||||
{{ if .Params.UseRelativeCover }}
|
<figure class="post-cover">
|
||||||
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}" class="post-cover" />
|
{{ if .Params.UseRelativeCover }}
|
||||||
{{ else }}
|
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}" />
|
||||||
<img src="{{ .Params.Cover | absURL }}" class="post-cover" />
|
{{ else }}
|
||||||
{{ end }}
|
<img src="{{ .Params.Cover | absURL }}" />
|
||||||
|
{{ 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 }}
|
||||||
{{ if .Params.UseRelativeCover }}
|
<figure class="post-cover">
|
||||||
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}" class="post-cover" />
|
{{ if .Params.UseRelativeCover }}
|
||||||
{{ else }}
|
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}" />
|
||||||
<img src="{{ .Params.Cover | absURL }}" class="post-cover" />
|
{{ else }}
|
||||||
{{ end }}
|
<img src="{{ .Params.Cover | absURL }}" />
|
||||||
|
{{ 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