Commit be05aef8 authored by Simon Daron's avatar Simon Daron

Merging news modif

parent f31f699b
......@@ -32,6 +32,7 @@ def audio(context, sound=None):
def news_nav(context, date=None):
return {
'newsitem': context.get('newsitem'),
'categories': context.get('categories'),
'news': context.get('news'),
}
......
......@@ -416,7 +416,7 @@ class NewsItemView(DetailView):
context['sectionName'] = "News"
context['focus'] = list(NewsItem.objects.all().exclude(image__isnull=True).exclude(image__exact='').order_by('-datetime')[0:6])
context['newsAll'] = list(NewsItem.objects.all().order_by('-datetime')[:60])
context['categories'] = list(NewsCategory.objects.all())
context['categories'] = NewsCategory.objects.all()
return context
newsitemview = NewsItemView.as_view()
......@@ -428,7 +428,7 @@ class News(TemplateView):
context['focus'] = list(NewsItem.objects.all().exclude(image__isnull=True).exclude(image__exact='').order_by('-datetime')[0:6])
context['news'] = list(NewsItem.objects.all().exclude(image__isnull=True).exclude(image__exact='').order_by('-datetime')[3:45])
context['newsAll'] = list(NewsItem.objects.all().order_by('-datetime')[:60])
context['categories'] = list(NewsCategory.objects.all())
context['categories'] = NewsCategory.objects.all()
return context
news = News.as_view()
......
......@@ -274,11 +274,6 @@ body{
background:#003446;
*/
}
#Home #Nav, #News #Nav{
-moz-box-shadow: 0px 0px 100px rgb(0, 0, 0) inset;
-webkit-box-shadow: 0px 0px 100px rgb(0, 0, 0) inset;
box-shadow: 0px 0px 100px rgb(0, 0, 0) inset;
}
#Nav nav{padding:0.1em;}
#Nav *{ color:#ddd;border-color:#ddd;}
#Nav input{color:#333;}
......@@ -640,6 +635,13 @@ body{
/**** News ****/
/****************************************************/
#newsRoll {
border-top:2px solid black;
border-bottom:2px solid black;
-moz-box-shadow: 0px 0px 100px rgb(0, 0, 0) inset;
-webkit-box-shadow: 0px 0px 100px rgb(0, 0, 0) inset;
box-shadow: 0px 0px 100px rgb(0, 0, 0) inset;
}
.list.news li {
}
.news li a{padding:1em;}
......
......@@ -36,7 +36,7 @@ $(function() {
doLog('Sorry! And error occur when loading page content','error');
}
new_content = $($.parseHTML(html)).find('#Changing>*');
$main.hide().empty().append(new_content).fadeIn();
$main.hide().empty().append(new_content).show();
new_menu = $($.parseHTML(html)).find('#metaNav>*');
$metaNav.empty().append(new_menu);
......
......@@ -8,7 +8,7 @@
<div class="leftPart">
<header>
{% if newsitem.datetime %}
<div class="date cf center">{{ newsitem.datetime|date:"D m/M" }}</div>
<div class="date cf center label">{{ newsitem.datetime|date:"D m/M" }}</div>
{% endif %}
<h3 class="squashed title">
{{ newsitem.title }}
......
{% load paniktags %}
{% newsroll %}
<!--
TODO make requests to load specific news roll & compagnie from groups
-->
<div class="wrapper">
<nav>
<ul class="inline padded">
<li><a href="{% url 'news' %}" class="{% if class != "archives" %}active{% endif %}">
<span class="iconLabel">Dernières</span>
</a></li>
<li><a href="{% url 'archives' %}" class="{% if class = "archives" %}active{% endif %}">
<span class="icon-archive" ></span>
<span class="iconLabel">Archives</span>
</a></li>
</ul>
</nav>
</div>
<div class="wrapper">
{% if categories %}
<nav id="newsNav" class="checkable">
<ul class="by{{ categories.count }}">
{% for category in categories %}
<li><button class="check icon-check" data-about="#Main" data-toggle=".{{ category|slugify }}">{{ category }}</button></li>
<li><a href="#">{{ category }}</a></li>
{% endfor %}
</ul>
</nav>
{% endif %}
</div>
{% newsroll %}
{% load thumbnails %}{% load i18n %}
<div class="newsRoll center wrapper">
<ul class="custom distributed">
<li class="title">
<h4 class="label vertical">{% trans 'News' %}</h4>
</li>
{% for content in news %}
<li class="{% if forloop.counter > 3 %}largeScreens{% endif %}">
<a title="{{content.title|striptags|addslashes}}" class="block news relative" href="{% url 'news-view' slug=content.slug %}">
{% if content.image %}
<div class="absolute">
<h5 class="title ellipsis">{{ content.datetime|date:"D m/M" }}</h5>
</div>
<img class="logo" src="{{ content.image|thumbnail:'240x320' }}"/>
{% endif %}
</a>
<div id="newsRoll">
<div class="newsRoll center wrapper">
<ul class="custom distributed">
<li class="title">
<h4 class="label vertical">{% trans 'News' %}</h4>
</li>
{% endfor %}
</ul>
{% for content in news %}
<li class="{% if forloop.counter > 3 %}largeScreens{% endif %}">
<a title="{{content.title|striptags|addslashes}}" class="block news relative" href="{% url 'news-view' slug=content.slug %}">
{% if content.image %}
<div class="absolute">
<h5 class="title ellipsis">{{ content.datetime|date:"D m/M" }}</h5>
</div>
<img class="logo" src="{{ content.image|thumbnail:'240x320' }}"/>
{% endif %}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
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