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 }}
|
||||
|
||||
{{ 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">
|
||||
|
@ -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">
|
||||
|
@ -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
Loading…
Reference in New Issue
Block a user