Commit 41702e4f authored by Simon Daron's avatar Simon Daron

Add news to home & templates

parent 84b0bfb5
......@@ -6,7 +6,8 @@ from django.views.decorators.csrf import csrf_exempt
from jsonresponse import to_json
from emissions.models import Emission, Episode, Diffusion, SoundFile, Schedule
from emissions.models import Emission, Episode, Diffusion, SoundFile, Schedule, NewsItem, NewsCategory
from emissions.utils import whatsonair
class ProgramView(TemplateView):
......@@ -158,6 +159,7 @@ class Home(TemplateView):
def get_context_data(self, **kwargs):
context = super(Home, self).get_context_data(**kwargs)
context['news'] = NewsItem.objects.all().order_by('datetime')
context['emissions'] = Emission.objects.filter(archived=False).order_by('?')
return context
......
......@@ -5,10 +5,12 @@ a {
color:black;
text-decoration: none;
}
a:hover,button:hover {
opacity:0.8;
a:hover {
text-decoration: underline;
}
button:hover {
opacity:0.8;
}
a.active, button.active{
opacity:0.2;
}
......@@ -39,7 +41,7 @@ article h3, .content h3 { color:#aaa;font-size: 1.5em;}
article h4, .content h4 { color:#aaa;font-size: 1.4em;}
article h5, .content h5 { color:#aaa;font-size: 1.3em;}
h1{
h1, .squashed{
transform: scale(0.5, 1);
-webkit-transform: scale(0.5, 1);
-moz-transform: scale(0.5, 1);
......
......@@ -2,7 +2,7 @@
@black: #000000;
@orange: #FF6633;
@blue: #0000FF;
@blue: #364b63;
@white: #FFFFFF;
*/
.resymbol:hover,.control:hover{ opacity:0.5; }
......@@ -10,6 +10,16 @@
#player, #player .symbol{ color: #FF6633; }
#player .label { background-color:#FF6633; }
*/
.mainLegend{padding:0.2em;background:#000;color:#fff;}
#News, #news, .mainLegend.news{
background-color:#1663d5;
border-color:#fff !important;
color:white !important;
}
.news, .news *{
border-color:#1663d5 !important;
color:#1663d5 !important;
}
#player .metas, #player img{border-color:#fff;}
#Player, #player{
background-color:#ff6633;
......@@ -33,7 +43,6 @@
font-family: "RegloBold";
}
#player .help{
font-size:0.9em;
}
#metaNav {
font-family: "Reglo";
......@@ -69,35 +78,6 @@ h1.title{
margin: 0.2em 0 0.2em 0;
}
.iconLabel{margin-left:0.1em;}
/* SIZES
@xxs: 8px;
@xs: 10px;
@s: 12px;
@m: 16px;
@l: 20px;
@xl: 36px;
@xxl: 60px;
@xxxl: 80px;
@xxs: 0.667em;
@xs: 0.833em;
@s: 1em;
@m: 1.33em;
@l: 1.66em;
@xl: 3em;
@xxl: 5em;
@xxxl: 6.667em;
@player-width: 210px;
@content-width: 498px;
@breves-width: 370px;
*/
/*@wrapper-width: @player-width + 60px + @content-width + 50px + @breves-width;*/
/*@wrapper-width:auto;*/
/*@import "mixins";*/
/*@import "forms";*/
/* GLOBAL STYLES */
body {
background-color: white;
......@@ -172,7 +152,8 @@ button.tag {
.list > li{
padding:0.5em;
min-height: 2.5em;
border-bottom: 1px solid #000000;
border-width:0 0 1px 0 ;border-style:solid;
border-color:#ccc;
}
/**** TABS ****/
......@@ -260,7 +241,7 @@ button.tag {
/*#Home #player{ float: left; } */
#player{}
#player .content{
padding:5%;
padding:5% 0em 5% 0em;
max-width:300px;
margin:auto;
}
......@@ -282,9 +263,6 @@ button.tag {
/****************************************************/
.inline{padding:0.5em;}
/**** Liste ****/
.list > li{
border-bottom: 2px solid #ccc !important;
}
/**** EMISSIONS ****/
#Emission{max-width:600px;margin:auto;}
#Emission .emission-detail .title{}
......
{% extends "base.html" %}
{% block bodyID %}Home{% endblock %}
{% block content %}
{% include "includes/program.html" %}
<h1 class="squashed news mainLegend">News</h1>
<ul class="custom list news">
{% for NewsItem in news %}
<li class="item">{% include "news/inline.html" with content=NewsItem%} </li>
{% endfor %}
</ul>
<h1 class="squashed mainLegend">Emissions</h1>
<ul class="custom list">
{% for emission in emissions %}
<li class="item">{% include "emissions/inline.html" %} </li>
......
<div class="content content-inline inline cf">
<div class="">
{% if content.date %}
<div class="date cf">
<span class="day">XX</span>
<span class="day-number">00</span>
<span class="year">0000</span>
</div>
{% endif %}
<a class="link" href="{% url 'emission-view' slug=content.slug %}">
{% if content.image %}
<img width="50" height="50" src="{{ content.image|thumbnail:'50x50' }}"/>
{% else %}
<img src="http://placehold.it/50X50" />
{% endif %}
<h5 class="title ellipsis">{{ content.title }}</h5>
{% if content.description %}
<div class="description ellipsis">
{{ content.description|safe|striptags }}
</div>
{% elif content.text %}
<div class="description ellipsis">
{{ content.text|safe|striptags|truncatewords:20}}
</div>
{% endif %}
</a>
</div>
</div>
......@@ -15,13 +15,13 @@
</li>
<li><a title="Get the stream on your player!" class="button resymbol icon-download" href="http://streaming.domainepublic.net:8000/radiopanik.ogg.m3u"></a></li>
<li><button title="Show/Hidden HTML5 audio player" onclick="$('#DirectStreamPanik').toggleClass('hidden');$(this).toggleClass('icon-eye-open icon-eye-close');return false;" class="icon-eye-open"></button></li>
<li><button onclick="$('#PlayerHelp').toggle();" class="icon-question-sign"></button></li>
<li><button title="Need some help?" onclick="$('#PlayerHelp').toggle();" class="icon-question-sign"></button></li>
</ul>
<article id="PlayerHelp" class="hidden help">
<p>Le contenu des émissions n&#8217;étant pas limité à un niveau local, le stream permet de les écouter aux quatre coins du monde. Mais aussi et surtout, à Bruxelles, dans les zones où la radio n&#8217;est pas captée facilement.</p>
<p>Le serveur de streaming a été mis en place par l&#8217;asbl A.C.T.I.C et est hébergé par <a href="http://www.domainepublic.net/" class='spip_out' rel='external'>Domainepublic.net</a> . Il fonctionne exclusivement grâce à des logiciels libres.</p>
<p>Si votre logiciel ne parvient pas à lire le stream de Radio Panik, nous vous conseillons de télécharger <a href="http://framakey.org/Portables/PortableVLC" class='spip_out' rel='external'>VLC Media Player</a>, un lecteur multimedia impressionnant de par ses nombreuses fonctionnalités (supporte de nombreux formats de stream, d&#8217;audio, de vidéo, peut servir de relais streamcast), qui fonctionne aussi bien sous Linux que sous Windows ou Mac OS.</p>
<p><dt>URL du stream</dt><dd><a href="http://streaming.domainepublic.net:8000/radiopanik.ogg">http://streaming.domainepublic.net:8000/radiopanik.ogg</a></dd></p>
<p><dt>URL du stream</dt><dd class="ellipsis"><a href="http://streaming.domainepublic.net:8000/radiopanik.ogg">http://streaming.domainepublic.net:8000/radiopanik.ogg</a></dd></p>
</article>
<style>#RefreshWhatsOnAir {display:block !important;float:right;position:relative;}</style>
<script type="text/javascript">
......
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