Add image processing to missing components + Update examples
This commit is contained in:
parent
94138f89f0
commit
7317ba53de
26 changed files with 171 additions and 111 deletions
|
@ -3,13 +3,14 @@
|
|||
<div class="card">
|
||||
<div class="card-head d-flex">
|
||||
{{ if .logo }}
|
||||
{{ $logoImage := resources.Get .logo }}
|
||||
|
||||
{{ $logoImage:= resources.Get .logo}}
|
||||
{{ if $logoImage }}
|
||||
{{ $logoImage := $logoImage.Fit "24x24" }}
|
||||
{{/* 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 }}
|
||||
<img class="card-img-xs" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
|
||||
{{ end }}
|
||||
<h5 class="card-title">{{ .name }}</h5>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue