-
Notifications
You must be signed in to change notification settings - Fork 161
/
home.html
188 lines (159 loc) · 8.78 KB
/
home.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
{% extends "base.html" %}
{% load staticfiles %}
{% load emarkdown %}
{% load date %}
{% load interventions %}
{% load topbar %}
{% load thumbnail %}
{% load i18n %}
{% load captureas %}
{% load crispy_forms_tags %}
{% load pluralize_fr %}
{% block body_class %}flexpage home{% endblock %}
{% block searchbox_id %}search-home{% endblock %}
{# Don't show the subheader on the home page #}
{% block subheader %}{% endblock %}
{% block content_out %}
{% url 'opinion:list' as url_opinions %}
{% url 'cats-forums-list' as url_forums %}
{% url 'publication:list' as url_publications %}
{% url 'pages-association' as url_association %}
<section class="flexpage-header">
<div class="flexpage-wrapper">
{% if user.is_authenticated %}
<section class="home-description connected">
<blockquote><span>{{ quote }}</span></blockquote>
{% if featured_message %}
{% include "featured/includes/featured_message.part.html" %}
{% endif %}
</section>
{% else %}
<section class="home-description short" id="description">
<blockquote><span>{% trans "Zeste de Savoir, la connaissance" %}</span> <span>{% trans "pour tous et sans pépins" %}</span></blockquote>
<a class="home-description-button" href="#description">
{% trans "En savoir plus" %}
</a>
<a href="#" class="home-description-button close-description">
{% trans "Fermer" %}
</a>
</section>
<section class="home-description">
<div class="column">
<h2>{% trans "La connaissance pour tous" %}</h2>
{% blocktrans with site_name=app.site.literal_name %}
<p>
{{ site_name }} : un site de <strong>partage de connaissances</strong> où vous trouverez,
<strong>gratuitement</strong> et <strong>sans publicité</strong> :
</p>
<ul>
<li>une <a href="{{ url_publications }}">bibliothèque</a>, comprenant des <a href="{{ url_publications }}?type=tutorial">tutoriels</a> et <a href="{{ url_publications }}?type=article">articles</a> de tous niveaux ;</li>
<li>une <a href="{{ url_opinions }}">tribune</a>, où se trouvent les billets écrits par les membres ;</li>
<li>et des <a href="{{ url_forums }}">forums d'entraide</a>.</li>
</ul>
<p>Tout est animé par la communauté, tous les sujets sont abordés !</p>
{% endblocktrans %}
</div>
<div class="column">
<h2>{% trans "Partagez vos savoirs…" %}</h2>
{% blocktrans %}
<p><strong>Tous les membres</strong> peuvent écrire et <strong>publier des contenus</strong>.</p>
<p>Pour assurer la qualité, l’équipe du site valide chaque tutoriel et article.</p>
{% endblocktrans %}
<h2>{% trans "… sur une plate-forme libre" %}</h2>
{% blocktrans %}
<p>Le site est géré et financé par une <a href="{{ url_association }}">association</a> à but non lucratif.</p>
{% endblocktrans %}
{% if app.site.contribute_link %}
{% blocktrans with contribute_link=app.site.contribute_link %}
<p>Chacun peut <a href="{{contribute_link}}">contribuer au code source</a> de la plate-forme, qui est ouvert.</p>
{% endblocktrans %}
{% endif %}
</div>
</section>
{% endif %}
{% if app.display_search_bar %}
<section class="search-box">
{% crispy search_form %}
</section>
{% endif %}
</div>
</section>
<div class="flexpage-wrapper">
<section class="home-pinned-content">
<h2 class="home-heading heading-white ico-after ico-news" itemprop="name">
{% trans "À la une" %}
{% if perms.featured.change_featuredresource %}
<a href="{% url "featured-resource-list" %}" class="btn btn-grey">{% trans "Gérer les unes" %}</a>
{% endif %}
</h2>
<div class="featured-resource-row">
{% for featured_resource in last_featured_resources %}
{% include "featured/includes/featured_resource_item.part.html" %}
{% empty %}
<p class="no-featured-resource">{% trans "Aucun élément "À la une" disponible" %}</p>
{% endfor %}
</div>
</section>
<div class="home-row">
<section itemscope itemtype="http://schema.org/ItemList">
<h2 class="ico-after ico-tutorials home-heading" itemprop="name">
{% trans "Derniers tutoriels" %}
<a href="{% url 'publication:list' %}?type=tutorial" class="btn btn-grey">{% trans "Tous les tutoriels" %}</a>
</h2>
<meta itemprop="itemListOrder" content="Descending">
{% include "tutorialv2/list_page_elements/list_of_online_contents.html" with public_contents=last_tutorials col_number=1 %}
</section>
<section itemscope itemtype="http://schema.org/ItemList">
<h2 class="ico-after ico-articles home-heading" itemprop="name">
{% trans "Derniers articles" %}
<a href="{% url 'publication:list' %}?type=article" class="btn btn-grey">{% trans "Tous les articles" %}</a>
</h2>
<meta itemprop="itemListOrder" content="Descending">
{% include "tutorialv2/list_page_elements/list_of_online_contents.html" with public_contents=last_articles col_number=1 %}
<div class="content-item-list">
<div class="content-item write-tutorial">
<div class="write-tutorial-text">
<p>
{% blocktrans with plural=contents_count|pluralize_fr %}
Il y a {{ contents_count }} publication{{ plural }} sur Zeste de Savoir.
{% endblocktrans %}
</p>
<p class="lead">{% trans "Pourquoi pas la vôtre ?" %}</p>
</div>
<a href="{% url "content:create-tutorial" %}" class="btn btn-write-tutorial">{% trans "Commencer à rédiger" %}</a>
</div>
</div>
</section>
</div>
<div class="home-row">
<section itemscope itemtype="http://schema.org/ItemList">
<h2 class="ico-after ico-opinions home-heading" itemprop="name">
{% trans "Derniers billets choisis" %}
<a href="{% url "opinion:list" %}" class="btn btn-grey">{% trans "Tous les billets" %}</a>
</h2>
<meta itemprop="itemListOrder" content="Descending">
<div class="content-item-list">
{% for opinion in last_opinions %}
{% include 'tutorialv2/includes/content_item.part.html' with public_content=opinion show_description=True item_class=forloop.first|yesno:", mini" ignore_date=True show_reactions=True %}
{% empty %}
<p>{% trans "Aucun billet disponible." %}</p>
{% endfor %}
</div>
</section>
<section itemscope itemtype="http://schema.org/ItemList">
<h2 class="home-heading ico-after ico-forum" itemprop="name">
{% trans "Derniers sujets" %}
<a href="{% url 'last-subjects' %}" class="btn btn-grey">{% trans "En voir plus" %}</a>
</h2>
<meta itemprop="itemListOrder" content="Descending">
<div class="content-item-list">
{% for topic in last_topics %}
{% include 'forum/includes/topic_item.part.html' %}
{% empty %}
<p>{% trans "Aucun sujet disponible." %}</p>
{% endfor %}
</div>
</section>
</div>
</div>
{% endblock %}