Commit 89b748ee authored by Simon Daron's avatar Simon Daron

Focus on right with normal navigation for home (up this week)

parent a64b70e2
......@@ -417,7 +417,7 @@ class Home(TemplateView):
where=['''datetime = (SELECT MIN(datetime)
FROM emissions_diffusion
WHERE episode_id = emissions_episode.id)'''],
tables=['emissions_diffusion'],).order_by('-first_diffusion').distinct() [:6]
tables=['emissions_diffusion'],).order_by('-first_diffusion').distinct() [:3]
context['newsletter_form'] = SubscribeForm()
......
......@@ -91,7 +91,7 @@
width:60%;
}
.wrapper.navigation .rightPart{
width:38%;
width:35%;
}
.wrapper .leftPart{
float:left;
......@@ -99,21 +99,24 @@
.wrapper .rightPart{
float:right;
}
/*
#specialHome .leftPart,
#specialHome .rightPart {
width: 100%;
}
*/
}
@media screen and (min-width: 1280px) {
/*
#specialHome .leftPart {
width: 60%;
}
#specialHome .rightPart {
width: 30%;
}
*/
#recent-emissions ul.columns,
#recent-sounds ul.columns {
column-count: 1;
......
......@@ -17,13 +17,10 @@
{% endblock %}
{% block main %}
<div class="marged">
{% with focus as news %}
{% newsroll %}
{% endwith %}
</div>
<div class="sided wrapper" id="specialHome">
<div class="sided wrapper navigation" id="specialHome">
<div class="marged">
<div class="leftPart">
<h2><a href="{% url 'program' %}">Cette semaine sur Panik</a></h2>
......@@ -31,9 +28,34 @@
{% weeknav %}
{% weekview %}
<form method="post" action="{% url 'newsletter-subscribe' %}"
class="big center padded marged" 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">
{% with focus as news %}
{% newsroll %}
{% endwith %}
{% if soundfiles %}
<div id="recent-sounds">
<h3 class="sectionLabel right"><a href="{% url 'listen' %}">Tous</a></h3>
<h3 class="sectionLabel">Derniers sons</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 %}
{% if emissions %}
<div id="recent-emissions">
<h3 class="sectionLabel"><a href="{% url 'emissions' %}">Nouveau dans la grille</a></h3>
......@@ -51,21 +73,6 @@
</ul>
</div>
{% endif %}
{% if soundfiles %}
<div id="recent-sounds">
<h3 class="sectionLabel right"><a href="{% url 'listen' %}">Tous</a></h3>
<h3 class="sectionLabel">Derniers sons</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>
......@@ -73,11 +80,4 @@
{% endblock %}
{% block related %}
<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>
{% endblock %}
{% load thumbnails %}{% load i18n %}
<div id="newsRoll">
<div class="newsRoll center wrapper navigation cf">
<ul id="ticker" class="custom bigNews leftPart" style="height:360px;overflow:hidden;">
<div class="newsRoll center cf">
<ul id="ticker" class="custom bigNews marged" style="height:300px;overflow:hidden;">
{% for content in news %}
<li
id="newsRollId-{{ content.slug }}"
class="">
<a
style="max-width:100%;height:360px;background: no-repeat 50% 50% url('{{ content.image|thumbnail:'800x600' }}');"
style="max-width:100%;height:300px;background: no-repeat 50% 50% url('{{ content.image|thumbnail:'800x600' }}');"
class="block news relative"
href="{% url 'newsitem-view' slug=content.slug %}">
{% if content.category %}
......@@ -21,16 +21,16 @@
</li>
{% endfor %}
</ul>
<ul class="custom inline rightPart" id="roller">
{% for content in news %}
<li class="num-{{ forloop.counter }}">
<button class="inBlock" data-about="#newsRollId-{{ content.slug }}">
<img src="{{ content.image|thumbnail:'80x60' }}" />
</button>
</li>
{% endfor %}
</ul>
<style>
</style>
<div class="marged">
<ul class="custom distributed by3 padded" id="roller">
{% for content in news|slice:'0:3' %}
<li style="width:30%;" class="num-{{ forloop.counter }} padded">
<button class="inBlock" data-about="#newsRollId-{{ content.slug }}">
<img style="width:98%;" src="{{ content.image|thumbnail:'160x120' }}" />
</button>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
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