mirror of https://github.com/onweru/compose.git

weru
02.28.2025 3d7e2a2241ecd1fcaabe1ec1a6c8ae74015605a3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<div class="video">
  {{- $videoid := .Get 0 -}}
  {{- $img := .Get 1 -}}
  {{- $params := .Get 2 -}}
  {{ $bkImg := "" }}
  {{ if .IsNamedParams }}
    {{ $videoid = .Get "videoid" }}
    {{ $img = .Get "img" }}
    {{ $bkImg = "" }}
    {{ $params = .Get "params" }}
  {{ end }}
  {{ with $img }}
    {{ $bkImg := absURL (printf "images/%s" .) }}
  {{ end }}
  <lite-youtube videoid="{{ $videoid }}"{{ with $bkImg }} style="background-image: url({{ . }})"{{ end }}{{ with $params }} params="{{ . }}"{{ end }}></lite-youtube>
</div>