forked from ti-nuage/site
Support du calendrier NextCloud (fix #7).
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<h1 class="mt128">{{ title }}</h1>
|
||||
{% if date %}
|
||||
<div class="meta-published">
|
||||
Publié le : {{ moment(date).format('LL') }}
|
||||
Publié le : {{ date_format(date) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<nav class="Container three-cols">
|
||||
<section>
|
||||
<h2>Association</h2>
|
||||
<ul>
|
||||
<ul id="menu-association">
|
||||
<li><a href="/association.html">Découvrir l'association</a></li>
|
||||
<li><a href="/blog">Actualités</a></li>
|
||||
</ul>
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<footer class="footer mt128">
|
||||
<div class="Container">
|
||||
<p class="tad">Page générée le {{ moment(article.date).format('LL') }}.</p>
|
||||
<p class="tad">Page générée le {{ date_format(article.date) }}.</p>
|
||||
<hr>
|
||||
<p class="tac">
|
||||
<a href="/"><img class="logo-small" src="/images/logo.svg" alt=""></a>
|
||||
@@ -55,5 +55,16 @@
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script type='text/javascript'>
|
||||
const menu = document.getElementById('menu-association')
|
||||
const entry = document.createElement('li')
|
||||
const link = document.createElement('a')
|
||||
|
||||
link.href = '/calendrier.html'
|
||||
link.textContent = 'Calendrier'
|
||||
entry.appendChild(link)
|
||||
menu.appendChild(entry)
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{% block header %}{{ header | safe }}{% endblock %}
|
||||
<article>
|
||||
{% for article in collections["archives"] %}
|
||||
<h2><a href="/{{ article.path }}">{{ moment(article.date).format('LL') }} | {{ article.title }}</a></h2>
|
||||
<h2><a href="/{{ article.path }}">{{ date_format(article.date) }} | {{ article.title }}</a></h2>
|
||||
{{ article.excerpt | safe }}
|
||||
<p><a href="/{{ article.path }}">Lire la suite...</a></p>
|
||||
{% else %}
|
||||
|
||||
19
layouts/calendar.njk
Normal file
19
layouts/calendar.njk
Normal file
@@ -0,0 +1,19 @@
|
||||
{% extends "base.njk" %}
|
||||
|
||||
{% block head %}
|
||||
<script type='text/javascript' src="/js/calendar.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block article %}
|
||||
<h1 class="mt128">Calendrier</h1>
|
||||
<div id="calendar" />
|
||||
<noscript>
|
||||
Le téléchargement des données du calendrier requiert JavaScript.
|
||||
</noscript>
|
||||
<script type='text/javascript'>
|
||||
window.onload = function(event) {
|
||||
Calendar.fill(document.getElementById('calendar'))
|
||||
}
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,5 +1,9 @@
|
||||
{% extends "base.njk" %}
|
||||
|
||||
{% block head %}
|
||||
<script type='text/javascript' src="/js/calendar.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block article %}
|
||||
{% block header %}{{ header | safe }}{% endblock %}
|
||||
<article>
|
||||
@@ -7,15 +11,26 @@
|
||||
|
||||
<section class="Services">
|
||||
<h2 class="tac mt128 mb64">Actualités</h2>
|
||||
{% for article in collections["news"] %}
|
||||
<h3><a href="{{ article.path }}">{{ moment(article.date).format('LL') }} | {{article.title }}</a></h3>
|
||||
{{ article.excerpt | safe }}
|
||||
<p><a href="{{ article.path }}">Lire la suite...</a></p>
|
||||
{% else %}
|
||||
{% endfor %}
|
||||
<div id="calendar">
|
||||
{% for article in collections["news"] %}
|
||||
<div class="blog-entry news-entry" entry-time="{{article.date.getTime()}}">
|
||||
<h3><a href="{{ article.path }}">{{ date_format(article.date) }} | {{article.title }}</a></h3>
|
||||
{{ article.excerpt | safe }}
|
||||
<p><a href="{{ article.path }}">Lire la suite...</a></p>
|
||||
</div>
|
||||
{% else %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="tac mt32">
|
||||
<a class="button" href="/blog">Voir les archives</a>
|
||||
</div>
|
||||
</section>
|
||||
</article>
|
||||
|
||||
<script type='text/javascript'>
|
||||
window.onload = function(event) {
|
||||
Calendar.mergeWithNews(document.getElementById('calendar'))
|
||||
}
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user