post: display the postimage if it exists
Co-Authored-by: iGor milhit <igor@milhit.ch>merge-requests/5/merge
parent
9ac94f1d5c
commit
7bba092f68
|
@ -5,13 +5,16 @@
|
|||
///////////////////
|
||||
|
||||
.post-header {
|
||||
margin: 1rem 0 .5rem 0;
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.post-image {
|
||||
width: 100%;
|
||||
border-radius: .2rem;
|
||||
}
|
||||
|
||||
.post-info {
|
||||
font-size: $font-size-small;
|
||||
color: $snow-storm-light-grey;
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{{ define "main" }}
|
||||
<header class="post-header">
|
||||
{{ if .Params.postimage -}}
|
||||
<img class="post-image"
|
||||
src="/images/{{ .Params.postimage }}"
|
||||
alt="{{ .Params.postimagedescription }}">
|
||||
{{ end }}
|
||||
<h1 id="title">{{ .Title }}</h1>
|
||||
{{- partial "post-info.html" . -}}
|
||||
</header>
|
||||
|
|
Loading…
Reference in New Issue