diff options
author | MarcoIeni <marcoieni94@gmail.com> | 2020-06-06 00:54:33 +0300 |
---|---|---|
committer | MarcoIeni <marcoieni94@gmail.com> | 2020-06-06 00:54:33 +0300 |
commit | f582250eeca0be1a0e67453d29af15cc09f3db4d (patch) | |
tree | d1a061bb6a9b1c1558fdf3c05cc037cd122b8fd5 | |
parent | d0b58642c2f0e84519256db9c4d815d901cc370f (diff) |
Portfolio: load project screenshot only if defined
-rw-r--r-- | layouts/partials/portfolio/content.html | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/layouts/partials/portfolio/content.html b/layouts/partials/portfolio/content.html index fa6e286..daa3488 100644 --- a/layouts/partials/portfolio/content.html +++ b/layouts/partials/portfolio/content.html @@ -14,7 +14,9 @@ <sup><i class="fa fa-quote-right" aria-hidden="true"></i></sup> </p> <div class="project__featured-image"> - <img src="{{ .Params.screenshot }}" alt="{{ .Title }}"> + {{ if .Params.screenshot }} + <img src="{{ .Params.screenshot }}" alt="{{ .Title }}"> + {{ end }} </div> <div class="project__summary"> {{ .Content }} @@ -31,7 +33,9 @@ <div class="row"> <div class="col-md-4 col-sm-4 col-xs-12" href="{{ .Params.link }}" target="_blank" rel="noopener noreferrer"> - <img class="project__image img-responsive" src="{{ .Params.screenshot }}" alt="{{ .Title }}"> + {{ if .Params.screenshot }} + <img class="project__image img-responsive" src="{{ .Params.screenshot }}" alt="{{ .Title }}"> + {{ end }} </div> <div class="col-md-8 col-sm-8 col-xs-12"> <span class="project__title"> |