Commit 505ed00a authored by Simon Daron's avatar Simon Daron

New TPL structure

parent 48223d41
......@@ -159,7 +159,8 @@ class Home(TemplateView):
def get_context_data(self, **kwargs):
context = super(Home, self).get_context_data(**kwargs)
context['news'] = NewsItem.objects.all().exclude(image__isnull=True).exclude(image__exact='').order_by('-datetime')[:5]
context['newsImaged'] = NewsItem.objects.all().exclude(image__isnull=True).exclude(image__exact='').order_by('-datetime')[:3]
context['news'] = NewsItem.objects.all().order_by('-datetime')[:60]
context['emissions'] = Emission.objects.filter(archived=False).order_by('title')
context['player'] = audioPlayer()
return context
......
......@@ -404,7 +404,10 @@ button.tag {
/**** News ****/
.list.news li {
display:block;
border-style:solid;
border-width:1px 0;
}
.news .date{padding:1em;}
.news .title{
margin-bottom:1em;
}
......
......@@ -35,6 +35,9 @@
<div id="Main">
{% block main %}{% endblock %}
</div>
<div id="Links">
{% block links %}{% endblock %}
</div>
</div>
......
{% extends "base.html" %}
{% extends "news.html" %}
{% block listen %}{% include "includes/player.html" %}{% endblock %}
{% block bodyID %}Home{% endblock %}
{% block main %}
<div class="news mainLegend">
<div class="wrapper">
<h1 class="squashed">News</h1>
</div>
</div>
<div class="news">
<div class="wrapper">
<ul class="custom list news">
{% for NewsItem in news %}
<li class="item num-{{forloop.counter}}">
{% if NewsItem.slug == news.0.slug %}
{% include "news/inline.html" with content=NewsItem class="special" logo="large"%}
{% elif NewsItem.slug == news.1.slug or NewsItem.slug == news.2.slug%}
{% include "news/inline.html" with content=NewsItem class="special" logo="medium"%}
{% else %}
{% include "news/inline.html" with content=NewsItem%}
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</div>
{% block links %}
<div class="mainLegend">
<div class="wrapper">
<h1 class="squashed">Emissions</h1>
</div>
</div>
<div class="wrapper">
<ul class="custom list columns">
<ul class="custom list columns padded">
{% for emission in emissions %}
<li class="item">
<a href="{% url 'emission-view' slug=emission.slug %}">{{ emission.title }}</a>
......
{% extends "base.html" %}
{% block bodyID %}Player{% endblock %}
{% block main %}
{% endblock %}
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