Skip to content
Snippets Groups Projects
Commit c0f9986f authored by CANÉVET Cindy's avatar CANÉVET Cindy
Browse files

Mise en place du mkdocs-dsfr via Pypi et ajustements javascript en conséquence

parent ef3a8668
No related branches found
No related tags found
1 merge request!12Feature/dsfr mkdocs
......@@ -3,12 +3,18 @@ url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[[source]]
name = "gitlab"
url = "https://gitlab-forge.din.developpement-durable.gouv.fr/api/v4/projects/20363/packages/pypi/simple"
verify_ssl = false
[packages]
mkdocs = "*"
mkdocs-material = "*"
mkdocs-table-reader-plugin= "*"
mkdocs-include-markdown-plugin = "*"
mkdocs-charts-plugin = "*"
mkdocs-dsfr = {version="0.7.0+6064f688", index="gitlab"}
[dev-packages]
......
This diff is collapsed.
const navigateButtons = ['first', 'prev', 'next', 'last'];
const listPolp = document.querySelectorAll('.fr-table tbody tr');
const rowsList = document.querySelectorAll('.fr-table table tbody tr');
const maxPerPage = 20;
const maxRange = 6;
const numberOfPages = Math.ceil(listPolp.length / maxPerPage);
const numberOfPages = Math.ceil(rowsList.length / maxPerPage);
let currentPage = 1;
// Base navigation
......@@ -185,15 +185,16 @@ const setCurrentPage = (index) => {
);
newCurrentButton.setAttribute('aria-current', 'page');
handleNavigate();
// Table items
const prevRange = (currentPage - 1) * maxPerPage;
const currRange = currentPage * maxPerPage;
listPolp.forEach((polp, index) => {
polp.style.display = 'none';
const actualRowsList = document.querySelectorAll('.fr-table table tbody tr');
actualRowsList.forEach((row, index) => {
row.setAttribute('style', 'display:none');
if (index >= prevRange && index < currRange) {
polp.style.display = '';
row.removeAttribute('style');
}
});
};
......
document.addEventListener("DOMContentLoaded", function () {
let tables = document.querySelectorAll(".fr-table table");
console.log("Init tablesort");
//console.log("Init tablesort");
tables.forEach(function (table) {
console.log(table);
//console.log(table);
new Tablesort(table);
});
});
repo_url: https://gitlab-forge.din.developpement-durable.gouv.fr/pub/numeco/numeco-ecologie-gouv/
site_name: Portail Numérique & Écologie
site_url: https://pub.gitlab-pages.din.developpement-durable.gouv.fr/numeco/numeco-ecologie-gouv
nav:
- Actualités: index.md
- Rendez-vous: rendezvous.md
......@@ -32,14 +35,19 @@ extra_javascript:
- https://cdn.jsdelivr.net/npm/vega@5
- https://cdn.jsdelivr.net/npm/vega-lite@5
- https://cdn.jsdelivr.net/npm/vega-embed@6
extra_css:
extra_css:
- css/main.css
- css/tablesort.css
theme:
name: null
custom_dir: "dsfr/"
name: dsfr
intitule: Ministères<br>Transition écologique<br>cohésion des territoires<br>transition énergétique<br>Mer
menulateral: false
titre: ecologie.gouv.fr - Analyse d'impact écologique
soustitre: Mission Numérique & Écologie - SNUM/MSP/DAM
no_search: true
include_search_page: true
show_revision_date: false
header:
titre: ecologie.gouv.fr - Analyse d'impact écologique
soustitre: Mission Numérique & Écologie - SNUM/MSP/DAM
no_search: true
footer:
description: ""
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment