diff --git a/src/styles/_project.sass b/src/styles/_project.sass index ce2b14ec..b2ef0dec 100644 --- a/src/styles/_project.sass +++ b/src/styles/_project.sass @@ -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 diff --git a/src/templates/nodes/custom/asset/video/view_embed.jade b/src/templates/nodes/custom/asset/video/view_embed.jade index b1143415..dce4c83a 100644 --- a/src/templates/nodes/custom/asset/video/view_embed.jade +++ b/src/templates/nodes/custom/asset/video/view_embed.jade @@ -20,10 +20,7 @@ supports HTML5 video | {% 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 diff --git a/src/templates/projects/view_embed.jade b/src/templates/projects/view_embed.jade index 0670bcbf..014e899a 100644 --- a/src/templates/projects/view_embed.jade +++ b/src/templates/projects/view_embed.jade @@ -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'),