aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/shortcodes/video.html
blob: 18065f8c0e724c276a483cd98ad215df289aee90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{{-
  $source := default
  "https://raw.githubusercontent.com/benhosmer/HTML5-Test-Videos/9a6c2db46472454c634963cbeb0900fd37901fac/big_buck_bunny.mp4"
  (.Get "source"  | default (.Get 0))
-}}
{{- $poster      := default ""               (.Get "poster"      | default (.Get 1)) -}}
{{- $width       := default ""               (.Get "width"       | default (.Get 2)) -}}
{{- $height      := default ""               (.Get "height"      | default (.Get 3)) -}}
{{- $preload     := default "metadata"       (.Get "preload"     | default (.Get 4)) -}}
{{- $options     := default "controls"       (.Get "options"     | default (.Get 5)) -}}
{{- $caption     := default "Untitled Video" (.Get "caption"     | default (.Get 6)) -}}
{{- $title       := default $caption         (.Get "title"       | default (.Get 7)) -}}
{{- $start       := default ""               (.Get "start"       | default (.Get 8)) -}}
{{- $end         := default ""               (.Get "end"         | default (.Get 9)) -}}
{{- $orientation := default "landscape"      (.Get "orientation" | default (.Get 10)) -}}
{{- $remote      := default ""               (.Get "remote"      | default (.Get 11)) -}}

{{- partial "video-container.html"
  (dict
    "Author"      .Page.Section
    "Caption"     $caption
    "End"         $end
    "Height"      $height
    "Options"     $options
    "Orientation" $orientation
    "Poster"      $poster
    "Preload"     $preload
    "RelURL"      (strings.TrimPrefix .Site.BaseURL .Page.Permalink)
    "Remote"      $remote
    "Source"      $source
    "Start"       $start
    "Title"       $title
    "Width"       $width
  )
-}}