Commit 34ba89d5 authored by Simon Daron's avatar Simon Daron

Give some nav to news & allow resizing for logos

parent 528d8126
......@@ -432,6 +432,7 @@ class NewsItemView(DetailView):
context['sectionName'] = "News"
context['focus'] = list(NewsItem.objects.select_related('category').filter(focus=True).exclude(image__isnull=True).exclude(image__exact='').order_by('-date')[0:9])
context['categories'] = NewsCategory.objects.all()
context['news'] = NewsItem.objects.all().exclude(image__isnull=True).exclude(image__exact='').order_by('-date')[:10]
return context
newsitemview = NewsItemView.as_view()
......
......@@ -4,33 +4,39 @@
{% block title %}{{ newsitem.title }}{% endblock %}
{% block main %}
<div class="detail padded news cf">
<div class="wrapper text">
<div class="wrapper navigation">
<div class="leftPart">
<header>
{% if newsitem.date %}
<div class="date cf center label">{{ newsitem.date|date:"D m M Y" }}</div>
{% endif %}
<h3 class="squashed title">
<h2 class="squashed title">
{{ newsitem.title }}
</h3>
</h2>
</header>
{% if newsitem.image %}
<img class="logo right" src="{{ newsitem.image.url }}"/>
<img class="logo right button" onclick="$(this).toggleClass('right marged');" src="{{ newsitem.image.url }}"/>
{% endif %}
<div class="userContent description">
{{ newsitem.text|safe}}
</div>
</div>
{% if newsitem.emission %}
<div class="rightPart">
<div class="sub">
<h5 class="sectionLabel">proposé par</h5>
{% with newsitem.emission as emission %}
<div class="">{% emission_resume %}</div>
{% endwith %}
{% if newsitem.emission %}
<h5 class="sectionLabel">proposé par</h5>
{% with newsitem.emission as emission %}
<div class="">{% emission_resume %}</div>
{% endwith %}
{% endif %}
<h5 class="sectionLabel">Dernières news</h5>
<ul class="custom list">
{% for content in news %}
<li>{% news_inline %}</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
</div>
</div>
{% 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