mirror of
https://github.com/almet/notmyidea.git
synced 2025-04-30 20:42:37 +02:00
50 lines
1.7 KiB
HTML
50 lines
1.7 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content_title %}{% endblock %}
|
|
{% block js %}
|
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
|
|
<script language="javascript">
|
|
$(document).ready(function(){
|
|
$('#lang-selector a').each(function(i, item){
|
|
$(item).click(function(){
|
|
$(item).toggleClass('deactivated');
|
|
|
|
$('a[class="' + item.lang +'"]').each(function(i, article){
|
|
$(article).toggle();
|
|
});
|
|
|
|
return false;
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{% if articles %}
|
|
<section id="content" class="body">
|
|
<div id="lang-selector">filter by language: <a href="#" lang='en'>english</a>, <a href="#" lang='fr'>french</a></div>
|
|
<ol id="posts-list" class="hfeed">
|
|
{% set category = None %}
|
|
{% for article in articles_page.object_list %}
|
|
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="{{ article.title}}" class='{{ article.lang }}'>
|
|
<li><article class="hentry {{ article.category }}">
|
|
{% if article.category.name != category %}
|
|
<span class='category {{ article.category }}'>{{ article.category }}</span>
|
|
{% set category = article.category.name %}
|
|
{% endif %}
|
|
<h1> {{ article.title }} </h1>
|
|
</article></li>
|
|
</a>
|
|
{% endfor %}
|
|
</ol><!-- /#posts-list -->
|
|
</section><!-- /#content -->
|
|
{% else %}
|
|
<section id="content" class="body">
|
|
<h2>Pages</h2>
|
|
{% for page in PAGES %}
|
|
<li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
|
|
{% endfor %}
|
|
</section>
|
|
{% endif %}
|
|
{% endblock content %}
|