Update layout to use Hugo Image Processing.

Created shortcode rimg that uses the srcset attribute to display responsive images.
This commit is contained in:
Patrick Magauran 2020-11-26 13:59:15 -05:00
parent da036923f3
commit 3a77d4c703
10 changed files with 218 additions and 20 deletions

View file

@ -2,8 +2,14 @@
<a class="skill-card-link" href="{{ if .url }}{{ .url }}{{ else }}#{{ end }}">
<div class="card">
<div class="card-head d-flex">
{{ if .icon }}
<img class="card-img-xs" src="{{ .icon | relURL }}" alt="{{ .name }}" />
{{ if .logo }}
{{ $logoImage:= resources.Get .logo}}
{{ if $logoImage }}
{{ $logoImage := $logoImage.Fit "24x24" }}
<img class="card-img-xs" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
{{ end }}
{{ end }}
<h5 class="card-title">{{ .name }}</h5>
</div>