diff options
author | Patrick Magauran <10986886+patmagauran@users.noreply.github.com> | 2020-12-31 23:55:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-31 23:55:28 +0300 |
commit | a2b3c7fda25e651f21a5e82f7d4a285fbbd6a8e3 (patch) | |
tree | e039c41dcf41219a1b70f44c769d6339da178c11 /layouts/partials/cards/skill.html | |
parent | ba1d6014d946806f0b3fb6f1af5bd4c587144c5f (diff) |
Transition to Hugo Image Processing (#173)
* Update layout to use Hugo Image Processing.
Created shortcode rimg that uses the srcset attribute to display responsive images.
* Copy Static images to assets folder.
* Add image processing to missing components + Update examples
* Fix rendering in https://themes.gohugo.io/
Co-authored-by: Emruz Hossain <emruz@appscode.com>
Diffstat (limited to 'layouts/partials/cards/skill.html')
-rw-r--r-- | layouts/partials/cards/skill.html | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/layouts/partials/cards/skill.html b/layouts/partials/cards/skill.html index 21070b6..cba6506 100644 --- a/layouts/partials/cards/skill.html +++ b/layouts/partials/cards/skill.html @@ -2,8 +2,15 @@ <a class="skill-card-link" href="{{ if .url }}{{ .url }}{{ else }}javascript:void(0){{ 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 }} + + {{/* svg don't support "Fit" operation */}} + {{ if ne $logoImage.MediaType.SubType "svg" }} + {{ $logoImage := $logoImage.Fit "24x24" }} + {{ end }} + + <img class="card-img-xs" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" /> {{ end }} <h5 class="card-title">{{ .name }}</h5> </div> |