Merge pull request #92 from MarcoIeni/master

Portfolio: load project screenshot only if defined
This commit is contained in:
Huy Tran 2020-11-23 10:30:32 +11:00 committed by GitHub
commit 50558ed9bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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">