|
| 1 | +{% assign extension = include.path | split: '.' | last %} |
| 2 | + |
| 3 | +<figure> |
| 4 | + {% if extension == 'mp4' or extension == 'webm' or extension == 'ogg' %} |
| 5 | + <video |
| 6 | + src="{% if include.cache_bust %}{{ include.path | relative_url | bust_file_cache }}{% else %}{{ include.path | relative_url }}{% endif %}" |
| 7 | + {% if include.class %} |
| 8 | + class="{{ include.class }}" |
| 9 | + {% endif %} |
| 10 | + {% if include.width %} |
| 11 | + width="{{ include.width }}" |
| 12 | + {% else %} |
| 13 | + width="auto" |
| 14 | + {% endif %} |
| 15 | + {% if include.height %} |
| 16 | + height="{{ include.height }}" |
| 17 | + {% else %} |
| 18 | + height="auto" |
| 19 | + {% endif %} |
| 20 | + {% if include['min-width'] %} |
| 21 | + min-width="{{ include.min-width }}" |
| 22 | + {% endif %} |
| 23 | + {% if include['min-height'] %} |
| 24 | + min-height="{{ include.min-height }}" |
| 25 | + {% endif %} |
| 26 | + {% if include['max-width'] %} |
| 27 | + max-width="{{ include.max-width }}" |
| 28 | + {% endif %} |
| 29 | + {% if include['max-height'] %} |
| 30 | + height="{{ include.max-height }}" |
| 31 | + {% endif %} |
| 32 | + {% if include.title %} |
| 33 | + title="{{ include.title }}" |
| 34 | + {% endif %} |
| 35 | + {% if include.alt %} |
| 36 | + alt="{{ include.alt }}" |
| 37 | + {% endif %} |
| 38 | + {% if include.autoplay %} |
| 39 | + autoplay |
| 40 | + {% endif %} |
| 41 | + {% if include.controls %} |
| 42 | + controls |
| 43 | + {% endif %} |
| 44 | + {% if include.loop %} |
| 45 | + loop |
| 46 | + {% endif %} |
| 47 | + {% if include.muted %} |
| 48 | + muted |
| 49 | + {% endif %} |
| 50 | + {% if include.poster %} |
| 51 | + poster="{{ include.poster }}" |
| 52 | + {% endif %} |
| 53 | + /> |
| 54 | + |
| 55 | + {% else %} |
| 56 | + <iframe |
| 57 | + src="{{ include.path }}" |
| 58 | + {% if include.class %} |
| 59 | + class="{{ include.class }}" |
| 60 | + {% endif %} |
| 61 | + frameborder="0" |
| 62 | + allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" |
| 63 | + allowfullscreen |
| 64 | + {% if include.width %} |
| 65 | + width="{{ include.width }}" |
| 66 | + {% else %} |
| 67 | + width="auto" |
| 68 | + {% endif %} |
| 69 | + {% if include.height %} |
| 70 | + height="{{ include.height }}" |
| 71 | + {% else %} |
| 72 | + height="auto" |
| 73 | + {% endif %} |
| 74 | + {% if include['min-width'] %} |
| 75 | + min-width="{{ include.min-width }}" |
| 76 | + {% endif %} |
| 77 | + {% if include['min-height'] %} |
| 78 | + min-height="{{ include.min-height }}" |
| 79 | + {% endif %} |
| 80 | + {% if include['max-width'] %} |
| 81 | + max-width="{{ include.max-width }}" |
| 82 | + {% endif %} |
| 83 | + {% if include['max-height'] %} |
| 84 | + height="{{ include.max-height }}" |
| 85 | + {% endif %} |
| 86 | + {% if include.alt %} |
| 87 | + alt="{{ include.alt }}" |
| 88 | + {% endif %} |
| 89 | + {% if include.title %} |
| 90 | + title="{{ include.title }}" |
| 91 | + {% endif %} |
| 92 | + /> |
| 93 | + {% endif %} |
| 94 | + {% if include.caption %} |
| 95 | + <figcaption class="caption">{{ include.caption }}</figcaption> |
| 96 | + {% endif %} |
| 97 | +</figure> |
0 commit comments