Feat: import work and verify compilation
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
<div>
|
||||
<dl>
|
||||
{% set previous_date = False %}
|
||||
{% for article in articles|sort(reverse=True,attribute='modified') %}
|
||||
{% for article in dates %}
|
||||
{% if article.locale_date != previous_date %}
|
||||
{% set previous_date = article.locale_date %}
|
||||
<dt>{{ article.locale_modified }}</dt>
|
||||
<dt>{{ article.locale_date }}</dt>
|
||||
{% endif %}
|
||||
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
|
||||
{% endfor %}
|
||||
|
@@ -17,41 +17,49 @@
|
||||
{% import 'partial/translations.html' as translations with context %}
|
||||
{{ translations.translations_for(article) }}
|
||||
{% endif %}
|
||||
<h1 id="{{ article.slug }}">{{ article.title }}</h1>
|
||||
<p>
|
||||
{{ _('Posted on %(when)s in %(category)s',
|
||||
when=article.locale_date,
|
||||
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
|
||||
|
||||
{% if 'post_stats' in PLUGINS %}
|
||||
• {{ article.stats['read_mins'] }} min read
|
||||
{% endif %}
|
||||
</p>
|
||||
<div class="tag-cloud">
|
||||
<p>
|
||||
{% if article.tags %}
|
||||
{% for tag in article.tags %}
|
||||
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
{% if 'pelican-page-hierarchy' in PLUGINS%}
|
||||
{% if article.parent %}
|
||||
<ul class="breadcrumb">
|
||||
{% for parent in article.parents %}
|
||||
<li>
|
||||
{% if parent.url == "index.html" %}
|
||||
<a href="{{ SITEURL }}/" title="{{ SITENAME }}">
|
||||
<i class="fa fa-home fa-lg"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ SITEURL }}/{{ parent.url }}">{{ parent.title }}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<h1 id="{{ article.slug }}">{{ article.title }}</h1>
|
||||
</header>
|
||||
|
||||
<div>
|
||||
<div class="content">
|
||||
{{ article.content }}
|
||||
</div>
|
||||
|
||||
{% include "partial/files_internal_navigation.html" %}
|
||||
|
||||
{% if ADD_THIS_ID %}
|
||||
<div class="center social-share">
|
||||
<p>{{ _('Like this article? Share it with your friends!') }}</p>
|
||||
<div class="addthis_native_toolbox"></div>
|
||||
<div class="addthis_sharing_toolbox"></div>
|
||||
<div class="addthis_inline_share_toolbox"></div>
|
||||
<div class="about">
|
||||
{{ _('Posted on %(when)s (modified on %(mod)s) in %(category)s',
|
||||
when=article.locale_date,
|
||||
mod=article.locale_modified,
|
||||
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
|
||||
</div>
|
||||
<div class="tag-cloud">
|
||||
<p>
|
||||
{% if 'post_stats' in PLUGINS %}
|
||||
• {{ article.stats['read_mins'] }} min read
|
||||
{% endif %}
|
||||
{% if article.tags %}
|
||||
{% for tag in article.tags %}
|
||||
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% include "partial/neighbors.html" %}
|
||||
|
||||
@@ -64,10 +72,7 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% elif ADD_THIS_ID %}
|
||||
<div class="addthis_relatedposts_inline"></div>
|
||||
{% endif %}
|
||||
|
||||
{% include "partial/disqus.html" %}
|
||||
</article>
|
||||
{% endblock %}
|
||||
|
@@ -67,66 +67,46 @@
|
||||
{% endblock %}
|
||||
|
||||
<title>{{ SITENAME }}{% block title %}{% endblock %}</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<aside>
|
||||
<div>
|
||||
<!--
|
||||
<a href="{{ SITEURL }}/">
|
||||
<a href="{{ SITEURL }}">
|
||||
{% if SITELOGO %}
|
||||
<img src="{{ SITELOGO }}" alt="{{ SITETITLE }}" title="{{ SITETITLE }}">
|
||||
{% else %}
|
||||
<img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/img/profile.png" alt="{{ SITETITLE }}" title="{{ SITETITLE }}">
|
||||
{% endif %}
|
||||
</a>
|
||||
-->
|
||||
<h1><a href="{{ SITEURL }}/">{{ SITETITLE }}</a></h1>
|
||||
<h1><a href="{{ SITEURL }}">{{ SITETITLE }}</a></h1>
|
||||
|
||||
{% if SITESUBTITLE %}<p>{{ SITESUBTITLE }}</p>{% endif %}
|
||||
|
||||
<!--
|
||||
<h2>Années</h2>
|
||||
<nav>
|
||||
{% include "partial/toctree.html" %}
|
||||
|
||||
{% if pages or LINKS%}
|
||||
<ul class="list">
|
||||
{% if not PAGES_SORT_ATTRIBUTE -%}
|
||||
{% set PAGES_SORT_ATTRIBUTE = 'title' %}
|
||||
{% endif %}
|
||||
{% if DISPLAY_PAGES_ON_SIDE %}
|
||||
{% for page in pages|sort(attribute=PAGES_SORT_ATTRIBUTE) %}
|
||||
<li><a href="{{ SITEURL }}/{{ page.url }}{% if not DISABLE_URL_HASH %}#{{ page.slug }}{% endif %}">{{ page.title }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% for name, link in LINKS %}
|
||||
<li><a href="{{ link }}">{{ name }}</a></li>
|
||||
<li><a href="{{ link }}" target="_blank">{{ name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</nav>
|
||||
-->
|
||||
<h2>Niveaux</h2>
|
||||
<nav>
|
||||
<ul class="list">
|
||||
{% for category, articles in categories|sort %}
|
||||
<li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ articles|count }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
<h2><a href="{{ SITEURL }}/tags.html">
|
||||
Thèmes
|
||||
</a></h2>
|
||||
<nav>
|
||||
<ul class="tagcloud">
|
||||
{% for tag in tag_cloud %}
|
||||
<li class="tag-{{ tag.1 }}">
|
||||
<a href="{{ SITEURL }}/{{ tag.0.url }}">
|
||||
{{ tag.0 }}
|
||||
{% if TAG_CLOUD_BADGE %}
|
||||
<span class="badge">{{ tag.2 }}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</aside>
|
||||
<main>
|
||||
{% if MAIN_MENU %}
|
||||
<nav>
|
||||
<a href="/">{{ _('Home') }}</a>
|
||||
<a href="{{ SITEURL }}">{{ _('Home') }}</a>
|
||||
|
||||
{% for title, link in MENUITEMS %}
|
||||
<a href="{{ link }}">{{ title }}</a>
|
||||
@@ -154,24 +134,6 @@
|
||||
</footer>
|
||||
</main>
|
||||
|
||||
{% if GUAGES %}
|
||||
{% include "partial/guages.html" %}
|
||||
{% endif %}
|
||||
|
||||
{% if ADD_THIS_ID %}
|
||||
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ ADD_THIS_ID }}" async="async"></script>
|
||||
{% endif %}
|
||||
|
||||
{% if PIWIK_URL and PIWIK_SITE_ID %}
|
||||
{% include "partial/piwik.html" %}
|
||||
{% endif %}
|
||||
|
||||
{% include "partial/jsonld.html" %}
|
||||
|
||||
{% block additional_js %}{% endblock %}
|
||||
|
||||
{% if GITHUB_CORNER_URL %}
|
||||
{% include 'partial/github.html' %}
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -2,15 +2,15 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% for article in articles_page.object_list|sort(reverse=True,attribute='modified') %}
|
||||
{% for article in articles_page.object_list %}
|
||||
<article>
|
||||
<header>
|
||||
<h2><a href="{{ SITEURL }}/{{ article.url }}{% if not DISABLE_URL_HASH %}#{{ article.slug }}{% endif %}">{{ article.title }}</a></h2>
|
||||
<p>
|
||||
{{ _('Posted on %(when)s (last modification %(modified)s) in %(category)s',
|
||||
when=article.locale_date,
|
||||
modified=article.locale_modified,
|
||||
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
|
||||
{{ _('Posted on %(when)s (modified on %(mod)s) in %(category)s',
|
||||
when=article.locale_date,
|
||||
mod=article.locale_modified,
|
||||
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
|
||||
|
||||
{% if article.tags and not HOME_HIDE_TAGS %}
|
||||
• {{ _('Tagged with') }}
|
||||
|
@@ -1,10 +0,0 @@
|
||||
{% if article.link_files %}
|
||||
<div id="linkfiles">
|
||||
<h2> Fichiers liés </h2>
|
||||
<ul class="list-group">
|
||||
{% for f in article.link_files %}
|
||||
<li class="list-group-item"><a href="{{ SITEURL }}/{{ f.1 }}">{{ f.0 }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
34
theme/templates/partial/toctree.html
Normal file
34
theme/templates/partial/toctree.html
Normal file
@@ -0,0 +1,34 @@
|
||||
{% macro toc(root) %}
|
||||
<ul class="toctree">
|
||||
{% for child in root.children %}
|
||||
{% if child == article or child in article.parents%}
|
||||
<li class="toctree-l1 current"><a href="{{ SITEURL }}/{{ child.url }}">{{ child.title }}</a>
|
||||
{% if child.children %}
|
||||
<ul>
|
||||
{% for c in child.children %}
|
||||
{% if c == article %}
|
||||
<li class="toctree-l2 current"><span href="{{ SITEURL }}/{{ c.url }}">{{ c.title }}</span></li>
|
||||
{% else %}
|
||||
<li class="toctree-l2"><a href="{{ SITEURL }}/{{ c.url }}">{{ c.title }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<li class="toctree-l1"><a href="{{ SITEURL }}/{{ child.url }}">{{ child.title }}</a></li>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{% if 'pelican-page-hierarchy' in PLUGINS and TOCTREE %}
|
||||
{% if article and article.parents %}
|
||||
{{ toc(article.parents[0]) }}
|
||||
{% elif article and not article.parent %}
|
||||
{{ toc(article) }}
|
||||
{% else %}
|
||||
<p> Perdu! </p>
|
||||
{% endif %}
|
||||
{% endif %}
|
Reference in New Issue
Block a user