This commit is contained in:
parent
3ddb62c072
commit
e349e642cb
10 changed files with 63 additions and 40 deletions
|
|
@ -67,6 +67,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
body[data-template="index"] {
|
body[data-template="index"] {
|
||||||
|
main {
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
.filter-menu {
|
.filter-menu {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
|
@ -121,12 +124,19 @@
|
||||||
|
|
||||||
.mobile-menu {
|
.mobile-menu {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
z-index: 2;
|
||||||
ul {
|
ul {
|
||||||
font-size: var(--font-size-L);
|
font-size: var(--font-size-L);
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.toggle-mobile-menu {
|
||||||
|
pointer-events: none;
|
||||||
|
span {
|
||||||
|
pointer-events: all;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
header:hover ~ main {
|
header:hover ~ main {
|
||||||
|
|
|
||||||
|
|
@ -183,14 +183,13 @@ nav.main-menu:hover {
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobile-menu button:has(+ dialog:open) {
|
.mobile-menu button:has(+ dialog::backdrop) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog#mobile-menu-content:open {
|
dialog#mobile-menu-content {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: none;
|
border: none;
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
|
|
|
||||||
|
|
@ -508,14 +508,13 @@ nav.main-menu:hover {
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobile-menu button:has(+ dialog:open) {
|
.mobile-menu button:has(+ dialog::backdrop) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog#mobile-menu-content:open {
|
dialog#mobile-menu-content {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: none;
|
border: none;
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
|
|
@ -678,6 +677,9 @@ body[data-template=index] .projects-index li section.toggle .project-slideshow p
|
||||||
top: var(--slider-height);
|
top: var(--slider-height);
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
body[data-template=index] main {
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
body[data-template=index] .filter-menu {
|
body[data-template=index] .filter-menu {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
|
@ -719,6 +721,7 @@ body[data-template=index] .projects-index li section.toggle .project-slideshow p
|
||||||
}
|
}
|
||||||
.mobile-menu {
|
.mobile-menu {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
z-index: 2;
|
||||||
}
|
}
|
||||||
.mobile-menu ul {
|
.mobile-menu ul {
|
||||||
font-size: var(--font-size-L);
|
font-size: var(--font-size-L);
|
||||||
|
|
@ -726,6 +729,12 @@ body[data-template=index] .projects-index li section.toggle .project-slideshow p
|
||||||
.mobile-menu ul a {
|
.mobile-menu ul a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
.mobile-menu .toggle-mobile-menu {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
.mobile-menu .toggle-mobile-menu span {
|
||||||
|
pointer-events: all;
|
||||||
|
}
|
||||||
header:hover ~ main {
|
header:hover ~ main {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transition-duration: 0;
|
transition-duration: 0;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
31
site/snippets/mobile-menu.php
Normal file
31
site/snippets/mobile-menu.php
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
<nav class="mobile-menu">
|
||||||
|
|
||||||
|
<button popovertarget="mobile-menu-content">
|
||||||
|
<h1 class="toggle-mobile-menu">
|
||||||
|
<span>Menu</span>
|
||||||
|
</h1>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<dialog id="mobile-menu-content" popover>
|
||||||
|
<h1 class="title-nav">
|
||||||
|
<a href="<?= page('home')->url() ?>">
|
||||||
|
Hic et Nunc Studio
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a class="nav-item-home" href="<?= page('home')->url() ?>"><?= page('home')->title() ?></a>,
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="nav-item-projects" href="<?= page('index')->url() ?>"><?= page('index')->title() ?></a>,
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="nav-item-about" href="<?= page('infos')->url() ?>"><?= page('infos')->title() ?></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<button popovertarget="mobile-menu-content" popovertargetaction="hide" class="toggle-mobile-menu">
|
||||||
|
Fermer
|
||||||
|
</button>
|
||||||
|
</dialog>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
|
@ -20,34 +20,3 @@
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<nav class="mobile-menu">
|
|
||||||
|
|
||||||
<button command="show-modal" commandfor="mobile-menu-content">
|
|
||||||
<h1 class="toggle-mobile-menu">
|
|
||||||
Menu
|
|
||||||
</h1>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<dialog id="mobile-menu-content" closedby="any">
|
|
||||||
<h1 class="title-nav">
|
|
||||||
<a href="<?= page('home')->url() ?>">
|
|
||||||
Hic et Nunc Studio
|
|
||||||
</a>
|
|
||||||
</h1>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a class="nav-item-home" href="<?= page('home')->url() ?>"><?= page('home')->title() ?></a>,
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="nav-item-projects" href="<?= page('index')->url() ?>"><?= page('index')->title() ?></a>,
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="nav-item-about" href="<?= page('infos')->url() ?>"><?= page('infos')->title() ?></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<button commandfor="mobile-menu-content" command="close" class="toggle-mobile-menu">
|
|
||||||
Fermer
|
|
||||||
</button>
|
|
||||||
</dialog>
|
|
||||||
|
|
||||||
</nav>
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<?php snippet('header') ?>
|
<?php snippet('header') ?>
|
||||||
|
|
||||||
|
<?php snippet('mobile-menu') ?>
|
||||||
|
|
||||||
<div id="home-slideshow">
|
<div id="home-slideshow">
|
||||||
|
|
||||||
<?php foreach ($slides as $slide): ?>
|
<?php foreach ($slides as $slide): ?>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php snippet('header') ?>
|
<?php snippet('header') ?>
|
||||||
|
|
||||||
|
<?php snippet('mobile-menu') ?>
|
||||||
|
|
||||||
<ul class="projects-index">
|
<ul class="projects-index">
|
||||||
<li class="filter-menu">
|
<li class="filter-menu">
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
<span> <?= $project->tags() ?> </span>
|
<span> <?= $project->tags() ?> </span>
|
||||||
<span class="date"> <?= $project->date()->toDate('Y') ?> </span>
|
<span class="date"> <?= $project->date()->toDate('Y') ?> </span>
|
||||||
</button>
|
</button>
|
||||||
<span class="slide-number"><span class="active-index">0</span>/<?= $project->images()->count() ?></span>
|
<span class="slide-number">slide number/total slides</span>
|
||||||
</div>
|
</div>
|
||||||
<section class="toggle">
|
<section class="toggle">
|
||||||
<div class= "project-slideshow-container">
|
<div class= "project-slideshow-container">
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
<?php snippet('header') ?>
|
<?php snippet('header') ?>
|
||||||
|
|
||||||
|
<?php snippet('mobile-menu') ?>
|
||||||
|
|
||||||
|
|
||||||
<section class="main-infos">
|
<section class="main-infos">
|
||||||
<p>
|
<p>
|
||||||
<?= $page->presentation() ?>
|
<?= $page->presentation() ?>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue