Skip to content

Commit 2df4e24

Browse files
committed
Refactor HTML templates and CSS
- Introduce a new 'navbar' element in .meta files. This new item allows for a very flexible navigation bar (deprecating the previous 'toplevel' attribute). - Introduce a new 'language' element in .meta files. This allows to distinguish between articles written in French and the rest of the pages in English for better templates. - Merge most templates into the new templates/default.html. Adding new pages was getting too repetitive, thus the refactoring. - Merge article.css into base.css since all pages need this CSS anyway. - Rename files templates/*.html to templates/*.html.jinja
1 parent c0e00e1 commit 2df4e24

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+381
-262
lines changed

builder/builder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def render(self, path: Path) -> RenderStatus:
6464
except OSError:
6565
pass
6666

67-
template = jinja_env.get_template(page.metadata["template"] + ".html")
67+
template = jinja_env.get_template(page.metadata["template"] + ".html.jinja")
6868
context = {
6969
"html_content": page.to_html(),
7070
"metadata": page.metadata,
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Chiffre de César
22
path: algo/chiffrement/chiffre_cesar.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 21/05/2014
58
modified: 14/12/2015
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Chiffre de Vernam
22
path: algo/chiffrement/chiffre_vernam.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 29/05/2014
58
modified: 20/12/2015
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Chiffre de Vigenère
22
path: algo/chiffrement/chiffre_vigenere.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 28/05/2014
58
modified: 20/12/2015
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: RSA
22
path: algo/chiffrement/rsa.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 31/05/2014
58
modified: 02/02/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Programmation dynamique
22
path: algo/general/approche/dynamique.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 03/04/2016
58
modified: 07/07/2017
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Comment et où s'entraîner ?
22
path: algo/general/entrainement.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 26/12/2015
58
modified: 29/03/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Introduction aux algorithmes
22
path: algo/general/introduction.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 26/12/2015
58
modified: 11/07/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Méthode de résolution
22
path: algo/general/methode.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 08/11/2016
58
modified: 08/11/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Introduction à l'apprentissage artificiel
22
path: algo/ia/apprentissage_artificiel/introduction.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 07/04/2016
58
modified: 25/04/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Algorithme du gradient
22
path: algo/ia/apprentissage_artificiel/regression_lin_poly/algo_gradient.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 19/04/2016
58
modified: 19/04/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Équation normale
22
path: algo/ia/apprentissage_artificiel/regression_lin_poly/equation_normale.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 20/04/2016
58
modified: 20/04/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Régression linéaire et polynomiale
22
path: algo/ia/apprentissage_artificiel/regression_lin_poly.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 25/04/2016
58
modified: 25/04/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Dichotomie
22
path: algo/recherche/dichotomie.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 28/06/2014
58
modified: 14/01/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Arbre
22
path: algo/structure/arbre.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 29/11/2015
58
modified: 01/12/2015
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Arbre binaire
22
path: algo/structure/arbre/arbre_binaire.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 27/12/2015
58
modified: 14/01/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Tas
22
path: algo/structure/arbre/tas.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 11/01/2016
58
modified: 22/01/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: File
22
path: algo/structure/file.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 08/06/2014
58
modified: 28/11/2015
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Graphe
22
path: algo/structure/graphe.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 20/06/2015
58
modified: 01/12/2015
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Parcours d'un graphe
22
path: algo/structure/graphe/parcours.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 07/12/2015
58
modified: 13/12/2015
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Algorithme de Bellman-Ford
22
path: algo/structure/graphe/plus_court_chemin/bellman_ford.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 10/07/2016
58
modified: 10/07/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Algorithme de Dijkstra
22
path: algo/structure/graphe/plus_court_chemin/dijkstra.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 22/05/2016
58
modified: 22/05/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Plus court chemin
22
path: algo/structure/graphe/plus_court_chemin.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 22/05/2016
58
modified: 22/05/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Liste chaînée
22
path: algo/structure/liste_chainee.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 08/06/2014
58
modified: 16/01/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Pile
22
path: algo/structure/pile.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 08/06/2014
58
modified: 28/11/2015
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Tableau cumulatif
22
path: algo/structure/tableau_cumulatif.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 21/11/2015
58
modified: 05/12/2015
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Tri par base
22
path: algo/tri/tri_base.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 05/03/2016
58
modified: 05/03/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Tri à bulles
22
path: algo/tri/tri_bulles.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 29/04/2014
58
modified: 07/12/2015
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Tri par dénombrement
22
path: algo/tri/tri_denombrement.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 05/07/2014
58
modified: 02/02/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Tri fusion
22
path: algo/tri/tri_fusion.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 10/05/2014
58
modified: 13/12/2015
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Tri par insertion
22
path: algo/tri/tri_insertion.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 01/05/2014
58
modified: 08/12/2015
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Tri rapide
22
path: algo/tri/tri_rapide.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 10/05/2014
58
modified: 22/01/2016
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Tri par sélection
22
path: algo/tri/tri_selection.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 30/04/2014
58
modified: 08/12/2015
9+
language: fr
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
title: Tri par tas
22
path: algo/tri/tri_tas.html
3-
template: article
3+
template: default
4+
navbar:
5+
- page: Articles
6+
url: /articles.html
47
published: 14/05/2014
58
modified: 29/04/2016
9+
language: fr

content/articles/articles.meta

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
title: Articles
22
path: articles.html
3-
template: article
4-
toplevel: true
3+
template: default
4+
language: fr

content/gsoc2019/gsoc2019.meta

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
title: Google Summer of Code 2019
22
path: gsoc2019.html
3-
template: gsoc
4-
toplevel: true
3+
template: default

content/gsoc2019/notes/infra.meta

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
title: Infrastructure
22
path: gsoc2019/notes/infra.html
3-
template: gsoc
3+
template: default
4+
navbar:
5+
- page: GSoC 2019
6+
url: /gsoc2019.html

0 commit comments

Comments
 (0)