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