-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(djangocms_video): responsive template (#580)
- Loading branch information
1 parent
0331b8b
commit bfefab1
Showing
6 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
taccsite_cms/templates/djangocms_video/default/video_player.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{# https://github.com/django-cms/djangocms-video/blob/3.0.0/djangocms_video/templates/djangocms_video/default/video_player.html #} | ||
{% load i18n cms_tags %} | ||
|
||
{# TACC: #} | ||
{% block content_video %} | ||
{# /TACC #} | ||
|
||
{% if instance.embed_link %} | ||
{# show iframe if embed_link is provided #} | ||
<iframe src="{{ instance.embed_link_with_parameters }}" {{ instance.attributes_str }} frameborder="0" allowfullscreen="true"></iframe> | ||
{% with disabled=instance.embed_link %} | ||
{% for plugin in instance.child_plugin_instances %} | ||
{% render_plugin plugin %} | ||
{% endfor %} | ||
{% endwith %} | ||
{% else %} | ||
{# render <source> or <track> plugins #} | ||
<video controls {{ instance.attributes_str }} | ||
{% if instance.poster %} poster="{{ instance.poster.url }}"{% endif %}> | ||
{% for plugin in instance.child_plugin_instances %} | ||
{% render_plugin plugin %} | ||
{% endfor %} | ||
{% trans "Your browser doesn't support this video format." %} | ||
</video> | ||
{% endif %} | ||
|
||
{% comment %} | ||
# Available variables: | ||
{{ instance.template }} | ||
{{ instance.label }} | ||
{{ instance.embed_link }} | ||
{{ instance.poster }} | ||
{{ instance.attributes_str }} | ||
{% endcomment %} | ||
|
||
{# TACC: #} | ||
{% endblock content_video %} | ||
{# /TACC #} |
7 changes: 7 additions & 0 deletions
7
taccsite_cms/templates/djangocms_video/responsive-16by9/video_player.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% extends "djangocms_video/default/video_player.html" %} | ||
|
||
{% block content_video %} | ||
<div class="embed-responsive embed-responsive-16by9"> | ||
{{ block.super }} | ||
</div> | ||
{% endblock content_video %} |
7 changes: 7 additions & 0 deletions
7
taccsite_cms/templates/djangocms_video/responsive-1by1/video_player.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% extends "djangocms_video/default/video_player.html" %} | ||
|
||
{% block content_video %} | ||
<div class="embed-responsive embed-responsive-1by1"> | ||
{{ block.super }} | ||
</div> | ||
{% endblock content_video %} |
7 changes: 7 additions & 0 deletions
7
taccsite_cms/templates/djangocms_video/responsive-21by9/video_player.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% extends "djangocms_video/default/video_player.html" %} | ||
|
||
{% block content_video %} | ||
<div class="embed-responsive embed-responsive-21by9"> | ||
{{ block.super }} | ||
</div> | ||
{% endblock content_video %} |
7 changes: 7 additions & 0 deletions
7
taccsite_cms/templates/djangocms_video/responsive-4by3/video_player.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% extends "djangocms_video/default/video_player.html" %} | ||
|
||
{% block content_video %} | ||
<div class="embed-responsive embed-responsive-4by3"> | ||
{{ block.super }} | ||
</div> | ||
{% endblock content_video %} |