Add awesome icon in project cards (#920)
Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
This commit is contained in:
parent
2b47657a12
commit
6f4e23ad40
1 changed files with 16 additions and 8 deletions
|
@ -9,16 +9,24 @@
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{{ if .logo }}
|
{{ if .logo }}
|
||||||
|
|
||||||
{{ $logoImage:= resources.Get .logo}}
|
{{ if eq (len (findRE ".*/.*" .logo) ) 0 }}
|
||||||
{{ if $logoImage }}
|
|
||||||
{{/* svg don't support "Fit" operation */}}
|
<i style="padding-right: 0.25em" class="{{.logo}} h4"></i>
|
||||||
{{ if ne $logoImage.MediaType.SubType "svg" }}
|
|
||||||
{{ $logoImage = $logoImage.Fit "24x24" }}
|
{{ else }}
|
||||||
{{ end }}
|
|
||||||
|
{{ $logoImage:= resources.Get .logo}}
|
||||||
|
{{ if $logoImage }}
|
||||||
|
{{/* 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 }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<img class="card-img-xs" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<h5 class="card-title mb-0">{{ .name }}</h5>
|
<h5 class="card-title mb-0">{{ .name }}</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="sub-title">
|
<div class="sub-title">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue