From c36452cadf508573788de90a127bed3b3a092d52 Mon Sep 17 00:00:00 2001 From: David Beniamine <david.beniamine@tetras-libre.fr> Date: Tue, 29 Sep 2020 22:51:03 +0200 Subject: [PATCH] Add missing style and update menu config --- base.twig | 2 +- css/style.css | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/base.twig b/base.twig index 0cb62b1..39ee62d 100644 --- a/base.twig +++ b/base.twig @@ -47,7 +47,7 @@ </div> <div id="nav" role="navigation" tabindex="-1"> <ul> - {% for page in pages(depth=0, depthOffset=-1) | sort_by('menu_order') if page.title and not page.hidden %} + {% for page in pages(depth=1, depthOffset=-1) | sort_by('Menu_order') if page.title and not page.hidden %} <li{% if page.id == current_page.id %} class="active"{% endif %}> <a href="{{ page.url }}">{{ page.title }}</a> </li> diff --git a/css/style.css b/css/style.css index 143fa34..0251db5 100644 --- a/css/style.css +++ b/css/style.css @@ -401,3 +401,44 @@ input::-moz-focus-inner, button::-moz-focus-inner { border: 0; padding: 0; } + +/* + * Collapse with preview + */ + +.module .collapse, .module .collapsing { + height: 3rem; /* [NUM_OF_LINES] x [LINE_HEIGHT] */ +} + +.module .collapse { + position: relative; /* For ...'s content absolute positioning */ + display: block; + overflow: hidden; + float: right; +} + +.module .collapse:before { + content: ''; + position: absolute; + right: 0; + bottom: 0; +} + +.module .collapse.show { + height: auto; /* You need to reset the height when not collapsed */ +} + +.module .collapse.show:before { + display: none; /* Of course you don't want to display ... */ +} + + + +.module a.collapsed:after { + content: '+ Voir plus'; +} + +.module a:not(.collapsed):after { + content: '- Voir moins'; +} + -- GitLab