Compare commits
54 Commits
Author | SHA1 | Date | |
---|---|---|---|
4e3af32f41 | |||
bcd9480e66 | |||
4c22c889bf | |||
fbd7a0ce54 | |||
5e5a40eebe | |||
5d81ca35c5 | |||
1aede656fa | |||
3c9feb0cf5 | |||
ec8d4d23b7 | |||
7577854064 | |||
9e8d523de1 | |||
03290ee848 | |||
be17a9952c | |||
251d637a7b | |||
711fbb12d5 | |||
cadbaa163e | |||
29a9a51543 | |||
e6642eaeaa | |||
8674186937 | |||
61bf2af24c | |||
ae080680ad | |||
b87388939f | |||
340f10a023 | |||
435c787b2e | |||
cb9820afa5 | |||
5f7dea074e | |||
0194eb763e | |||
0d4e4d74b0 | |||
1ae89f63d0 | |||
d90ed8149d | |||
dab40dddd0 | |||
9a2d687434 | |||
7ea7fba87c | |||
ae45ff7d42 | |||
75060070b9 | |||
0607f2a69a | |||
1764489028 | |||
b6b089542e | |||
735cd0bd59 | |||
dc470aec10 | |||
f2adf72aa0 | |||
0653ac2bf8 | |||
5b9910bb0f | |||
dbbb0b5ecf | |||
6060a52717 | |||
12d10e6ace | |||
abe52dd5c9 | |||
1c92eedfb2 | |||
1f34a326ad | |||
d6e575ea45 | |||
438251f75d | |||
b720e17c61 | |||
02dbc94f31 | |||
dd92f1a77e |
107
.gitea/workflows/deploy.yml
Normal file
107
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,107 @@
|
||||
name: Build and Deploy to MinIO
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
# - master
|
||||
- 2025-2026
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
branch-type: ${{ steps.branch-info.outputs.branch-type }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set branch type
|
||||
id: branch-info
|
||||
run: |
|
||||
if [ "${{ gitea.ref }}" = "refs/heads/master" ]; then
|
||||
echo "branch-type=master" >> $GITEA_OUTPUT
|
||||
else
|
||||
echo "branch-type=year" >> $GITEA_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y imagemagick libmagickwand-dev ghostscript
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
- name: Setup content directory for year branches
|
||||
env:
|
||||
BRANCH_NAME: ${{ gitea.ref_name }}
|
||||
if: gitea.ref != 'refs/heads/master'
|
||||
run: |
|
||||
echo "Branch name: $BRANCH_NAME"
|
||||
echo "Testing URL: https://git.opytex.org/Cours/${BRANCH_NAME}.git"
|
||||
curl -I "https://git.opytex.org/Cours/${BRANCH_NAME}.git" || echo "URL not accessible"
|
||||
rm -rf content
|
||||
git clone https://git.opytex.org/Cours/${BRANCH_NAME}.git content
|
||||
|
||||
- name: Build site
|
||||
run: |
|
||||
export MAGICK_HOME=/usr
|
||||
pelican ./content/ -o ./output -s publishconf.py --relative-urls
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: site-build
|
||||
path: output/
|
||||
retention-days: 1
|
||||
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- name: Download build artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: site-build
|
||||
path: output/
|
||||
|
||||
- name: Install MinIO client
|
||||
run: |
|
||||
wget https://dl.min.io/client/mc/release/linux-amd64/mc
|
||||
chmod +x mc
|
||||
sudo mv mc /usr/local/bin/
|
||||
|
||||
- name: Configure MinIO client
|
||||
env:
|
||||
MINIO_REPOSITORY: ${{ secrets.MINIO_REPOSITORY }}
|
||||
MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }}
|
||||
MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }}
|
||||
run: |
|
||||
mc alias set storage $MINIO_REPOSITORY $MINIO_ACCESS_KEY $MINIO_SECRET_KEY
|
||||
|
||||
- name: Deploy to MinIO - Master branch
|
||||
env:
|
||||
MINIO_BUCKET: ${{ secrets.MINIO_BUCKET }}
|
||||
if: needs.build.outputs.branch-type == 'master'
|
||||
run: |
|
||||
mc mirror --overwrite --exclude "enseignements/*" ./output/ storage/$MINIO_BUCKET
|
||||
|
||||
- name: Deploy to MinIO - Year branches
|
||||
env:
|
||||
MINIO_BUCKET: ${{ secrets.MINIO_BUCKET }}
|
||||
BRANCH_NAME: ${{ gitea.ref_name }}
|
||||
if: needs.build.outputs.branch-type == 'year'
|
||||
run: |
|
||||
mc mirror --overwrite --remove ./output/ storage/$MINIO_BUCKET/enseignements/${BRANCH_NAME}/
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,3 +6,4 @@ content
|
||||
__pycache__
|
||||
*.pid
|
||||
venv/
|
||||
.vim/
|
||||
|
15
.pre-commit-config.yaml
Normal file
15
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.2.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.6.0
|
||||
hooks:
|
||||
- id: black
|
4
Makefile
4
Makefile
@@ -49,8 +49,10 @@ help:
|
||||
@echo 'Set the RELATIVE variable to 1 to enable relative urls '
|
||||
@echo ' '
|
||||
|
||||
html:
|
||||
css:
|
||||
lessc $(BASEDIR)/theme/static/stylesheet/style.less $(BASEDIR)/theme/static/stylesheet/style.min.css -x
|
||||
|
||||
html: css
|
||||
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
|
||||
|
||||
clean:
|
||||
|
0
__init__.py
Normal file
0
__init__.py
Normal file
@@ -10,9 +10,8 @@ MENUITEMS = [
|
||||
#("Dernières modifications", SITEURL+"blog_index.html"),
|
||||
("Accueil", "/"),
|
||||
("Contenus de cours", "/pages/tout-sur-mes-cours.html"),
|
||||
('blog', '/blog_index.html'),
|
||||
('Opytex', "/opytex/"),
|
||||
("pyMath", "/pymath/"),
|
||||
('Blog', '/blog_index.html'),
|
||||
('Informatique', "/pages/projets-informatiques.html"),
|
||||
('À propos', "/pages/a-propos.html"),
|
||||
]
|
||||
|
||||
|
@@ -3,35 +3,36 @@
|
||||
from __future__ import unicode_literals
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.append(os.curdir)
|
||||
from globalconf import *
|
||||
|
||||
AUTHOR = 'Benjamin Bertrand'
|
||||
SITENAME = 'OpyTex'
|
||||
SITETITLE = 'OpyTex'
|
||||
SITESUBTITLE = "DEV"
|
||||
#SITEURL = 'https://0.0.0.0:8000/enseignements/DEV'
|
||||
SITEURL = ''
|
||||
YEAR = "2025-2026"
|
||||
AUTHOR = "Benjamin Bertrand"
|
||||
SITENAME = "OpyTex"
|
||||
SITETITLE = "OpyTex"
|
||||
SITESUBTITLE = YEAR
|
||||
SITEURL = ""
|
||||
|
||||
CC_LICENSE_COMMERCIAL = True
|
||||
CC_LICENSE = True
|
||||
|
||||
PATH = './content'
|
||||
PATH = "./content"
|
||||
|
||||
TIMEZONE = 'Europe/Paris'
|
||||
TIMEZONE = "Europe/Paris"
|
||||
|
||||
DEFAULT_LANG = 'fr'
|
||||
DEFAULT_LANG = "fr"
|
||||
|
||||
# Uncomment following line if you want document-relative URLs when developing
|
||||
#RELATIVE_URLS = True
|
||||
# RELATIVE_URLS = True
|
||||
|
||||
# Files places
|
||||
IGNORE_FILES = ['venv', '.git', 'tools']
|
||||
IGNORE_FILES = ["venv", ".git", "tools"]
|
||||
# Pages, articles and static
|
||||
#PAGE_PATHS = ['pages']
|
||||
ARTICLE_PATHS = ['.']
|
||||
STATIC_PATHS = ['.']
|
||||
INDEX_SAVE_AS = 'blog_index.html'
|
||||
# PAGE_PATHS = ['pages']
|
||||
ARTICLE_PATHS = ["."]
|
||||
STATIC_PATHS = ["."]
|
||||
INDEX_SAVE_AS = "blog_index.html"
|
||||
|
||||
#
|
||||
USE_FOLDER_AS_CATEGORY = False
|
||||
@@ -39,18 +40,19 @@ USE_FOLDER_AS_CATEGORY = False
|
||||
# Plugins
|
||||
PLUGIN_PATHS = ["plugins"]
|
||||
PLUGINS = [
|
||||
'i18n_subsites',
|
||||
"pelican-page-hierarchy",
|
||||
"i18n_subsites",
|
||||
"always_modified",
|
||||
"tag_cloud",
|
||||
# 'pdf-img',
|
||||
"pdf-img",
|
||||
"big-button",
|
||||
"source-link",
|
||||
]
|
||||
|
||||
ALWAYS_MODIFIED = True
|
||||
|
||||
# Mirror source structure
|
||||
PATH_METADATA = '(?P<path_no_ext>.*)\..*'
|
||||
ARTICLE_URL = ARTICLE_SAVE_AS = PAGE_URL = PAGE_SAVE_AS = '{path_no_ext}.html'
|
||||
PATH_METADATA = r"(?P<path_no_ext>.*)\..*"
|
||||
ARTICLE_URL = ARTICLE_SAVE_AS = PAGE_URL = PAGE_SAVE_AS = "{path_no_ext}.html"
|
||||
|
||||
# USE_FOLDER_AS_CATEGORY = True
|
||||
# DEFAULT_CATEGORY = "Autre"
|
||||
@@ -58,7 +60,7 @@ ARTICLE_URL = ARTICLE_SAVE_AS = PAGE_URL = PAGE_SAVE_AS = '{path_no_ext}.html'
|
||||
# Readers
|
||||
READERS = {"html": None}
|
||||
# Everythings in french
|
||||
JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}
|
||||
JINJA_ENVIRONMENT = {"extensions": ["jinja2.ext.i18n"]}
|
||||
# Default theme language.
|
||||
I18N_TEMPLATES_LANG = "en"
|
||||
# Your language.
|
||||
@@ -80,7 +82,7 @@ DISPLAY_PAGES_ON_SIDE = False
|
||||
TOCTREE = True
|
||||
TAG_CLOUD = True
|
||||
|
||||
#SITELOGO = ""
|
||||
# SITELOGO = ""
|
||||
LINKS = ()
|
||||
DEFAULT_PAGINATION = 10
|
||||
|
||||
@@ -90,3 +92,7 @@ CATEGORY_FEED_ATOM = None
|
||||
TRANSLATION_FEED_ATOM = None
|
||||
AUTHOR_FEED_ATOM = None
|
||||
AUTHOR_FEED_RSS = None
|
||||
|
||||
# SOURCE LINK
|
||||
GIT_SOURCE_BASE_URL = f"https://git.opytex.org/Cours/{YEAR}/src/branch/main"
|
||||
SOURCE_ICON_URL = "https://git.opytex.org/assets/img/logo.svg"
|
||||
|
@@ -5,16 +5,18 @@ If "modified" date/time is not defined in article metadata, fall back to the "cr
|
||||
from pelican import signals
|
||||
from pelican.contents import Content, Article
|
||||
|
||||
|
||||
def add_modified(content):
|
||||
if not isinstance(content, Article):
|
||||
return
|
||||
|
||||
if not content.settings.get('ALWAYS_MODIFIED', False):
|
||||
|
||||
if not content.settings.get("ALWAYS_MODIFIED", False):
|
||||
return
|
||||
|
||||
if hasattr(content, 'date') and not hasattr(content, 'modified'):
|
||||
if hasattr(content, "date") and not hasattr(content, "modified"):
|
||||
content.modified = content.date
|
||||
content.locale_modified = content.locale_date
|
||||
|
||||
|
||||
|
||||
def register():
|
||||
signals.content_object_init.connect(add_modified)
|
||||
|
0
plugins/big-button/README.rst
Normal file
0
plugins/big-button/README.rst
Normal file
1
plugins/big-button/__init__.py
Normal file
1
plugins/big-button/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .big_button import *
|
66
plugins/big-button/big_button.py
Normal file
66
plugins/big-button/big_button.py
Normal file
@@ -0,0 +1,66 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
big_button tags for reStructuredText
|
||||
==============================
|
||||
This plugin allows you to use big_button tags from within reST documents.
|
||||
|
||||
.. big_button::
|
||||
:title: Title
|
||||
:link: ""
|
||||
:color: default
|
||||
|
||||
Description
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from docutils import nodes
|
||||
from docutils.parsers.rst import directives, Directive
|
||||
|
||||
|
||||
class BigButton(Directive):
|
||||
optional_arguments = 0
|
||||
final_argument_whitespace = True
|
||||
has_content = True
|
||||
required_arguments = 0
|
||||
optional_arguments = 0
|
||||
final_argument_whitespace = False
|
||||
option_spec = {
|
||||
"title": directives.unicode_code,
|
||||
"link": directives.path,
|
||||
}
|
||||
|
||||
def settings(self):
|
||||
self.options['content'] = '\n'.join(self.content)
|
||||
|
||||
if not self.options.get('title'):
|
||||
self.options['title'] = 0
|
||||
if not self.options.get('link'):
|
||||
self.options['link'] = 0
|
||||
|
||||
def html(self):
|
||||
html = "<div class='button'>\n"
|
||||
if self.options["link"]:
|
||||
html += f"<a href={self.options['link']}>"
|
||||
else:
|
||||
html += f"<div class='nolink'>"
|
||||
if self.options["title"]:
|
||||
html += f"<h3> {self.options['title']}</h3>"
|
||||
if self.content:
|
||||
html += "<div class='content'>"
|
||||
html += f"{self.options['content']}"
|
||||
html += "</div>"
|
||||
if self.options["link"]:
|
||||
html += "</a>"
|
||||
else:
|
||||
html += "</div>"
|
||||
html += "</div>"
|
||||
return html
|
||||
|
||||
def run(self):
|
||||
self.settings()
|
||||
return [nodes.raw('', self.html(), format='html')]
|
||||
|
||||
|
||||
def register():
|
||||
directives.register_directive("big_button", BigButton)
|
31
plugins/source-link/README.md
Normal file
31
plugins/source-link/README.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Pelican source link plugin
|
||||
|
||||
This plugin for [Pelican](https://github.com/getpelican/pelican/) generate two attributes for articles:
|
||||
|
||||
- `source_link`: link to the source of the article from your forge
|
||||
- `path_source_link`: link to the path of the article from your forge
|
||||
|
||||
## Installation
|
||||
|
||||
Then, add the plugin to your pelicanconf.py file:
|
||||
|
||||
```python
|
||||
PLUGINS = [
|
||||
# other plugins...
|
||||
"source_link",
|
||||
]
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
To use the plugin, define a constant named `GIT_SOURCE` in your pelicanconf.py file:
|
||||
|
||||
```python
|
||||
GIT_SOURCE_BASE_URLL = "https://github.com/your-username/your-repo"
|
||||
```
|
||||
|
||||
This constant should contain the base URL of your Git repository where your source code is stored.
|
||||
|
||||
Once the constant is defined, the plugin will generate a `source_link` and a `path_source_link` attributes for each article in your Pelican project.
|
||||
|
||||
Those links are generated based on the article's source path relative to the root directory of your Pelican project. If the constant PATH is defined in pelicanconf.py, the plugin will use this value as the root directory. Otherwise, it will use the default value of "", which assumes that your Pelican project is located in the same directory as your pelicanconf.py file.
|
1
plugins/source-link/__init__.py
Normal file
1
plugins/source-link/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .source_link import *
|
37
plugins/source-link/source_link.py
Normal file
37
plugins/source-link/source_link.py
Normal file
@@ -0,0 +1,37 @@
|
||||
from pelican import signals
|
||||
import logging
|
||||
import os
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
from pelican.settings import DEFAULT_CONFIG
|
||||
|
||||
|
||||
def set_default_settings(settings):
|
||||
settings.setdefault("GIT_SOURCE_BASE_URL", None)
|
||||
|
||||
|
||||
def init_default_config(pelican):
|
||||
set_default_settings(DEFAULT_CONFIG)
|
||||
if pelican:
|
||||
set_default_settings(pelican.settings)
|
||||
|
||||
|
||||
def source_link_generator(article_generator):
|
||||
git_source = article_generator.settings.get(
|
||||
"GIT_SOURCE_BASE_URL", DEFAULT_CONFIG["GIT_SOURCE_BASE_URL"]
|
||||
)
|
||||
root_path = article_generator.settings.get("PATH", DEFAULT_CONFIG.get("PATH", ""))
|
||||
for article in article_generator.articles:
|
||||
article_path = os.path.abspath(os.path.join(root_path, article.source_path))
|
||||
relative_path = os.path.relpath(article_path, root_path)
|
||||
if git_source.endswith("/"):
|
||||
article.source_link = f"{git_source}{relative_path}"
|
||||
else:
|
||||
article.source_link = f"{git_source}/{relative_path}"
|
||||
|
||||
article.path_source_link = "/".join(article.source_link.split("/")[:-1])
|
||||
|
||||
|
||||
def register():
|
||||
signals.initialized.connect(init_default_config)
|
||||
signals.article_generator_finalized.connect(source_link_generator)
|
@@ -7,19 +7,21 @@ from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.append(os.curdir)
|
||||
from pelicanconf import *
|
||||
|
||||
|
||||
# If your site is available via HTTPS, make sure SITEURL begins with https://
|
||||
SITEURL = 'n'
|
||||
SITEURL = "https://opytex.org/enseignements/2025-2026/"
|
||||
RELATIVE_URLS = False
|
||||
|
||||
FEED_ALL_ATOM = 'feeds/all.atom.xml'
|
||||
CATEGORY_FEED_ATOM = 'feeds/{slug}.atom.xml'
|
||||
FEED_ALL_ATOM = "feeds/all.atom.xml"
|
||||
CATEGORY_FEED_ATOM = "feeds/{slug}.atom.xml"
|
||||
|
||||
DELETE_OUTPUT_DIRECTORY = True
|
||||
|
||||
# Following items are often useful when publishing
|
||||
|
||||
#DISQUS_SITENAME = ""
|
||||
#GOOGLE_ANALYTICS = ""
|
||||
# DISQUS_SITENAME = ""
|
||||
# GOOGLE_ANALYTICS = ""
|
||||
|
23
requirements.txt
Normal file
23
requirements.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
anyio==4.10.0
|
||||
beautifulsoup4==4.9.1
|
||||
blinker==1.9.0
|
||||
bs4==0.0.1
|
||||
docutils==0.22
|
||||
feedgenerator==2.2.1
|
||||
idna==3.10
|
||||
Jinja2==3.1.6
|
||||
markdown-it-py==4.0.0
|
||||
MarkupSafe==3.0.2
|
||||
mdurl==0.1.2
|
||||
ordered-set==4.1.0
|
||||
pelican==4.11.0
|
||||
Pygments==2.18.0
|
||||
python-dateutil==2.9.0.post0
|
||||
pytz==2020.1
|
||||
rich==14.1.0
|
||||
six==1.17.0
|
||||
sniffio==1.3.1
|
||||
soupsieve==2.0.1
|
||||
Unidecode==1.4.0
|
||||
Wand==0.6.2
|
||||
watchfiles==1.1.0
|
File diff suppressed because it is too large
Load Diff
2
theme/static/stylesheet/style.min.css
vendored
2
theme/static/stylesheet/style.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -4,6 +4,7 @@
|
||||
@white: #ffffff;
|
||||
@grey: #333333;
|
||||
@light-grey: #eeeeee;
|
||||
@med-light-grey: #d9d8d8;
|
||||
@med-grey: #999999;
|
||||
@dark-grey: #242121;
|
||||
|
||||
@@ -20,7 +21,7 @@
|
||||
@link-hover-color: @light-orange;
|
||||
|
||||
// Sidebar (aside)
|
||||
@sidebar-bg: @grey;
|
||||
@sidebar-bg: @dark-grey;
|
||||
@sidebar-text-color: @white;
|
||||
@sidebar-link-color: @white;
|
||||
@sidebar-link-hover-color: @light-grey;
|
||||
@@ -28,8 +29,10 @@
|
||||
// NavBar
|
||||
@navbar-bg: @dark-grey;
|
||||
@navbar-text-color: @white;
|
||||
@navbar-toctree-l1-sel-bg: @dark-grey;
|
||||
@navbar-toctree-l1-sel-txt: @light-grey;
|
||||
|
||||
@navbar-toctree-l1-sel-bg: @med-light-grey;
|
||||
@navbar-toctree-l1-sel-txt: @grey;
|
||||
|
||||
@navbar-toctree-l2-bg: @med-grey;
|
||||
@navbar-toctree-l2-txt: @grey;
|
||||
@navbar-toctree-l2-sel-bg: @light-grey;
|
||||
|
@@ -48,6 +48,16 @@
|
||||
mod=article.locale_modified,
|
||||
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
|
||||
</div>
|
||||
|
||||
{% if 'GIT_SOURCE_BASE_URL' %}
|
||||
<div class="source">
|
||||
<a href="{{ article.path_source_link}}">
|
||||
<img src={{ SOURCE_ICON_URL }} alt="source icon" ario>
|
||||
source et documents
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="tag-cloud">
|
||||
<p>
|
||||
{% if 'post_stats' in PLUGINS %}
|
||||
|
@@ -86,6 +86,9 @@
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<label for="toggle">☰</label>
|
||||
<input type="checkbox" id="toggle">
|
||||
|
||||
{% if TOCTREE %}
|
||||
{% include "partial/toctree.html" %}
|
||||
{% endif %}
|
||||
@@ -143,5 +146,6 @@
|
||||
</main>
|
||||
|
||||
{% block additional_js %}{% endblock %}
|
||||
<script type="text/javascript" async defer data-website-id="2cb9cd4c-66da-4e4f-9e84-a2d53c7b07bc" src="https://stat.opytex.org/umami.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,13 +1,16 @@
|
||||
<ul class="toctree">
|
||||
<h2>Niveaux</h2>
|
||||
{% for cat, articles in categories|sort %}
|
||||
{% if (article and article.category == cat) or category == cat %}
|
||||
<li class="toctree-l1 current"><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat | upper }}</a>
|
||||
<ul>
|
||||
{% for art in articles | sort(attribute="date") %}
|
||||
{% if article == art %}
|
||||
<li class="toctree-l2 current"><span>{{ art.title }}</span></li>
|
||||
{% else %}
|
||||
<li class="toctree-l2"><a href="{{ SITEURL }}/{{ art.url }}">{{ art.title }}</a></li>
|
||||
{% if "Semaine" not in art.tags%}
|
||||
{% if article == art %}
|
||||
<li class="toctree-l2 current"><span>{{ art.title }}</span></li>
|
||||
{% else %}
|
||||
<li class="toctree-l2"><a href="{{ SITEURL }}/{{ art.url }}">{{ art.title }}</a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user