forked from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvideo.liquid
97 lines (95 loc) · 2.7 KB
/
video.liquid
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{% assign extension = include.path | split: '.' | last %}
<figure>
{% if extension == 'mp4' or extension == 'webm' or extension == 'ogg' %}
<video
src="{% if include.cache_bust %}{{ include.path | relative_url | bust_file_cache }}{% else %}{{ include.path | relative_url }}{% endif %}"
{% if include.class %}
class="{{ include.class }}"
{% endif %}
{% if include.width %}
width="{{ include.width }}"
{% else %}
width="auto"
{% endif %}
{% if include.height %}
height="{{ include.height }}"
{% else %}
height="auto"
{% endif %}
{% if include['min-width'] %}
min-width="{{ include.min-width }}"
{% endif %}
{% if include['min-height'] %}
min-height="{{ include.min-height }}"
{% endif %}
{% if include['max-width'] %}
max-width="{{ include.max-width }}"
{% endif %}
{% if include['max-height'] %}
height="{{ include.max-height }}"
{% endif %}
{% if include.title %}
title="{{ include.title }}"
{% endif %}
{% if include.alt %}
alt="{{ include.alt }}"
{% endif %}
{% if include.autoplay %}
autoplay
{% endif %}
{% if include.controls %}
controls
{% endif %}
{% if include.loop %}
loop
{% endif %}
{% if include.muted %}
muted
{% endif %}
{% if include.poster %}
poster="{{ include.poster }}"
{% endif %}
/>
{% else %}
<iframe
src="{{ include.path }}"
{% if include.class %}
class="{{ include.class }}"
{% endif %}
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen
{% if include.width %}
width="{{ include.width }}"
{% else %}
width="auto"
{% endif %}
{% if include.height %}
height="{{ include.height }}"
{% else %}
height="auto"
{% endif %}
{% if include['min-width'] %}
min-width="{{ include.min-width }}"
{% endif %}
{% if include['min-height'] %}
min-height="{{ include.min-height }}"
{% endif %}
{% if include['max-width'] %}
max-width="{{ include.max-width }}"
{% endif %}
{% if include['max-height'] %}
height="{{ include.max-height }}"
{% endif %}
{% if include.alt %}
alt="{{ include.alt }}"
{% endif %}
{% if include.title %}
title="{{ include.title }}"
{% endif %}
/>
{% endif %}
{% if include.caption %}
<figcaption class="caption">{{ include.caption }}</figcaption>
{% endif %}
</figure>