Portfolio: load project screenshot only if defined

This commit is contained in:
MarcoIeni 2020-06-05 23:54:33 +02:00
parent d0b58642c2
commit f582250eec

View file

@ -14,7 +14,9 @@
<sup><i class="fa fa-quote-right" aria-hidden="true"></i></sup>
</p>
<div class="project__featured-image">
{{ 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">
{{ 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">