Commit e9f36ce8 authored by fred's avatar fred
Browse files

Merge branch 'master' into wip/three-columns

Conflicts:
	panikweb_templates/templates/home.html
	panikweb_templates/templates/news.html
	panikweb_templates/templates/news/roll.html
parents 9c61b391 4dbebfed
......@@ -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()
......@@ -441,7 +441,8 @@ class News(TemplateView):
def get_context_data(self, **kwargs):
context = super(News, self).get_context_data(**kwargs)
context['sectionName'] = "News"
context['news'] = NewsItem.objects.all().exclude(image__isnull=True).exclude(image__exact='').order_by('-date')[:14]
context['focus'] = list(NewsItem.objects.select_related('category').filter(focus=True).exclude(image__isnull=True).exclude(image__exact='').order_by('-date')[0:9])
context['news'] = NewsItem.objects.all().exclude(image__isnull=True).exclude(image__exact='').order_by('-date')[:30]
return context
news = News.as_view()
......
......@@ -91,7 +91,7 @@
width:60%;
}
.wrapper.navigation .rightPart{
width:38%;
width:35%;
}
.wrapper .leftPart{
float:left;
......@@ -99,21 +99,27 @@
.wrapper .rightPart{
float:right;
}
#specialHome {
padding-left: 0;
}
/*
#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;
......@@ -282,9 +288,6 @@ body{
padding:0 0 0 0;
}
#Player #player-container #audioPlayer, #Player.withPlaylist #player-container #audioPlayer{
margin:1em 0;
}
@media screen and (min-width: 600px) {
......@@ -377,6 +380,7 @@ body{
}
}
#specialHome div.rightPart h1,
div.focus {
color: #0000ff;
}
......@@ -438,6 +442,9 @@ h1.top#frequence {
#fiber-nav li a{
padding:0.5em;
}
#fiber-nav .current{
font-weight:bold;
}
/****************************************************/
......@@ -783,15 +790,17 @@ h1.top#frequence {
}
.episode.resume .sound{
float:right;
margin:0 0 1em 1em;
margin:0 0 0.5em 0.5em;
}
.episode.inline .sound.right{
width:2em;
width:4.5em;
text-align:center;
font-size:70%;
}
.episode.inline .sound.right button{
width:1.2em;
font-size:1.5em;
display:inline;
text-align:center;
padding-bottom:0.05em;
}
......@@ -863,7 +872,12 @@ h1.top#frequence {
font-size:0.9em;
padding:0.3em;
}
.newsList .current a{
opacity:0.5;
}
.newsList .current img{
border-color:#0000FF;
}
/*
.newsRoll {
padding-top: 5px;
......@@ -1061,7 +1075,7 @@ ul.newsSpecial{
color: #888;
}
.program-week .inline,.program-week .resume{padding:0;}
.program-week .description{color:#aaa;}
.program-week .description{}
.program-week .metas{display:inline-block;}
/****************************************************/
......@@ -1082,7 +1096,7 @@ ul.newsSpecial{
font-style: italic;
}
.search a.icon-check-empty.count-0{
.newsFilters .count-0{
display:none !important;
}
/****************************************************/
......@@ -1222,6 +1236,16 @@ nav#program li {
/*******************************/
.style-000000 #Nav
{background:#000000 !important;color:#ffffff !important;}
.style-000000 #Nav .active,
.style-000000 #Nav .active *,
.style-000000 .sectionLabel a,
.style-000000 #metaNav ul li.active,
.style-000000 #metaNav ul li.active a
{background: white !important;color:#000000 !important;}
.style-333333 #Nav,
.style-333333 #metaNav ul li.active,
.style-333333 #metaNav ul li.active a
......@@ -1249,38 +1273,6 @@ nav#program li {
.style-ff6633 .sectionLabel a
{background: white;color:#ff6633 !important;}
.style-ffffff,
.style-ffffff #Related
{background:#ffffff !important;color:#000000 !important;}
.style-ffffff #Footer,
.style-ffffff #metaNav ul li.active,
.style-ffffff #metaNav ul li.active a
{background:#ffffff !important;color:#0000ff !important;}
.style-ffffff #Nav,
.style-ffffff #Nav *,
.style-ffffff #Nav .active,
.style-ffffff #Nav .active *,
.style-ffffff .sectionLabel a
{background: white !important;color:#0000ff !important;text-align:left;}
.style-ffffff #Nav .secondSub{
margin-bottom:3em;
border-bottom:2px solid #0000ff;
}
.style-ffffff #Nav header{
margin:1em 0;
padding:0 0 0 0 !important;}
.style-ffffff #Nav h2{
margin:0;
padding:0 0 0 0;
font-size:5em;}
.style-ffffff #Nav .mainSub .wrapper,
.style-ffffff #Nav .mainSub *
{background:#0000ff !important;color:white !important;}
.style-ffffff #Footer{
background:transparent !important;
}
/*
.style-ffffff #player-container,
.style-ffffff #player-container *{background-color:#ff6633 !important; border-color:#ffffff !important;color:#ffffff !important;}
......
......@@ -197,7 +197,7 @@
this.registerControl('stop',{class:"icon-stop",click: function(){
thePlaylist.stopSounds();
}});
this.registerControl('playpause',{class:"icon-play-sign playPause",click: function(){
this.registerControl('playpause',{class:"icon-play playPause",click: function(){
thePlaylist.playPauseList();
}});
this.registerControl('next',{class:"icon-step-forward",click: function(){
......
......@@ -8,6 +8,10 @@
<link rel="apple-touch-icon" href="{{ STATIC_URL}}img/touch-icon.png">
<link rel="apple-touch-icon-precomposed" href="{{ STATIC_URL}}img/touch-icon.png">
<link rel="alternate" type="application/rss+xml" href="{% url 'rss-feed' %}" title="News rss feed">
<link rel="alternate" type="application/rss+xml" href="{% url 'atom-feed' %}" title="News atom feed">
<link rel="alternate" type="application/rss+xml" href="{% url 'podcasts-feed' %}" title="Podcast sounds">
<link rel="stylesheet" href="{{ STATIC_URL }}css/reset.css" type="text/css" />
<link rel="stylesheet" href="{{ STATIC_URL }}font-awesome/css/font-awesome.min.css" type="text/css" />
<link rel="stylesheet" href="{{ STATIC_URL }}css/type.css" type="text/css" />
......@@ -26,9 +30,9 @@
<body id="{{sectionName}}" class="section-{{sectionName}}">
<div id="StyleSwitcher" class="small" style="position:fixed;right:2px; top:0em;z-index:3000;width:1em;text-align:right;">
<div id="StyleSwitcher" class="small" style="position:fixed;right:2px; top:2em;z-index:3000;text-align:right;">
<button class="small icon-sign-blank" data-class="style-0000ff" style="color:#0000ff;padding:0;margin:0;"></button>
<button class="small icon-sign-blank" data-class="style-111111" style="color:#ffffff;padding:0;margin:0;"></button>
<button class="small icon-sign-blank" data-class="style-000000" style="color:#111111;padding:0;margin:0;"></button>
<button class="small icon-sign-blank" data-class="style-333333" style="color:#333333;padding:0;margin:0;"></button>
<button class="small icon-sign-blank" data-class="style-ff6633" style="color:#ff6633;padding:0;margin:0;"></button>
</div>
......
......@@ -24,10 +24,10 @@
<div class="rightPart">
<div class="sub">
{% if newsitem.emission %}
<h5 class="sectionLabel">proposé par</h5>
{% with newsitem.emission as emission %}
<div class="">{% emission_resume %}</div>
{% endwith %}
<h5 class="sectionLabel">proposé par</h5>
{% with newsitem.emission as emission %}
<div class="">{% emission_resume %}</div>
{% endwith %}
{% endif %}
<h5 class="sectionLabel right">
<a href="{% url 'newsArchives' %}">
......@@ -37,9 +37,9 @@
<h5 class="sectionLabel">
<span class="iconLabel">Dernières actus</span>
</h5>
<ul class="custom list">
<ul class="custom list newsList">
{% for content in news %}
{% if content != newsitem %}<li>{% news_inline %}</li>{% endif %}
<li class="{% if content == newsitem %}current{% endif %}">{% news_inline %}</li>
{% endfor %}
</ul>
</div>
......
......@@ -2,10 +2,12 @@
{% load thumbnails %}
{% load paniktags %}
{% load staticfiles %}
{% load i18n %}
{% block bodyID %}Home{% endblock %}
{% block title %}Home{% endblock %}
{% block main %}
<div class="sided wrapper" id="specialHome">
<div class="sided wrapper navigation" id="specialHome">
<div>
<div class="leftPart">
<h1 class="top">Émissions</h1>
......@@ -14,16 +16,34 @@
{% weeknav %}
{% weekview %}
<form method="post" action="{% url 'newsletter-subscribe' %}"
class="big center padded" id="subscribe-form">
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">
<h1 class="top">Focus</h1>
{% 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&nbsp;<a class="button icon-rss inBlock" title="{% trans 'Podcast sounds' %}" href="{% url 'podcasts-feed' %}"></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 %}
{% if emissions %}
<div id="recent-emissions">
......@@ -43,14 +63,6 @@
</div>
{% endif %}
</div>
<div class="rightPart focus">
<h1 class="top">Focus</h1>
<div>
{% with focus as news %}
{% newsroll %}
{% endwith %}
</div>
</div>
</div>
</div>
......
......@@ -18,18 +18,18 @@
title="Download file"
onclick="$('#Download-{{ sound.file.url|slugify }}').toggle();return false;"
></button>
<span class="hidden" id="Download-{{ sound.file.url|slugify }}" >
<div class="hidden" id="Download-{{ sound.file.url|slugify }}" >
{% if sound|is_format_available:'ogg' %}
<a target="_blanck" class="icon-file button" href="{{ sound|format_url:'ogg' }}">
<span>ogg</span>
<a target="_blanck" class="button inBlock" href="{{ sound|format_url:'ogg' }}">
<span class="icon-file">&nbsp;ogg</span>
</a>
{% endif %}
{% if sound|is_format_available:'mp3' %}
<a target="_blanck" class="icon-file button" href="{{ sound|format_url:'mp3' }}">
<span>mp3</span>
<a target="_blanck" class="button inBlock" href="{{ sound|format_url:'mp3' }}">
<span class="icon-file">&nbsp;mp3</span>
</a>
{% endif %}
</span>
</div>
</div>
<audio
data-player='true'
......
......@@ -7,6 +7,7 @@
<div id="Live" class="padded cf">
<div class="metas custom">
<a class="button resymbol icon-download inBlock" title="{% trans 'Get the stream on your player!' %}" href="http://streaming.domainepublic.net:8000/radiopanik.ogg.m3u"></a>
<a class="button icon-rss inBlock" title="{% trans 'Podcast sounds' %}" href="{% url 'podcasts-feed' %}"></a>
<button title="{% trans 'Need some help?' %}" onclick="$('#PlayerHelp').toggle();" class="icon-question-sign"></button>
</div>
<span class="button" id="DirectStreamPanikControler">
......
{% extends "base.html"%}
{% load paniktags %}
{% load i18n %}
{% block title %}News{% endblock %}
{% block toptitle %}
<h1 class="top">Actus</h1>
......@@ -8,38 +9,29 @@
{% news_nav %}
{% endblock %}
{% block main %}
<div class="news wrapper navigation">
<div class="leftPart">
{% with news|slice:"0:3" as news %}
<div class="wrapper">
<ul class="custom columns news newsSpecial cf by2">
{% for content in news %}
<li class="item">
{% news_inline klass="special"%}
</li>
{% endfor %}
</ul>
</div>
{% endwith %}
{% with news|slice:"3:" as news %}
<div class="wrapper">
<ul class="custom columns list news cf">
{% for content in news %}
<li class="item">
{% news_inline%}
</li>
{% endfor %}
</ul>
</div>
{% endwith %}
</div>
<div class="detail marged news cf">
<div class="wrapper navigation">
<div class="leftPart">
<div class="news">
<h5 class="sectionLabel">Focus</h5>
{% with focus as news %}
<ul class="custom columns cf padded">
{% for content in news %}
<li class="">
{% news_inline klass="special"%}
</li>
{% endfor %}
</ul>
{% endwith %}
</div>
</div>
<div class="rightPart">
<div class="sub">
{% if newsitem.emission %}
<h5 class="sectionLabel">proposé par</h5>
{% with newsitem.emission as emission %}
<div class="">{% emission_resume %}</div>
{% endwith %}
<h5 class="sectionLabel">proposé par</h5>
{% with newsitem.emission as emission %}
<div class="">{% emission_resume %}</div>
{% endwith %}
{% endif %}
<h5 class="sectionLabel right">
<a href="{% url 'newsArchives' %}">
......@@ -48,14 +40,16 @@
</h5>
<h5 class="sectionLabel">
<span class="iconLabel">Dernières actus</span>
<a class="button icon-rss inBlock" title="{% trans 'Rss news' %}" href="{% url 'rss-feed' %}"></a>
</h5>
<ul class="custom list">
<ul class="custom list newsList">
{% for content in news %}
{% if content != newsitem %}<li>{% news_inline %}</li>{% endif %}
<li class="{% if content == newsitem %}current{% endif %}">{% news_inline %}</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
{% endblock %}
{% block links %}
......
......@@ -4,7 +4,7 @@
<a class="block cf" href="{% url 'newsitem-view' slug=content.slug %}">
<div class="logo">
{% if class == "special" and content.image %}
<img class="nomal" src="{{ content.image|thumbnail:'320x240' }}"/>
<img class="normal" src="{{ content.image|thumbnail:'640x480' }}"/>
{% elif content.image %}
<img class="left" src="{{ content.image|thumbnail:'60x60' }}"/>
{% else %}
......
{% load thumbnails %}{% load i18n %}
<div id="newsRoll">
<div class="newsRoll center wrapper navigation cf">
<ul id="ticker" class="custom bigNews" 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" 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>
......@@ -14,7 +14,7 @@
</div>
</div>
<div class="wrapper">
<div>
<div class="newsFilters">
{% if query or selected_tags %}
<nav class="">
{% if facets.fields.categories %}
......@@ -25,10 +25,11 @@
<li>
{% if category.0 in selected_categories %}
<a class="check icon-check count-{{ category.1 }}" href="{{ request.get_full_path|remove_category_facet:category.0 }}">
{{ category.0 }} | {{ category.1 }}
{{ category.0 }} <span class="smooth">| {{ category.1 }}</span>
</a>
{% else %}
<a class="check icon-check-empty count-{{ category.1 }}" href="{{ request.get_full_path|append_category_facet:category.0 }}">{{ category.0 }} | {{ category.1 }}</a></span>
<a class="check icon-check-empty count-{{ category.1 }}" href="{{ request.get_full_path|append_category_facet:category.0 }}"
>{{ category.0 }} <span class="smooth">| {{ category.1 }}</span></a></span>
{% endif %}
</li>
{% endfor %}
......@@ -44,10 +45,10 @@
<li>
{% if tag.0 in selected_tags %}
<a class="check icon-check count-{{ tag.1 }}" href="{{ request.get_full_path|remove_tag_facet:tag.0 }}">
{{ tag.0 }} | {{ tag.1 }}
{{ tag.0 }} <span class="smooth">| {{ tag.1 }}</span>
</a>
{% else %}
<a class="check icon-check-empty count-{{ tag.1 }}" href="{{ request.get_full_path|append_tag_facet:tag.0 }}">{{ tag.0 }} | {{ tag.1 }}</a>
<a class="check icon-check-empty count-{{ tag.1 }}" href="{{ request.get_full_path|append_tag_facet:tag.0 }}">{{ tag.0 }} <span class="smooth">| {{ tag.1 }}</span></a>
{% endif %}
</li>
{% endfor %}
......
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