initial support for video html tag and its attributes..

This commit is contained in:
Marcell Mars 2022-01-11 00:40:38 +01:00
parent 1757e61158
commit 26c20737d6
1 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,11 @@
{{- $img_src := index (split $img_params " ") 0 -}} {{- $img_src := index (split $img_params " ") 0 -}}
{{- $img_attr := index (split $img_params $img_src) 1 -}} {{- $img_attr := index (split $img_params $img_src) 1 -}}
<img src="{{ $img_src }}" {{ $img_attr | safeHTMLAttr }} /> <img src="{{ $img_src }}" {{ $img_attr | safeHTMLAttr }} />
{{- else if strings.HasPrefix .Destination "vid:" -}}
{{- $vid_params := (substr .Destination 4) -}}
{{- $vid_src := index (split $vid_params " ") 0 -}}
{{- $vid_attr := index (split $vid_params $vid_src) 1 -}}
<video controls src="{{ $vid_src }}" {{ $vid_attr | safeHTMLAttr }}></video>
{{- else if strings.HasPrefix .Destination "bib:" -}} {{- else if strings.HasPrefix .Destination "bib:" -}}
{{- $destination := (substr .Destination 4) -}} {{- $destination := (substr .Destination 4) -}}
{{- $c_prefix := .Page.Site.Params.sandpointsCatalogPrefix | default "/library/" -}} {{- $c_prefix := .Page.Site.Params.sandpointsCatalogPrefix | default "/library/" -}}