Welcome to mirror list, hosted at ThFree Co, Russian Federation.

main.teaserpic.card.html « partials « layouts - github.com/it-gro/hugo-theme-w3css-basic.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7e0080b96142e1e8be4fcb2a4171fcf87c9b0252 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{{- if or $.Site.Params.debug (findRE `\bhtml-comment\b` $.Site.Params.traceFlags) }}
  {{ `<!-- partials/main.teaserpic.card.html -->` | safeHTML }}
{{- end}}

{{- $myImgClass := "w3-image w3-left w3-round w3-hover-opacity " }}
{{- $myImgStyle := "max-width:150px; max-height:150px; width: auto; height: auto; margin: 0px 8px 16px 0px; " }}
{{- $myImg       := .Param `resImgTeaser`                              }} {{/* case insensitive */}}
{{- $myImgCmd    := .Param `resImgTeaserCmd`       | default `Resize`  }}
{{- $myImgOpt    := .Param `resImgTeaserOpt`       | default `150x`    }}
{{- $myImgCmd    := .Param `resImgTeaserInCardCmd` | default $myImgCmd }}
{{- $myImgOpt    := .Param `resImgTeaserInCardOpt` | default $myImgOpt }}
{{ partial `resource.image.html` (dict `page` . `class` $myImgClass `style` $myImgStyle `img` $myImg `cmd` $myImgCmd `opt` $myImgOpt ) }}

{{- if .Param `youtubeThumbnail` }}
{{- $myYoutubeThumbnail := .Param `youtubeThumbnail`}}
<img
  class="w3-image w3-left w3-round w3-hover-opacity"
  style="max-width:150px; max-height:150px; width: auto; height: auto; margin: 0px 8px 16px 0px;"
  src='https://img.youtube.com/vi/{{$myYoutubeThumbnail}}/0.jpg'
>
{{- end }}