var HomeMenu = require('./modules/home-menu');
var Audio = require('./modules/audio');
var Video = require('./modules/video');
+var VideoOverlay = require('./modules/video-overlay');
//
// Init all the modules
window[LazyLoadInit] = new LazyLoadInit();
window[HomeMenu] = new HomeMenu();
window[Audio] = new Audio();
-window[Video] = new Video();
+window['Video'] = new Video();
+window[VideoOverlay] = new VideoOverlay();
--- /dev/null
+var VideoOverlay = function() {
+
+ this.$overlay = $('#overlay');
+ this.$overlayContent = $('#overlayContent');
+
+ //
+ // Init
+ //
+ this.init();
+
+};
+
+VideoOverlay.prototype.init = function() {
+
+ var that = this;
+
+ $('[data-video-overlay]').click(function(e) {
+ e.preventDefault();
+
+ that.openOverlay(this.href);
+
+ return false;
+ });
+
+};
+
+VideoOverlay.prototype.openOverlay = function(url) {
+
+ var that = this;
+
+ that.$overlay.addClass('open');
+
+ that.$overlayContent.load(url, function() {
+
+ window['Video'].init();
+ setTimeout(function() {
+ that.$overlayContent.addClass('loaded');
+ }, 2000);
+
+ });
+
+};
+
+module.exports = VideoOverlay;
var that = this;
+ if(that.player) {
+ that.player.dispose();
+ }
+
that.player = videojs('video-js-playlist', {
aspectRatio:"905:520"
});
@import 'newsletter';
@import 'tweets';
@import 'hero';
+@import 'overlay';
// Typography modules
@import 'dashed';
--- /dev/null
+$module: ".overlay";
+
+#{$module} {
+
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ z-index: 100;
+
+ overflow: hidden;
+
+ background: rgba($color-background, .95);
+
+ display: block;
+ height: 0;
+ opacity: 0;
+
+ @include transition(opacity .5s ease-in-out, height 0s .5s);
+
+ &.open {
+
+ height: 100%;
+ display: table;
+ opacity: 1;
+ @include transition(opacity .5s ease-in-out, height 0s);
+
+ }
+
+ &__close {
+
+ position: absolute;
+ top: 2rem;
+ right: 2rem;
+ z-index: 2;
+ color: white;
+ display: block;
+
+ width: 40px;
+ height: 40px;
+
+ &:before, &:after {
+ width: 100%;
+ height: 1px;
+ content: "";
+ display: block;
+ background: white;
+
+ position: absolute;
+ top: 20px;
+ left: 0;
+
+ @include transition(all 0.5s ease-in-out);
+ }
+
+ &:before {
+ @include transform(rotate(45deg));
+ }
+ &:after {
+ @include transform(rotate(-45deg));
+ }
+
+ &:hover {
+
+ &:before {
+ background: $color-main;
+ @include transform(rotate(225deg));
+ }
+ &:after {
+ background: $color-main;
+ @include transform(rotate(-225deg));
+ }
+
+ }
+
+ }
+
+ &__container {
+
+ display: table;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 1;
+
+ }
+
+ &__content {
+
+ display: table-cell;
+ vertical-align: middle;
+
+ }
+
+ #overlayContent {
+
+ opacity: 0;
+ @include transition(opacity .5s ease-in-out, height 0s .5s);
+
+ &.loaded {
+
+ opacity: 1;
+
+ }
+
+ }
+
+}
width: 100%;
z-index: 100;
- background: rgba(255,255,255, .95);
+ background: rgba($color-background, .95);
display: block;
height: 0;
&__close {
position: absolute;
- top: 1rem;
- right: 1rem;
+ top: 2rem;
+ right: 2rem;
z-index: 2;
+ color: white;
+ display: block;
+
+ width: 40px;
+ height: 40px;
+
+ &:before, &:after {
+ width: 100%;
+ height: 1px;
+ content: "";
+ display: block;
+ background: white;
+
+ position: absolute;
+ top: 20px;
+ left: 0;
+
+ @include transition(all 0.5s ease-in-out);
+ }
+
+ &:before {
+ @include transform(rotate(45deg));
+ }
+ &:after {
+ @include transform(rotate(-45deg));
+ }
+
+ &:hover {
+
+ &:before {
+ background: $color-main;
+ @include transform(rotate(225deg));
+ }
+ &:after {
+ background: $color-main;
+ @include transform(rotate(-225deg));
+ }
+
+ }
}
}
+ .overlay & {
+
+ #{$module}__item {
+
+ display: inline-block;
+ @include margin-right(.25);
+ font-size: 1.3rem;
+
+ }
+
+ }
+
}
@include margin-bottom(.5);
@include margin-right(.5);
+
}
&__content {
&__image-container {
background: $color-background;
+ display: block;
@include transition(all 0.5s ease-in-out);
}
position: relative;
overflow: hidden;
+ display: block;
@include mq($until: xs) {
height: auto;
</footer>
</div>
+ <div class="overlay" id="overlay" data-close-button-target="overlay">
+ <a href="#" data-close-button="overlay" class="overlay__close">
+ </a>
+ <div class="overlay__container">
+ <div class="overlay__content">
+ <div id="overlayContent">
+
+ </div>
+ </div>
+ </div>
+ </div>
+
{% search_form %}
{% include "includes/footer_scripts.html" %}
{% endspaceless %}
{% load mezzanine_tags i18n %}
<div class="search" id="search" data-open-button-target="search" data-close-button-target="search" data-close-escape>
- <div class="search__close">
- <a href="#" data-close-button="search" aria-hidden="true"><i class="fa fa-close"></i></a>
- </div>
+ <a href="#" data-close-button="search" class="search__close">
+ </a>
<div class="search__container">
<div class="search__content">
<div class="container">
{% load mezzanine_tags keyword_tags i18n organization_tags staticfiles %}
<div class="">
- <a class="media-box media-box--{{object|get_media_type|lower}}" href="{% url 'organization-media-detail' object|get_media_type|lower object.slug %}">
- <div class="media-box__image-container">
+ <div class="media-box media-box--{{object|get_media_type|lower}}">
+ <a class="media-box__image-container" href="{% url 'organization-media-overlay' object.slug %}" data-video-overlay>
<figure class="media-box__image media-box__image--video">
{% if object.poster_url %}
<img src="{{ object.poster_url }}">
<div class="media-box__placeholder"></div>
{% endif %}
</figure>
- </div>
- <div class="media-box__content">
+ </a>
+ <a class="media-box__content" href="{% url 'organization-media-detail' object|get_media_type|lower object.slug %}">
<h2 class="media-box__title">{{ object.title }}</h2>
<div class="media-box__type">
{{ object|get_media_type }}
{{ object.description|richtext_filters|safe|truncatechars_html:200 }}
</div>
{% endif %}
- </div>
- </a>
+ </a>
+ </div>
</div>
-{{ media.title }}
-{% if media.poster_url %}
- {{ media.poster_url }}
-{% endif %}
-
-{{ media.publish_date|date:"j F, Y" }}
-
-{% if media.description %}
- {{ media.description }}
-{% endif %}
-
-<br><br>
-
-{% with media.transcoded.all as media_transcoded %}
- {% if media_transcoded %}
- {# WEBM #}
- {{ media_transcoded.0.url }}
- {{ media_transcoded.0.mime_type }}
- <br><br>
- {# MP4 #}
- {{ media_transcoded.1.url }}
- {{ media_transcoded.1.mime_type }}
- <br><br>
- {# OGG #}
- {{ media_transcoded.2.url }}
- {{ media_transcoded.2.mime_type }}
- {% endif %}
-{% endwith %}
+{% load mezzanine_tags keyword_tags i18n organization_tags %}
+
+<div class="container">
+
+ <div class="row">
+
+ <div class="mb1 col-md-10 col-md-push-3 page__content" data-summary-content>
+
+ <div class="embed-responsive">
+ <video controls id="video-js-playlist" class="video-js vjs-ircam-skin" data-title="{{ media.title }}" {% if media.poster_url %}poster="{{ media.poster_url }}"{% endif %}>
+ </video>
+ </div>
+ <ol class="video-playlist">
+ {% spaceless %}
+ <li class="video-playlist__item{% if forloop.first %} playing{% endif %}"><a href="#" data-poster="{{media.poster_url }}" data-src="{% for transcoded in media.transcoded.all %}{% if forloop.first %}{% else %},{% endif %}{{ transcoded.url }}{% if forloop.last %}{% endif %}{% endfor %}" data-mime="{% for transcoded in media.transcoded.all %}{% if forloop.first %}{% else %},{% endif %}{{ transcoded.mime_type }}{% if forloop.last %}{% endif %}{% endfor %}"><span>{{ media.title }}</span>{% if media.description %}<small> {{ media.description }}</small>{% endif %}</a></li>
+ {% endspaceless %}
+ </ol>
+
+ </div>
+
+ </div>
+
+ <div class="row">
+
+ <div class="col-md-3 page__sidebar">
+ <div style="position: relative;">
+ <div class="page__meta" data-sticky data-sticky-parent="row" data-sticky-offset="100" data-sticky-detach-at="971">
+ <div class="page__meta-title">
+ {% trans 'Publish date' %}
+ </div>
+ {% editable media.publish_date %}
+ <div class="page__meta-text">
+ {{ media.publish_date|date:"DATE_FORMAT" }}
+ </div>
+ {% endeditable %}
+
+ {% with media as object %}
+ <div class="mt1">
+ {% include "includes/share_buttons.html" %}
+ </div>
+ {% endwith %}
+ </div>
+ </div>
+ </div>
+
+ <div class="col-sm-16 col-md-10 page__content" data-summary-content>
+
+ <h2 class="mt0">{{ media.title }}</h2>
+ {% if media.description %}
+ <p>
+ {{ media.description }}
+ </p>
+ {% endif %}
+
+ </div>
+
+ </div>
+
+</div>