diff options
author | Huy Tran <hoang.huy.tran@gmail.com> | 2020-11-23 02:30:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-23 02:30:32 +0300 |
commit | 50558ed9bb03d3d8e84ddcb1b76b8f582e388308 (patch) | |
tree | 718cf8956ac143358d0ea4aa869ad2192d34b509 | |
parent | 16f781c2895871e2fac2fe0b21122e5a9af0c104 (diff) | |
parent | f582250eeca0be1a0e67453d29af15cc09f3db4d (diff) |
Merge pull request #92 from MarcoIeni/master
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"> |