From 94b44d44cb4b74145d110fd19747aefde8e03e21 Mon Sep 17 00:00:00 2001 From: Pierre Date: Fri, 7 Feb 2020 03:09:47 +0100 Subject: [PATCH] Pagination des articles d'un groupe --- content/groupe.html | 8 ++- css/_sq_balint.scss | 41 +++++++++++++- css/mon_site.css | 55 +++++++++++++++++-- .../pagination_page_precedent_suivant.html | 52 ++++++++++++++++++ 4 files changed, 148 insertions(+), 8 deletions(-) create mode 100644 modeles/pagination_page_precedent_suivant.html diff --git a/content/groupe.html b/content/groupe.html index e8f436a..d003290 100644 --- a/content/groupe.html +++ b/content/groupe.html @@ -51,8 +51,11 @@

Dernières nouvelles

+ +#ANCRE_PAGINATION +
- +
@@ -61,4 +64,7 @@
+ +
+ \ No newline at end of file diff --git a/css/_sq_balint.scss b/css/_sq_balint.scss index 52a4a8c..075f716 100644 --- a/css/_sq_balint.scss +++ b/css/_sq_balint.scss @@ -33,6 +33,42 @@ img{ height: auto; } +/* pagination */ + +.pagination{ + display: flex; + justify-content: flex-end; + align-items: center; + margin-bottom: 1.5rem; +} + +.pagination { + .prev, .next { + line-height:100% + } + .disabled { + display: none; + } +} +.pagination { + + strong, .lien_pagination { + background-color: $fond-footer; + padding: 0.5rem 1rem; + border-radius: 0.2rem; + } strong{ + cursor:initial; + color: $page-active; + } + .lien_pagination{ + color: $light; + } + .sep{ + display: inline-block; + width: 0.5rem; + } +} + /* breadcrumb */ .breadcrumb{ //background: #e8ebf8; @@ -387,7 +423,7 @@ body{ /************************ PAGE ASSOCIATION ****************************/ /**********************************************************************/ -#menu-association, #menu-groupes{ +#menu-association, #menu-groupes, #menu-methode{ background: $couleur-liens; margin: 1rem 0; border-radius: 0.2rem; @@ -396,6 +432,9 @@ body{ color: $page-active; font-weight: bold; } + ul{ + width: 100%; + } li{ padding: 0.5rem; a{ diff --git a/css/mon_site.css b/css/mon_site.css index e29404e..0b19d91 100644 --- a/css/mon_site.css +++ b/css/mon_site.css @@ -11906,6 +11906,45 @@ img { height: auto; } +/* pagination */ +.pagination { + display: -webkit-box; + display: flex; + -webkit-box-pack: end; + justify-content: flex-end; + -webkit-box-align: center; + align-items: center; + margin-bottom: 1.5rem; +} + +.pagination .prev, .pagination .next { + line-height: 100%; +} + +.pagination .disabled { + display: none; +} + +.pagination strong, .pagination .lien_pagination { + background-color: #464ba3; + padding: 0.5rem 1rem; + border-radius: 0.2rem; +} + +.pagination strong { + cursor: initial; + color: #ffdb70; +} + +.pagination .lien_pagination { + color: #f8f9fa; +} + +.pagination .sep { + display: inline-block; + width: 0.5rem; +} + /* breadcrumb */ .breadcrumb { padding: 0; @@ -12323,31 +12362,35 @@ body { /**********************************************************************/ /************************ PAGE ASSOCIATION ****************************/ /**********************************************************************/ -#menu-association, #menu-groupes { +#menu-association, #menu-groupes, #menu-methode { background: #f67638; margin: 1rem 0; border-radius: 0.2rem; padding: 0; } -#menu-association .active a, #menu-groupes .active a { +#menu-association .active a, #menu-groupes .active a, #menu-methode .active a { color: #ffdb70; font-weight: bold; } -#menu-association li, #menu-groupes li { +#menu-association ul, #menu-groupes ul, #menu-methode ul { + width: 100%; +} + +#menu-association li, #menu-groupes li, #menu-methode li { padding: 0.5rem; } -#menu-association li a, #menu-groupes li a { +#menu-association li a, #menu-groupes li a, #menu-methode li a { color: white; } -#menu-association li:not(:last-of-type), #menu-groupes li:not(:last-of-type) { +#menu-association li:not(:last-of-type), #menu-groupes li:not(:last-of-type), #menu-methode li:not(:last-of-type) { border-bottom: solid 1px #f8f9fa; } -#menu-association .navbar-toggler, #menu-groupes .navbar-toggler { +#menu-association .navbar-toggler, #menu-groupes .navbar-toggler, #menu-methode .navbar-toggler { border: none; color: white; width: 100%; diff --git a/modeles/pagination_page_precedent_suivant.html b/modeles/pagination_page_precedent_suivant.html new file mode 100644 index 0000000..55dba2d --- /dev/null +++ b/modeles/pagination_page_precedent_suivant.html @@ -0,0 +1,52 @@ +#ENV*{bloc_ancre} +#SET{bornes,#ENV{page_courante}|bornes_pagination{#ENV{nombre_pages},10}} +#SET{premiere, #GET{bornes}|reset} +#SET{derniere, #GET{bornes}|end} +#SET{pages,#GET{premiere}|range{#GET{derniere}}} +#SET{sep,#ENV{separateur,'   '}} + + [(#ENV{label,''})][ + + (#SET{item, #ENV{page_courante}|moins{2}|mult{#ENV{pas}} }) + + ][(#ENV{url} + |parametre_url{#ENV{debut},#GET{item}|?{#GET{item}}} + |ancre_url{#ENV{ancre}} + |lien_ou_expose{#ENV{label_precedent, < },#ENV{page_courante}|<={1},'lien_pagination','',nofollow} + |inserer_attribut{rel,prev} + )[(#GET*{sep})]][(#GET{premiere}|>{1}|?{1})[(#GET*{sep})]...[(#GET*{sep})]][ + (#SET{item, #VALEUR|moins{1}|mult{#ENV{pas}} }) + ][(#ENV{url} + |parametre_url{#ENV{debut},#GET{item}|?{#GET{item}}} + |ancre_url{#ENV{ancre}} + |lien_ou_expose{#VALEUR,#VALEUR|=={#ENV{page_courante}},lien_pagination,'',nofollow})][(#VALEUR|<{#GET{derniere}}|?{#GET{sep}})][[(#GET*{sep})]...[(#GET*{sep})](#GET{derniere}|<{#ENV{nombre_pages}}|?{#ENV{nombre_pages}})][ + (#SET{item, #ENV{page_courante}|mult{#ENV{pas}} }) + ][[(#GET*{sep})](#ENV{url} + |parametre_url{#ENV{debut},#GET{item}|?{#GET{item}}} + |ancre_url{#ENV{ancre}} + |lien_ou_expose{#ENV{label_suivant, > },#ENV{page_courante}|>={#ENV{nombre_pages}},'lien_pagination','',nofollow} + |inserer_attribut{rel,next} + )] +