Commit c9d1ecee authored by Simon Daron's avatar Simon Daron
Browse files

Program view: use resume template for emission & episode and regroup nonstop as inline small boxes

parent f09e5ed9
......@@ -257,6 +257,7 @@ a.active, button.active{
img.right, img.left{max-width:50%;}
.smooth{opacity:0.5;}
.hidden{display:none;}
.invisible{visibility:hidden;}
.padded{padding:1.5em;}
.marged{margin:1.5em 0 1.5em 0;}
......@@ -335,7 +336,7 @@ img.right, img.left{max-width:50%;}
@media only screen and (min-width: 600px) {
.columns{column-count: 2; -webkit-column-count: 2; -moz-column-count: 2;}
}
@media only screen and (min-width: 900px) { .columns{column-count: 3; -webkit-column-count: 3; -moz-column-count: 3;} }
@media only screen and (min-width: 1024px) { .columns{column-count: 3; -webkit-column-count: 3; -moz-column-count: 3;} }
.columns.by3{column-count: 3; -webkit-column-count: 3; -moz-column-count: 3;}
/* And the rest is Eric & Seb, AGPLv3*/
......
......@@ -582,9 +582,14 @@ body{
.episode.resume .title{
margin-bottom:0.5em;
}
.episode.inline .logo, .episode.resume .logo{
.episode.resume .logo{
float: right;
}
.episode.inline .logo{
min-height: 100px;
float: left;
margin-right:1em;
}
.episode.resume .sound{
float:right;
margin:0 0 1em 1em;
......@@ -746,9 +751,28 @@ ul.newsSpecial{
.program .nonstop {
text-align:right;
}
.search a.icon-check-empty.count-0{
display:none !important;
.program-week .programDate{
float:left;
width:5em;
}
.program-week .programCell{
margin-left:6em;
}
.program-week .nonStop .programDate{
visibility:hidden;
}
.program-week .nonStop .programCell{
font-size:0.9em;
padding-left:50%;
text-align:right;
}
.program-week a.nonstop{
font-size:0.9em;
float:right;
margin:0.1em;
}
.program-week .inline,.program-week .resume{padding:0;}
/****************************************************/
/**** SEARCH ****/
......@@ -768,6 +792,9 @@ ul.newsSpecial{
font-style: italic;
}
.search a.icon-check-empty.count-0{
display:none !important;
}
/****************************************************/
/**** GRILLE ****/
/****************************************************/
......
......@@ -3,7 +3,7 @@
<div class="emission emission-inline inline">
<div class="{% if emission.archived %}archived{% endif %}">
<a class="block" href="{% url 'emission-view' slug=emission.slug %}">
<div class="logo left">{{ STATIC_URL}}
<div class="logo left">
{% if emission.image %}
<img width="50" height="50" src="{{ emission.image|thumbnail:'50x50' }}"/>
{% else %}
......@@ -13,7 +13,7 @@
{% if emission.categories %}
<div class="categories smooth ellipsis">
{% for category in emission.categories.all %}
{% if forloop.counter > 1 %} - {% endif %}<em>{{category}}</em>
{% if forloop.counter > 1 %} - {% endif %}<em><span class="inBlock icon-{{category|slugify}}"></span>{{category}}</em>
{% endfor%}
</div>
{% endif %}
......
......@@ -7,10 +7,13 @@
{% if emission.image %}
<img width="50" height="50" src="{{ emission.image|thumbnail:'50x50' }}"/>
{% else %}
<img width="50" height="50" src="{% static "img/defaultLogo.png" %}"/>
<img class="smooth" width="50" height="50" src="{% static "img/defaultLogo.png" %}"/>
{% endif %}
</div>
<h5 class="title ellipsis">{{ emission.title }}</h5>
<h5 class="title ellipsis">
{% for category in emission.categories.all %}<span class="inBlock icon-{{category|slugify}}"></span>{% endfor%}
{{ emission.title }}
</h5>
{% if emission.subtitle %}
<div class="description ellipsis">
{{ emission.subtitle }}
......
{% load thumbnails %}
{% load paniktags %}
<div class="episode {% if model = "inline" %}inline{% else %}resume{% endif %} cf">
{% load staticfiles %}
<div class="episode {% if model %}{{ model }}{% else %}resume{% endif %} cf {{ class }}">
{% if date != False %}
<div class="dateBloc">
<div class="date">
<div class="day">
......@@ -19,15 +21,22 @@
</div>
</div>
</div>
{% if episode.image %}
{% endif %}
<div class="logo">
{% if model = "inline" %}
<img src="{{ episode.image|thumbnail:'75x75' }}"/>
{% if model = "inline" and episode.image %}
<img src="{{ episode.image|thumbnail:'50x50' }}"/>
{% elif model = "inline" and episode.emission.image %}
<img src="{{ episode.emission.image|thumbnail:'50x50' }}"/>
{% elif model = "inline" %}
<img class="smooth" width="50" height="50" src="{% static "img/defaultLogo.png" %}"/>
{% elif episode.image %}
<img src="{{ episode.image|thumbnail:'150x150' }}"/>
{% elif episode.emission.image %}
<img src="{{ episode.emission.image|thumbnail:'150x150' }}"/>
{% else %}
<img src="{{ episode.image|thumbnail:'150x150' }}"/>
<img class="smooth" width="150" height="150" src="{% static "img/defaultLogo.png" %}"/>
{% endif %}
</div>
{% endif %}
<div class="content">
{% if episode.main_sound and model != "inline"%}
......
{% load paniktags %}
{% if not fragment or fragment = "nav" %}
<div class="program tabs" data-tab-about="#weekProgramContent-{{ week|slugify }}">
<nav class="">
......@@ -11,47 +12,56 @@
{% endif %}
{% if not fragment or fragment = "program" %}
<div id="weekProgramContent-{{ week|slugify }}" class="program wrapper">
{% for day in days %}
<div data-tabbed="true" class="content padded" id="Program-week-{{ day.datetime|slugify }}">
<ul class="custom emission-list list">
<ul class="custom program-week list">
{% with day.cells as cells %}
{% regroup cells by datetime|date:"H:i" as time_list %}
{% if time_list %}
{% for cell in time_list %}
<li class="cf {% if cell.list|dictsort:"label" %}nonStop{% endif %}">
<div class="programDate"><spanc class="label">{{ cell.grouper }}</span></div>
<div class="programCell">
{% for cell in cell.list %}
{% if cell.episode %}
{% with cell.episode as episode %}{% episode_resume model="inline" klass="standalone" date=False %}{% endwith %}
{% elif cell.emission %}
{% with cell.emission as emission %}{% emission_resume %}{% endwith %}
{% else %}
<a href="" class="inBlock nonstop box smooth"><em>{{ cell.label }}</em></a>
{% endif %}
{% endfor %}
</div>
</li>
{% endfor %}
{% else %}
<li><div class="info big">Non stop only!</div></li>
{% endif %}
{% endwith %}
</ul>
</div>
{% endfor %}
<!--
{% for day in days %}
<div data-tabbed="true" class="content padded" id="Program-week-{{ day.datetime|slugify }}">
<ul class="custom program-week list">
{% if day.cells %}
{% for cell in day.cells %}
<li >
<li class="{% if not cell.episode and not cell.emission %}nontStop smooth{% else %}cf {% endif %}">
<div class="programDate"><spanc class="label">{{ cell.datetime|date:"H:i" }}</span></div>
<div class="programCell">
{% if cell.episode %}
<a class="block" href="{% url 'episode-view' emission_slug=cell.episode.emission.slug slug=cell.episode.slug %}">
<div>
<strong class="label">{{ cell.datetime|date:"H:i" }}</strong> &nbsp;
{% for category in cell.emission.categories.all %}<span class="icon-{{category|slugify}}"></span>{% endfor%}
<strong>{{ cell.episode.emission.title }}</strong>
<em>{{ cell.episode.title }}</em>
</div>
{% if cell.episode.subtitle %}
<span class="smooth">{{ cell.episode.subtitle|safe|truncatewords:50 }}</span>
{% elif cell.episode.emission.subtitle %}
<span class="smooth">{{ cell.episode.emission.subtitle|safe|truncatewords:50 }}</span>
{% endif %}
</a>
{% with cell.episode as episode %}{% episode_resume model="inline" klass="standalone" date=False %}{% endwith %}
{% elif cell.emission %}
<a class="block" href="{% url 'emission-view' slug=cell.emission.slug %}">
<div>
<strong class="label">{{ cell.datetime|date:"H:i" }}</strong> &nbsp;
{% for category in cell.emission.categories.all %}<span class="inBlock icon-{{category|slugify}}"></span>{% endfor%}
<strong>{{ cell.emission.title }}</strong>
</div>
{% if cell.emission.subtitle %}
<span class="smooth">{{ cell.emission.subtitle|safe|truncatewords:50 }}</span>
{% elif cell.emission.text %}
<span class="smooth">{{ cell.emission.text|safe|striptags|truncatewords:50 }}</span>
{% endif %}
</a>
{% with cell.emission as emission %}{% emission_resume %}{% endwith %}
{% else %}
<em class="block nonstop ellipsis">
<strong class="" style="visibility:hidden;">{{ cell.datetime|date:"H:i" }}</strong>
<span><a href="{% url 'emission-view' slug=cell.slug %}">{{ cell.label }}</a></span>
</em>
<a href="block nonstop ellipsis"><em>{{ cell.label }}</em></a>
{% endif %}
</div>
</li>
{% endfor %}
{% else %}
......@@ -60,5 +70,8 @@
</ul>
</div>
{% endfor %}
-->
</div>
{% endif %}
......@@ -8,7 +8,7 @@
<ul class="padded custom columns list">
{% for episode in episodes %}
<li class="item {% if episode.emission.categories.all.count = 0 %}nocat{% endif %} {% for category in episode.emission.categories.all %} {{ category|slugify }}{% endfor %}">
{% episode_resume model="inline" klass="standalone"%}
{% episode_resume model="inline" klass="standalone" %}
</li>
{% endfor %}
</ul>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment