Commit 8260258b authored by fred's avatar fred

set homepage to match earlier 3 columns layout

parent a5549c46
......@@ -12,7 +12,7 @@ from django.db.models.query import QuerySet
from django.utils import simplejson
from datetime import datetime, timedelta
from emissions.models import Emission, Episode, NewsItem
from emissions.models import Emission, Episode, NewsItem, SoundFile
from emissions.utils import period_program
from panikweb import utils
......@@ -110,9 +110,13 @@ def soundfile_resume(soundfile, date=None):
return {'soundfile': soundfile,
'date': date}
@register.inclusion_tag('includes/player.html', takes_context=False)
def player():
return {'unique': uuid.uuid4()}
@register.inclusion_tag('includes/player.html', takes_context=True)
def player(context):
return {
'unique': uuid.uuid4(),
'soundfiles': context.get('soundfiles'),
}
@register.inclusion_tag('includes/metaNav.html', takes_context=True)
def metanav(context, active=None):
......
......@@ -315,6 +315,14 @@ body{
margin-top: 0;
}
ul#ticker {
margin-bottom: 10px;
}
}
div.focus {
color: #0000ff;
}
/****************************************************/
......@@ -784,12 +792,12 @@ body{
padding: 1em;
}
.newsRoll a, .newsRoll button img{
border:2px solid black;
border:2px solid #0000ff;
}
.newsRoll .labels .item{
display:block;
background:#3333FF;
background:#0000FF;
color:white;
margin:0.1em;
font-size:0.9em;
......
......@@ -4,36 +4,27 @@
{% load staticfiles %}
{% block bodyID %}Home{% endblock %}
{% block title %}Home{% endblock %}
{% block nav %}
<div class="mainSub">
<div class="wrapper">
<nav>
<form method="get" action="{% url 'search' %}" class="big marged" id="search-form">
<label for="id_q">Rechercher:</label><input id="id_q" name="q" type="text"><button class="icon-search"></button>
</form>
</nav>
</div>
</div>
{% endblock %}
{% block main %}
<div class="marged">
{% with focus as news %}
{% newsroll %}
{% endwith %}
</div>
<div class="sided wrapper" id="specialHome">
<div class="marged">
<div>
<div class="leftPart">
<h1 class="top">Émissions</h1>
<h2><a href="{% url 'program' %}">Cette semaine sur Panik</a></h2>
{% weeknav %}
{% weekview %}
</div>
<div class="rightPart">
<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>
{% if emissions %}
<div id="recent-emissions">
<h3 class="sectionLabel"><a href="{% url 'emissions' %}">Nouveau dans la grille</a></h3>
......@@ -51,33 +42,16 @@
</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 class="rightPart focus">
<h1 class="top">Focus</h1>
<div>
{% with focus as news %}
{% newsroll %}
{% endwith %}
</div>
</div>
</div>
</div>
{% 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 i18n %}
{% load paniktags %}
<div id="player-container" class="normal cf">
<button id="togglePlayer" class="hidden left huge icon-double-angle-left "></button>
<div id="player" class="cf">
......@@ -41,4 +42,20 @@
</div>
</div>
</div>
</div>
{% 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 %}
{% 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;">
<ul id="ticker" class="custom bigNews" style="height:360px;overflow:hidden;">
{% for content in news %}
<li
id="newsRollId-{{ content.slug }}"
......@@ -21,7 +21,7 @@
</li>
{% endfor %}
</ul>
<ul class="custom inline rightPart" id="roller">
<ul class="custom inline" id="roller">
{% for content in news %}
<li class="num-{{ forloop.counter }}">
<button class="inBlock" data-about="#newsRollId-{{ content.slug }}">
......
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