Fix project header videos

This commit is contained in:
Pablo Vazquez 2017-02-06 12:07:05 +01:00
parent 3ef0bf6761
commit ae38bec218
2 changed files with 8 additions and 22 deletions

View File

@ -130,17 +130,11 @@
#comments-list-items-loading
i.pi-spin
| {% if node.video_sources %}
script(type="text/javascript").
{% if node.video_sources %}
videojs(document.getElementById('videoplayer'), { fluid: true });
| {% endif %}
{% endif %}
include ../../_scripts
| {% endblock %}
| {% block footer_scripts %}
script(type="text/javascript").
$(function(){
// Generate GA pageview
ga('send', 'pageview', location.pathname);
@ -157,4 +151,6 @@ script(type="text/javascript").
{% endif %}
});
include ../../_scripts
| {% endblock %}

View File

@ -1,9 +1,3 @@
| {% block head %}
| {% if header_video_file %}
script(src="//vjs.zencdn.net/5.8.8/video.js")
| {% endif %}
| {% endblock %}
| {% block body %}
#node-container
@ -13,11 +7,11 @@ script(src="//vjs.zencdn.net/5.8.8/video.js")
controls,
data-setup="{}",
preload="auto",
poster="{% if node.picture %}{{ header_video_node.picture.thumbnail('l', api=api) }}{% endif %}")
| {% for source in node.video_sources %}
poster="{% if header_video_node.picture %}{{ header_video_node.picture.thumbnail('l', api=api) }}{% endif %}")
| {% for source in header_video_file.variations %}
source(
src="{{ source.src }}",
type="{{ source.type }}")
src="{{ source.link | safe }}",
type="{{ source.content_type }}")
| {% endfor %}
p.vjs-no-js.
To view this video please enable JavaScript, and consider upgrading to a web browser that
@ -104,10 +98,6 @@ include _scripts
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery.montage.min.js') }}")
script.
{% if header_video_file %}
videojs(document.getElementById('videoplayer'), { fluid: true });
{% endif %}
function montage(){
var $container = $('#featured-list'),
$imgs = $container.find('img').hide(),