Skip to content

Commit ada5b04

Browse files
committed
Prise en compte de l'offset de l'en-tête de la catégorie lors du scrolling.
L'en-tête du tableau n'est plus sticky.
1 parent 2665e72 commit ada5b04

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

docs/static/css/list.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,6 @@ summary.category_name {
398398
font-size: var(--font-size-medium);
399399
}
400400

401-
.row.game {
402-
position: sticky;
403-
top: 154px;
404-
z-index: 5;
405-
}
406-
407401
.table .jeu {
408402
display: flex;
409403
flex-wrap: wrap;

docs/static/js/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,10 @@ document.addEventListener("DOMContentLoaded", function () {
125125
function adjustScroll(hash) {
126126
let target = document.querySelector(hash)
127127
if (target) {
128-
let offset = document.querySelector("#search_text").offsetHeight
128+
let offsetSearch = document.querySelector("#search_text").offsetHeight
129+
let offsetCategory = document.querySelector("summary.category_name").offsetHeight
129130
window.scrollTo({
130-
top: target.offsetTop - offset - 5,
131+
top: target.offsetTop - offsetSearch - offsetCategory - 1,
131132
behavior: "smooth"
132133
})
133134
}

0 commit comments

Comments
 (0)