var LightSliderPageInit = require('./modules/lightsliderpage-init');
var LightSliderHomeInit = require('./modules/lightsliderhome-init');
var LightSliderNetworkInit = require('./modules/lightslidernetwork-init');
+var LightSliderPersonsInit = require('./modules/lightsliderpersons-init');
+var LightSliderRelatedInit = require('./modules/lightsliderrelated-init');
var LazyLoadInit = require('./modules/lazyload-init');
var HomeMenu = require('./modules/home-menu');
var Audio = require('./modules/audio');
window[LightSliderPageInit] = new LightSliderPageInit();
window[LightSliderHomeInit] = new LightSliderHomeInit();
window[LightSliderNetworkInit] = new LightSliderNetworkInit();
+window[LightSliderPersonsInit] = new LightSliderPersonsInit();
+window[LightSliderRelatedInit] = new LightSliderRelatedInit();
window[LazyLoadInit] = new LazyLoadInit();
window[HomeMenu] = new HomeMenu();
window[Audio] = new Audio();
--- /dev/null
+var LightSliderPersonsInit = function() {
+
+ this.feed = null;
+
+ //
+ // Init
+ //
+ this.init();
+
+};
+
+LightSliderPersonsInit.prototype.init = function() {
+
+ var that = this;
+
+ $('[data-slider-persons]').lightSlider({
+ item: 2,
+ slideMargin: 0,
+ pager: false,
+ loop: true,
+ auto: true,
+ pauseOnHover: true,
+ responsive: [
+ {
+ breakpoint: 752,
+ settings: {
+ item: 2
+ }
+ },
+ {
+ breakpoint: 480,
+ settings: {
+ item: 1
+ }
+ }
+ ]
+ });
+
+};
+
+module.exports = LightSliderPersonsInit;
--- /dev/null
+var LightSliderRelatedInit = function() {
+
+ this.slider = null;
+
+ //
+ // Init
+ //
+ this.init();
+
+};
+
+LightSliderRelatedInit.prototype.init = function() {
+
+ var that = this;
+
+ that.slider = $('[data-slider-related]').lightSlider({
+ item: 1,
+ slideMargin: 0,
+ pager: false,
+ loop: true,
+ auto: false,
+ pauseOnHover: true,
+ responsive: [
+ {
+ breakpoint: 752,
+ settings: {
+ item: 1
+ }
+ },
+ {
+ breakpoint: 480,
+ settings: {
+ item: 1
+ }
+ }
+ ]
+ });
+
+};
+
+module.exports = LightSliderRelatedInit;
@import 'sliders/slider-page';
@import 'sliders/slider-home';
@import 'sliders/slider-network';
+@import 'sliders/slider-persons';
// Page modules
@import 'breadcrumb';
border: 0;
@include padding(0);
+ height: auto;
+
&:after {
content: "";
--- /dev/null
+// -*- coding: utf-8 -*-
+
+// Copyright (c) 2016-2017 Ircam
+// Copyright (c) 2016-2017 Jérémy Fabre
+
+// This file is part of mezzanine-organization.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+$module: ".slider-persons";
+
+#{$module} {
+
+ //
+ // Overrides lightSlider
+ //
+
+}
}
}
+
+.lSAction {
+ > a {
+ background: transparent;
+ &:before {
+ color: #F2EDDC;
+ font-size: 40px;
+ }
+ }
+ > a.lSPrev {
+
+ }
+ > a.lSNext {
+
+ }
+}
{% with object.images.all|get_type:'card' as images %}
{% if images %}
<figure class="article-box__image">
- <img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-original="{{ MEDIA_URL }}{% thumbnail images.0.file 427 286 top=0.5 left=article.photo_alignment|get_photo_alignment %}" class="lazyload" />
+ <img src="{{ MEDIA_URL }}{% thumbnail images.0.file 427 286 top=0.5 left=article.photo_alignment|get_photo_alignment %}" class="lazyload" />
</figure>
{% else %}
<figure class="article-box__image">
{% block subtitle %}
<strong>
- {% include 'agenda/includes/event_date_line.html' %}
+ {% include 'agenda/includes/event_date_card.html' %}
</strong>
{% if object.location %}
<br /><span>{{ object.location }}</span>
<div class="row">
<div class="col-md-8 col-md-push-4">
<div class="row">
- {% for person in event.persons.all %}
- {% with person.person as person %}
- <div class="col-md-8">
- {% include "network/inc/person/person_card_square.html" %}
- </div>
- {% endwith %}
- {% endfor %}
+ <div>
+ {% for person in event.persons.all %}
+ {% with person.person as person %}
+ <div class="col-md-8">
+ {% include "network/inc/person/person_card_square.html" %}
+ </div>
+ {% endwith %}
+ {% endfor %}
+ </div>
</div>
</div>
</div>
--- /dev/null
+{% load i18n %}
+{% load event_tags %}
+
+{% if object.start and not object.end %}
+ {{ object.start|date:"l j F" }}<br>
+{% else %}
+ {% if object.start|date:"d.m.y" == object.end|date:"d.m.y" %}
+ {{ object.start|date:"l j F" }}<br>
+ {% else %}
+ {{ object.start|date:"j F" }} {% trans "to" %} {{ object.end|date:"j F" }}
+ {% endif %}
+{% endif %}
-{% load i18n %}
-{% load event_tags %}
-
-{% if object.start and not object.end %}
- {{ object.start|date:"l j F" }}
-{% else %}
- {% if object.start|date:"d.m.y" == object.end|date:"d.m.y" %}
- {{ object.start|date:"l j F" }}
+{% load event_tags pages_tags mezzanine_tags organization_tags i18n %}
+{% with event.periods.all as periods %}
+ <!-- Start date only -->
+ {% if event.start and not event.end %}
+ {{ event.start|date:"DATE_EVENT_FORMAT" }},<br>
+ <!-- Start date with hour -->
+ {% if event.start and event.start|date:"H:i" != "23:59" %}
+ {{ event.start|time:"TIME_FORMAT" }}
+ {% endif %}
+ <!-- Start and end date -->
{% else %}
- {{ object.start|date:"j F" }} {% trans "to" %} {{ object.end|date:"j F" }}
+ <!-- Start and end date is the same day -->
+ {% if event.start|date:"d.m.y" == event.end|date:"d.m.y" %}
+ {% if not periods %}
+ {{ event.start|date:"DATE_EVENT_FORMAT" }},<br>
+ <!-- Start date with hour -->
+ {% if event.end and event.end|date:"H:i" != "23:59" %}
+ {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }}
+ {% else %}
+ {{ event.start|time:"TIME_FORMAT" }}
+ {% endif %}
+ {% else %}
+ {{ event.start|date:"DATE_EVENT_FORMAT" }},<br>
+ {% for period in periods %}
+ {% if period.date_to and period.date_to|date:"H:i" != "23:59" %}
+ {{ period.date_from|time:"TIME_FORMAT" }} - {{ period.date_to|time:"TIME_FORMAT" }}
+ {% else %}
+ {% if forloop.last or periods|length == 2 %} {% trans "and"%} {% elif not forloop.first %}, {% endif %}
+ {{ period.date_from|time:"TIME_FORMAT" }}
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ <!-- Start and end date are the same month -->
+ {% elif event.start|date:"m.y" == event.end|date:"m.y" %}
+ {{ event.start|date:"WEEK_DAY_FORMAT" }}
+ {% if event.end|subtract:event.start|get_attr:"days" > 1 %}
+ {% trans "through" %}
+ {% else %}
+ {% trans "and" %}
+ {% endif %}
+ {{ event.end|date:"DATE_EVENT_FORMAT" }}
+ <!-- Start and end date are completely different -->
+ {% else %}
+ {{ event.start|date:"DATE_EVENT_FORMAT" }} {% trans "through" %} {{ event.end|date:"DATE_EVENT_FORMAT" }},<br>
+ <!-- Start date with hour -->
+ {% if event.end and event.end|date:"H:i" != "23:59" %}
+ {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }}
+ {% else %}
+ {{ event.start|time:"TIME_FORMAT" }}
+ {% endif %}
+ {% endif %}
+
{% endif %}
-{% endif %}
+{% endwith %}
<div class="event-line-box__body">
{% if event.location %}
- <div class="event-line-box__location">{{ event.location }}</div>
+ <div class="event-line-box__location">
+ {{ event.location }}
+ {% if event.location.room %}
+ / {{ event.location.room }}
+ {% endif %}
+ </div>
{% endif %}
<h3 class="event-line-box__title">
{{ event.title }}
</div>
</div>
<div class="row">
- <div class="col-md-10 col-md-push-3 col-xxs-16">
- <div class="row">
+ <div class="col-xxs-16">
+ <div data-slider-related>
+
{% for content in dynamic_content %}
- <div class="col-xs-8">
- {% if content.content_type.model == "article" %}
- {% include "magazine/article/includes/article_card.html" with object=content.content_object %}
- {% elif content.content_type.model == "event" %}
- {% include "agenda/event/includes/event_card.html" with object=content.content_object %}
- {% elif content.content_type.model == "custompage" %}
- {% include "pages/page/includes/page_card.html" with object=content.content_object %}
- {% endif %}
- </div>
+ {% if forloop.counter0 == 0 or forloop.counter|divisibleby:3 %}
+ <div class="container">
+ <div class="row">
+ {% endif %}
+ <div class="col-xs-6 col-xs-push-2">
+ {% if content.content_type.model == "article" %}
+ {% include "magazine/article/includes/article_card.html" with object=content.content_object %}
+ {% elif content.content_type.model == "event" %}
+ {% include "agenda/event/includes/event_card.html" with object=content.content_object %}
+ {% elif content.content_type.model == "custompage" %}
+ {% include "pages/page/includes/page_card.html" with object=content.content_object %}
+ {% endif %}
+ </div>
+ {% if forloop.last or forloop.counter|divisibleby:2 %}
+ </div>
+ </div>
+ {% endif %}
{% endfor %}
+
</div>
</div>
+
</div>
</div>
</div>
{% if images %}
<figure class="article-box__image">
- <img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-original="{{ MEDIA_URL }}{% thumbnail images.0.file 427 286 top=0.5 left=object.photo_alignment|get_photo_alignment %}" class="lazyload" />
+ <img src="{{ MEDIA_URL }}{% thumbnail images.0.file 427 286 top=0.5 left=object.photo_alignment|get_photo_alignment %}" class="lazyload" />
</figure>
{% else %}
<figure class="article-box__image">
<div class="article-box__header">
<a href="{{ person.get_absolute_url }}" title="{{ person.first_name }} {{ person.last_name }}">
<figure class="article-box__image">
- <img class="lazyload" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-original="{{ MEDIA_URL }}{% thumbnail card_images.first 427 500 top=0.5 %}" alt="person"/>
+ <img class="lazyload" src="{{ MEDIA_URL }}{% thumbnail card_images.first 427 500 top=0.5 %}" alt="person"/>
</figure>
</a>
</div>
<div class="row">
- <div class="col-sm-16 col-md-10 col-md-push-3 tac">
+ <div class="col-sm-16 col-md-12 col-md-push-2 tac">
{% block page_title %}
{{ page.title }}
{% endblock %}
{% with object.images.all|get_type:'card' as images %}
{% if images %}
<figure class="article-box__image">
- <img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-original="{{ MEDIA_URL }}{% thumbnail images.0.file 427 286 top=0.5 left=article.photo_alignment|get_photo_alignment %}" class="lazyload" />
+ <img src="{{ MEDIA_URL }}{% thumbnail images.0.file 427 286 top=0.5 left=article.photo_alignment|get_photo_alignment %}" class="lazyload" />
</figure>
{% else %}
<figure class="article-box__image">