Feat: import work and verify compilation
This commit is contained in:
@@ -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