Merge pull request 'ramdom pointer manicules' (#2) from pointer into main
All checks were successful
Deploy / deploy (push) Successful in 29s
Reviewed-on: #2
|
|
@ -29,6 +29,14 @@
|
|||
}
|
||||
|
||||
|
||||
#footer .contact{
|
||||
cursor: url('/assets/cursor/LeK_manicules7.png') 0 16, pointer;
|
||||
}
|
||||
|
||||
#footer .newsletter{
|
||||
cursor: url('/assets/cursor/LeK_manicules3.png') 0 16, pointer;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 640px) {
|
||||
#footer{
|
||||
font-size: 1.2rem;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@
|
|||
line-height: 1;
|
||||
}
|
||||
|
||||
#header .logo a{
|
||||
display: block;
|
||||
height: 4rem;
|
||||
cursor: url('/assets/cursor/LeK_manicules7.png') -16 16, pointer;
|
||||
}
|
||||
|
||||
#header .logo-k {
|
||||
font-size: 4rem;
|
||||
}
|
||||
|
|
@ -44,6 +50,7 @@
|
|||
|
||||
#header .menu-button {
|
||||
text-transform: uppercase;
|
||||
cursor: url('/assets/cursor/LeK_manicules6.png') 0 32, pointer;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -90,6 +97,14 @@
|
|||
}
|
||||
|
||||
|
||||
#header .languages a.is-current{
|
||||
cursor: default;
|
||||
}
|
||||
#header .languages a:not(.is-current) {
|
||||
cursor: url('/assets/cursor/LeK_manicules8.png') 0 0, pointer;
|
||||
}
|
||||
|
||||
|
||||
.breadcrumb {
|
||||
|
||||
height: var(--breadcrumb-h);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
overflow: hidden;
|
||||
background-color: white;
|
||||
|
||||
cursor: url('/assets/cursor/LeK_manicules9.png') 0 16, pointer;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
BIN
assets/cursor/LeK_manicules.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
assets/cursor/LeK_manicules10.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
assets/cursor/LeK_manicules2.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
assets/cursor/LeK_manicules3.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
assets/cursor/LeK_manicules4.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
assets/cursor/LeK_manicules5.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
assets/cursor/LeK_manicules6.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
assets/cursor/LeK_manicules7.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
assets/cursor/LeK_manicules8.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
assets/cursor/LeK_manicules9.png
Normal file
|
After Width: | Height: | Size: 4 KiB |
|
|
@ -81,6 +81,45 @@ if (landingPage) {
|
|||
}
|
||||
|
||||
|
||||
// Curseur aléatoire sur les éléments cliquables -----------------------------------------
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
const cursorImages = [
|
||||
'/assets/cursor/LeK_manicules.png',
|
||||
'/assets/cursor/LeK_manicules3.png',
|
||||
'/assets/cursor/LeK_manicules4.png',
|
||||
'/assets/cursor/LeK_manicules5.png',
|
||||
'/assets/cursor/LeK_manicules6.png',
|
||||
'/assets/cursor/LeK_manicules7.png',
|
||||
];
|
||||
|
||||
let lastCursorIdx = -1;
|
||||
let currentClickable = null;
|
||||
const cursorStyleEl = document.createElement('style');
|
||||
document.head.appendChild(cursorStyleEl);
|
||||
|
||||
function pickCursor() {
|
||||
let idx;
|
||||
do { idx = Math.floor(Math.random() * cursorImages.length); }
|
||||
while (idx === lastCursorIdx && cursorImages.length > 1);
|
||||
lastCursorIdx = idx;
|
||||
return cursorImages[idx];
|
||||
}
|
||||
|
||||
const cursorZones = '.links-group, #site-menu, .home-agenda, [data-template="agenda"], .group-list-agenda-links, .banner-animation, .breadcrumb, #footer';
|
||||
|
||||
document.addEventListener('mouseover', (e) => {
|
||||
const clickable = e.target.closest('a, button, summary, [role="button"]');
|
||||
if (clickable !== currentClickable) {
|
||||
currentClickable = clickable;
|
||||
const inZone = clickable?.closest(cursorZones);
|
||||
cursorStyleEl.textContent = clickable && inZone
|
||||
? `* { cursor: url('${pickCursor()}') 0 32, pointer !important; }`
|
||||
: '';
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Désactive les transitions pendant le resize pour éviter les flashs
|
||||
let resizeTimer;
|
||||
window.addEventListener("resize", () => {
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@
|
|||
|
||||
<?php foreach (['contact', 'newsletter', 'mentions-legales'] as $slug): ?>
|
||||
<?php if ($linkedPage = page($slug)): ?>
|
||||
<a href="<?= $linkedPage->url() ?>"><?= $linkedPage->title()->esc() ?></a>
|
||||
<a class="<?= esc($slug, 'attr') ?>" href="<?= $linkedPage->url() ?>"><?= $linkedPage->title()->esc() ?></a>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
|
||||
|
|
|
|||