add anchors strip
This commit is contained in:
parent
01ebd8ed41
commit
a2fd20c1cc
3 changed files with 31 additions and 2 deletions
|
|
@ -1,5 +1,22 @@
|
||||||
|
.anchors-strip {
|
||||||
|
padding: calc(var(--padding-vertical) / 1.6) var(--space-m) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.anchors-strip ul {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.anchors-strip a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
text-underline-offset: 0.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.anchors-strip li {
|
||||||
|
margin-right: 5vw;
|
||||||
|
}
|
||||||
|
|
||||||
[data-template="sectioned"] section {
|
[data-template="sectioned"] section {
|
||||||
scroll-margin-top: 6rem;
|
scroll-margin-top: 8rem;
|
||||||
background-color: var(--color);
|
background-color: var(--color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,4 @@ tabs:
|
||||||
label: Saisons
|
label: Saisons
|
||||||
type: pages
|
type: pages
|
||||||
template: season
|
template: season
|
||||||
info: "{{ page.children.count }} événements"
|
info: "{{ page.children.count }} événements"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,17 @@
|
||||||
<?php snippet('header') ?>
|
<?php snippet('header') ?>
|
||||||
|
|
||||||
|
<section class="anchors-strip">
|
||||||
|
<ul>
|
||||||
|
<?php foreach($page->children() as $section): ?>
|
||||||
|
<?php if ($section->isIndexed() != 'false'): ?>
|
||||||
|
<li>
|
||||||
|
<a href="#<?= $section->slug() ?>" title="Défiler jusqu'à la section <?= $section->title() ?>"><?= $section->title() ?></a>
|
||||||
|
</li>
|
||||||
|
<?php endif ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h1><?= $page->title() ?></h1>
|
<h1><?= $page->title() ?></h1>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue