Skip to content

Commit d3e0a37

Browse files
Simon Haeglermistafunk
Simon Haegler
authored andcommitted
Add generic support for esri-hosted videos
1 parent 3bc368b commit d3e0a37

File tree

2 files changed

+24
-16
lines changed

2 files changed

+24
-16
lines changed

_layouts/default.html

+12-8
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,18 @@ <h1 class="hero-text">{{ page.hero-text }}</h1>
4747
</div>
4848
<div class="half horizontal just-centered aspect">
4949
{% for item in page.hero-content %}
50-
{% if item.type == "video" %}
51-
<div class="video-container flex-grow">
52-
<iframe src="https://www.youtube.com/embed/{{ item.name | append: '?wmode=transparent' }}" frameborder="0" allowfullscreen></iframe>
53-
</div>
54-
{% endif %}
55-
{% if item.type == "image" %}
56-
<img class="image-shadow" src="{{ site.url | relative_url }}/assets/img/{{ item.name }}"/>
57-
{% endif %}
50+
{% if item.type == "video" %}
51+
<div class="video-container flex-grow">
52+
<iframe src="https://www.youtube.com/embed/{{ item.name | append: '?wmode=transparent' }}" frameborder="0" allowfullscreen></iframe>
53+
</div>
54+
{% elsif item.type == "video-esri" %}
55+
<div class="video-container flex-grow">
56+
<iframe src="https://mediaspace.esri.com/embed/secure/iframe/entryId/{{ item.name }}" allowfullscreen allow="autoplay *; fullscreen *; encrypted-media *" referrerPolicy="no-referrer-when-downgrade" sandbox="allow-downloads allow-forms allow-same-origin allow-scripts allow-top-navigation allow-pointer-lock allow-popups allow-modals allow-orientation-lock allow-popups-to-escape-sandbox allow-presentation allow-top-navigation-by-user-activation" frameborder="0"></iframe>
57+
</div>
58+
{% endif %}
59+
{% if item.type == "image" %}
60+
<img class="image-shadow" src="{{ site.url | relative_url }}/assets/img/{{ item.name }}"/>
61+
{% endif %}
5862
{% endfor %}
5963
<!---->
6064
</div>

_layouts/detail.html

+12-8
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,18 @@ <h1 class="hero-text">{{ page.hero-title }}</h1>
5656
</div>
5757
<div class="two-third horizontal just-centered aspect">
5858
{% for item in page.hero-content %}
59-
{% if item.type == "video" %}
60-
<div class="video-container">
61-
<iframe src="https://www.youtube.com/embed/{{ item.name | append: '?wmode=transparent' }}" frameborder="0" allowfullscreen></iframe>
62-
</div>
63-
{% endif %}
64-
{% if item.type == "image" %}
65-
<img class="image-shadow" src="{{ site.url | relative_url }}/assets/img/{{ item.name }}"/>
66-
{% endif %}
59+
{% if item.type == "video" %}
60+
<div class="video-container">
61+
<iframe src="https://www.youtube.com/embed/{{ item.name | append: '?wmode=transparent' }}" frameborder="0" allowfullscreen></iframe>
62+
</div>
63+
{% elsif item.type == "video-esri" %}
64+
<div class="video-container flex-grow">
65+
<iframe src="https://mediaspace.esri.com/embed/secure/iframe/entryId/{{ item.name }}" allowfullscreen allow="autoplay *; fullscreen *; encrypted-media *" referrerPolicy="no-referrer-when-downgrade" sandbox="allow-downloads allow-forms allow-same-origin allow-scripts allow-top-navigation allow-pointer-lock allow-popups allow-modals allow-orientation-lock allow-popups-to-escape-sandbox allow-presentation allow-top-navigation-by-user-activation" frameborder="0"></iframe>
66+
</div>
67+
{% endif %}
68+
{% if item.type == "image" %}
69+
<img class="image-shadow" src="{{ site.url | relative_url }}/assets/img/{{ item.name }}"/>
70+
{% endif %}
6771
{% endfor %}
6872
<!---->
6973
</div>

0 commit comments

Comments
 (0)