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">
|
||||
{{ if .logo }}
|
||||
|
||||
{{ $logoImage:= resources.Get .logo}}
|
||||
{{ if $logoImage }}
|
||||
{{/* svg don't support "Fit" operation */}}
|
||||
{{ if ne $logoImage.MediaType.SubType "svg" }}
|
||||
{{ $logoImage = $logoImage.Fit "24x24" }}
|
||||
{{ end }}
|
||||
{{ if eq (len (findRE ".*/.*" .logo) ) 0 }}
|
||||
|
||||
<i style="padding-right: 0.25em" class="{{.logo}} h4"></i>
|
||||
|
||||
{{ else }}
|
||||
|
||||
{{ $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 }}
|
||||
|
||||
<h5 class="card-title mb-0">{{ .name }}</h5>
|
||||
</div>
|
||||
<div class="sub-title">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue