diff --git a/base.twig b/base.twig index 0cb62b1a0b2ab20f291cedf78913d3059cf3e1a4..39ee62d23e01e9c00ab6c3d173f2823b7c039164 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 143fa34eb385c5e504ad983b9d552fd43aa47d23..0251db5854f78d41d3af1908d26aec7b17de7440 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'; +} +