Commit 52a10674 authored by Simon Daron's avatar Simon Daron
Browse files

New navigation for emissions/episodes with smaller items

parent 7ed50273
......@@ -57,6 +57,13 @@ def emission_nav(context, date=None, klass=None):
'episode': context.get('episode'),
}
@register.inclusion_tag('episodes/inline.html', takes_context=True)
def episode_inline(context, date=None, model=None, klass=None):
return {
'class': klass,
'episode': context.get('episode'),
'date': date,
}
@register.inclusion_tag('episodes/resume.html', takes_context=True)
def episode_resume(context, date=None, model=None, klass=None):
return {
......@@ -72,6 +79,7 @@ def episode_detail(context, date=None):
'episode': context.get('episode'),
'emission': context.get('emission'),
'diffusions': context.get('diffusions'),
'date': date,
}
@register.inclusion_tag('emissions/detail.html', takes_context=True)
......
......@@ -68,7 +68,7 @@ h5 { font-size: 1.1em;}
.cuserContent h4 { font-size: 1.4em;}
.userContent h5 { font-size: 1.3em;}
.userContent h1, .userContent h2, .userContent h3, .cuserContent h4, .userContent h5{margin:2em 0 1em 0;}
h1, h2, .squashed{
h1, h2, h3, h4, .squashed{
font-family: 'RegloScale';
}
......
......@@ -42,9 +42,6 @@
}
#Main .sectionLabel{
color:#0000ff;
border-left:1.5em solid #0000ff;
border-bottom:2px solid #0000ff;
padding-left:1em;
margin-bottom:1em;
}
.iconLabel{margin-left:0.1em;}
......@@ -66,7 +63,7 @@
/****************************************************/
/* WRAPPER */
/****************************************************/
.wrapper {max-width: 1260px; margin:auto;padding:0 10%;}
.wrapper {max-width: 1260px; margin:auto;padding:0 2%;}
.wrapper.text {max-width: 780px; margin:auto;}
.wrapper.half {max-width: 510px; margin:auto;}
.wrapper.sided{ max-width:1260px; }
......@@ -76,10 +73,16 @@
.wrapper.sided .rightPart{
width:45%;
}
.wrapper.sided .leftPart{
.wrapper.navigation .leftPart{
width:60%;
}
.wrapper.navigation .rightPart{
width:35%;
}
.wrapper .leftPart{
float:left;
}
.wrapper.sided .rightPart{
.wrapper .rightPart{
float:right;
}
......
......@@ -8,7 +8,7 @@
{% emission_nav %}
{% endblock %}
{% block main %}
<div class="wrapper {% if episodes.exists %}sided{% endif %} cf">
<div class="wrapper {% if episodes.exists %}navigation{% endif %} cf">
<div id="Emission-container" class="emission padded">
<div data-tabbed="true" id="Emission-tabs-default">
<div id="Emission-tabs-detail" class="leftPart">
......@@ -21,12 +21,6 @@
</div>
<div id="Emission-tabs-menu" class="rightPart episodes">
{% if episode %}
<div class="sub">
<h5 class="sectionLabel">À propos</h5>
{% emission_resume %}
</div>
{% endif %}
{% if news %}
<div class="sub">
<h5 class="sectionLabel">Actu</h5>
......@@ -48,15 +42,10 @@
{% endif %}
{% if episodes.exists %}
<div class="sub">
<h5 class="sectionLabel">Dernier épisode</h5>
{% with episodes|slice:"0:1" as episodes %}
<h5 class="sectionLabel">Derniers épisodes</h5>
{% with episodes|slice:"0:5" as episodes %}
{% for episode in episodes %}
<div class="legend">{{ episode.first_diffusion|date:"F Y" }}</div>
{% if futurEpisodes %}
{% episode_resume model="inline" date="daytime" %}
{% else %}
{% episode_resume date="daytime" %}
{% endif %}
{% episode_inline %}
{% endfor %}
{% endwith %}
</div>
......
......@@ -48,7 +48,7 @@
{% if emission.categories %}
<div class="categories">
{% for category in emission.categories.all %}
<a href="{% url 'emissions' %}?q={{category.slug}}"><span class="icon-{{category|slugify}}"></span>&nbsp;<span>{{category}}</span></a>
<a href="{% url 'emissions' %}?q={{category.slug}}">&nbsp;<span>{{category}}</span></a>
{% endfor%}
</div>
{% endif %}
......
{% load thumbnails %}
{% load paniktags %}
<div class="episode detail episode-detail cf">
<div class="dateBloc">
<div class="date">
<div class="day">
{{ episode.first_diffusion|date:"D"|slice:":2"}}
</div>
<div class="number">
{{ episode.first_diffusion|date:"d" }}
</div>
{% if date != "daytime" %}
<div class="month">
{{ episode.first_diffusion|date:"M y" }}
</div>
{% endif %}
<div class="time">
{{ episode.first_diffusion|date:"H:i" }}
</div>
</div>
</div>
{% if diffusions %}
<header class="center padded">
<h4 class="">{{ episode.title }}</h4>
<h3 class="">{{ episode.title }}</h3>
<div class="label">Diffusions</div>
<ul class="diffusions custom">
{% for schedule in diffusions %}
......
......@@ -12,52 +12,57 @@
{% block main %}
<div class="sided wrapper padded">
<div class="leftPart">
<h2><a href="{% url 'program' %}">Cette semaine sur Panik</a></h2>
{% weeknav %}
{% weekview %}
<form method="post" action="{% url 'newsletter-subscribe' %}"
class="big center padded" id="subscribe-form">
<p>Tous les lundis, l'actualité de la semaine de Panik :</p>
{% csrf_token %}
{{ newsletter_form.as_table }}
<button>M'inscrire</button>
</form>
</div>
<div class="rightPart">
<div id="recent-emissions">
<h4><a href="{% url 'emissions' %}">Nouveau dans la grille</a></h4>
<ul class="custom list columns padded">
{% for emission in emissions %}
<li class="item ellipsis">
<a href="{% url 'emission-view' slug=emission.slug %}">
{% if emission.image %}
<img style="float:right;margin-left:1em;" src="{{ emission.image|thumbnail:'20x20' }}"/>
{% endif %}
{{ emission.title }}
</a>
</li>
{% endfor %}
</ul>
</div>
<div id="recent-sounds">
<h4><a href="{% url 'listen' %}">Derniers sons</a></h4>
<ul class="custom columns list">
{% for soundfile in soundfiles %}
<li class="item {% if soundfile.episode.emission.categories.all.count = 0 %}nocat{% endif %} {% for category in soundfile.episode.emission.categories.all %} {{ category|slugify }}{% endfor %}">
{% soundfile_resume soundfile=soundfile date=soundfile.first_diffusion %}
</li>
{% endfor %}
</ul>
</div>
</div>
<div class="sided wrapper">
<div class="marged">
<div class="leftPart">
<h2><a href="{% url 'program' %}">Cette semaine sur Panik</a></h2>
{% weeknav %}
{% weekview %}
<form method="post" action="{% url 'newsletter-subscribe' %}"
class="big center padded" id="subscribe-form">
<p>Tous les lundis, l'actualité de la semaine de Panik :</p>
{% csrf_token %}
{{ newsletter_form.as_table }}
<button>M'inscrire</button>
</form>
</div>
<div class="rightPart">
{% if emissions %}
<div id="recent-emissions">
<h3 class="sectionLabel"><a href="{% url 'emissions' %}">Nouveau dans la grille</a></h3>
<ul class="custom list columns padded">
{% for emission in emissions %}
<li class="item ellipsis">
<a href="{% url 'emission-view' slug=emission.slug %}">
{% if emission.image %}
<img style="float:right;margin-left:1em;" src="{{ emission.image|thumbnail:'20x20' }}"/>
{% endif %}
{{ emission.title }}
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if soundfiles %}
<div id="recent-sounds">
<h3 class="sectionLabel"><a href="{% url 'listen' %}">Derniers sons</a></h3>
<ul class="custom columns list">
{% for soundfile in soundfiles %}
<li class="item {% if soundfile.episode.emission.categories.all.count = 0 %}nocat{% endif %} {% for category in soundfile.episode.emission.categories.all %} {{ category|slugify }}{% endfor %}">
{% soundfile_resume soundfile=soundfile date=soundfile.first_diffusion %}
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}
Supports Markdown
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