diff options
author | Somrat <37659754+somrat-gyver@users.noreply.github.com> | 2020-06-01 06:00:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-01 06:00:51 +0300 |
commit | c67408b4d406f565e2d45bb77be0c1972f776cd5 (patch) | |
tree | 67accd644aee7b0b98149e5339bba251383f23d2 | |
parent | b3bebf2ae7f3c35f6fee5d23bb8013abca1a16ee (diff) | |
parent | 8e68d2e223c493064635b3f55dd3c9d306ccf832 (diff) |
Merge pull request #2 from danielsada/patch-1
Only add image to post if the image param exists.
-rw-r--r-- | layouts/_default/single.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 14b2c4f..d662f85 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -56,6 +56,7 @@ </div><!-- .post-meta-wrapper --> </div><!-- .entry-header-inner --> </header><!-- .entry-header --> + {{if .Params.Image }} <figure class="featured-media"> <div class="featured-media-inner section-inner medium"> <img width="1200" height="769" src="{{ .Params.Image | absURL }}" @@ -63,6 +64,7 @@ sizes="(max-width: 1200px) 100vw, 1200px"> </div><!-- .featured-media-inner --> </figure><!-- .featured-media --> + {{end}} <div class="post-inner thin "> <div class="entry-content"> {{ .Content }} @@ -99,4 +101,4 @@ </div><!-- .section-inner --> </article> -{{ end }}
\ No newline at end of file +{{ end }} |