Only load videojs when there are sources, and minor style tweaks
This commit is contained in:
parent
b8ad0cd18f
commit
1e56ca5227
@ -1031,23 +1031,26 @@ section.node-preview
|
||||
|
||||
&.video
|
||||
background-color: black
|
||||
min-height: 350px
|
||||
min-height: 320px
|
||||
position: relative
|
||||
|
||||
.video-dummy
|
||||
img
|
||||
display: block
|
||||
margin: 0 auto
|
||||
position: absolute
|
||||
z-index: 1
|
||||
opacity: .6
|
||||
|
||||
min-height: 320px
|
||||
display: flex
|
||||
width: 100%
|
||||
align-items: center
|
||||
justify-content: center
|
||||
color: white
|
||||
background:
|
||||
repeat: no-repeat
|
||||
size: cover
|
||||
position: center
|
||||
height: 100%
|
||||
|
||||
&-content
|
||||
background-color: rgba(black, .8)
|
||||
padding: 15px
|
||||
border-radius: 3px
|
||||
position: relative
|
||||
z-index: 2
|
||||
display: flex
|
||||
@ -1068,6 +1071,7 @@ section.node-preview
|
||||
em
|
||||
font-style: normal
|
||||
color: $color-warning
|
||||
margin-right: 10px
|
||||
|
||||
&.group, &.project
|
||||
background-color: $color-background
|
||||
|
@ -20,10 +20,7 @@
|
||||
<a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
|
||||
| {% else %}
|
||||
.video-dummy.sorry(
|
||||
style="{% if node.picture %}height: {{ node.picture.height }}px{% endif %}")
|
||||
| {% if node.picture %}
|
||||
img.video-dummy-thumbnail(src="{{ node.picture.thumbnail('l', api=api) }}")
|
||||
| {% endif %}
|
||||
style="{% if node.picture %}background-image: url({{ node.picture.thumbnail('l', api=api) }});{% endif %}")
|
||||
.video-dummy-content
|
||||
i.pi-lock.video-dummy-content-icon
|
||||
.video-dummy-content-text
|
||||
@ -133,8 +130,10 @@
|
||||
#comments-list-items-loading
|
||||
i.pi-spin
|
||||
|
||||
| {% if node.video_sources %}
|
||||
script(type="text/javascript").
|
||||
videojs(document.getElementById('videoplayer'), { fluid: true });
|
||||
| {% endif %}
|
||||
|
||||
include ../../_scripts
|
||||
|
||||
|
@ -104,7 +104,9 @@ include _scripts
|
||||
|
||||
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery.montage.min.js') }}")
|
||||
script.
|
||||
videojs(document.getElementById('videoplayer'), { fluid: true });
|
||||
| {% if header_video_file %}
|
||||
videojs(document.getElementById('videoplayer'), { fluid: true });
|
||||
| {% endif %}
|
||||
|
||||
function montage(){
|
||||
var $container = $('#featured-list'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user