{{- $pc := .Page.Site.Config.Privacy.Vimeo -}} {{- if not $pc.Disable -}} {{ $id := .Get "id" | default (.Get 0) }} {{ $dnt := cond (eq $pc.EnableDNT true) "?dnt=1" "" }} {{- $item := getJSON (print "https://vimeo.com/api/oembed.json?url=https://vimeo.com/" $id $dnt) -}} {{ $class := .Get "class" | default (.Get 1) }} {{ $hasClass := $class }} {{ $class := $class | default "__h_video" }} {{ if not $hasClass }} {{/* If class is set, assume the user wants to provide his own styles. */}} {{ template "__h_simple_css" $ }} {{ end }} {{ $secondClass := "s_video_simple" }}
{{- with $item }} {{ $thumb := .thumbnail_url }} {{ $original := $thumb | replaceRE "(_.*\\.)" "." }} {{ .title }}
{{ template "__h_simple_icon_play" $ }}
{{- end -}} {{- end -}}