Commit 23c77766 authored by Simon Daron's avatar Simon Daron
Browse files

Make unique episode resume with inline & resume

parent 69aa6e6e
......@@ -17,8 +17,9 @@ def audio(sound=None):
}
@register.inclusion_tag('episodes/resume.html', takes_context=True)
def episode_resume(context, date=None, klass=None):
def episode_resume(context, date=None, model=None, klass=None):
return {
'model': model,
'class': klass,
'episode': context.get('episode'),
'date': date,
......
......@@ -383,11 +383,7 @@ body{
}
.episode.resume .title{
margin-bottom:1em;
}
.episode.resume .date{
font-size: 1.2em;
float: left;
margin-bottom:0.5em;
}
.episode.resume .logo,
.episode.resume .controls{
......@@ -397,37 +393,21 @@ body{
@media screen and (max-width: 300px) {
.episode.resume .logo{display:none;}
}
.episode.resume .date {
width: 3.5em;
text-align: center;
margin-right: 1em;
}
.episode.resume .date .day, .emission-detail .date .day {
}
.episode.resume .content {
padding-left: 5em;
padding-left: 6.5em;
}
.episode.resume .content .title {
}
.episode.resume .logo {
width: 100px;
margin:0px 1em;
margin:0 0 1em;
max-width:20%;
}
.episode.resume .logo img{
width:100%;
}
.episode.resume .controls {
width: 90px;
text-align: center;
}
.episode.inline{
}
.episode.inline .content {
padding: 0 1em 0 5em;
.episode.inline .date{
font-size:80%;
}
/****************************************************/
......
......@@ -38,7 +38,7 @@
{% if episode.title == episodes.0.title %}
<li>{% episode_resume date="daytime" %}</li>
{% else %}
<li>{% episode_inline date="daytime" %}</li>
<li>{% episode_resume model="inline" date="daytime" %}</li>
{% endif %}
{% endfor %}
</ul>
......
{% load thumbnails %}
{% load paniktags %}
<div class="episode resume episode-resume cf">
<div class="date dateBloc">
<span class="day">
{{ episode.first_diffusion|date:"D"|slice:":2"}}
</span>
<span class="number">
{{ episode.first_diffusion|date:"d" }}
</span>
{% if date != "daytime" %}
<div class="month">
{{ episode.first_diffusion|date:"M Y" }}
<div class="episode resume {% if model = "inline" %}inline{% endif %} cf">
<div class="dateBloc left">
<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>
{% endif %}
<span class="time">
{{ episode.first_diffusion|date:"H:i" }}
</span>
</div>
{% if episode.image %}
<div class="logo">
<div class="logo right">
{% if model = "inline" %}
<img width="50" height="50" src="{{ episode.image|thumbnail:'50x50' }}"/>
{% else %}
<img width="100" height="100" src="{{ episode.image|thumbnail:'100x100' }}"/>
{% endif %}
</div>
{% endif %}
<div class="content">
{% if class = "standalone" %}
<h5 class="title ellipsis smooth">{{ episode.emission.title }}</h5>
{% endif %}
<h5 class="title"><a href="{% url 'episode-view' emission_slug=episode.emission.slug slug=episode.slug %}">{{ episode.title }}</a></h5>
{% if episode.description %}
<article class="text">
{{ episode.description|safe }}
</article>
{% elif episode.text %}
<article class="text">
{{ episode.text|safe|striptags|truncatewords:20}}
</article>
{% if model = "inline" %}
{% if episode.description %}
<div class="description ellipsis">
{{ episode.description|safe|striptags }}
</div>
{% elif episode.text %}
<div class="description ellipsis">
{{ episode.text|safe|striptags|truncatewords:20}}
</div>
{% endif %}
{% else %}
{% if episode.description %}
<article class="text">
{{ episode.description|safe }}
</article>
{% elif episode.text %}
<article class="text">
{{ episode.text|safe|striptags|truncatewords:50}}
</article>
{% endif %}
{% endif %}
<div class="metas">
{% if episode.serie or episode.auteur or episode.redif %}
......
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