mirror of
https://github.com/TakeusV1/flask_ipam.git
synced 2026-10-13 17:15:33 +02:00
V2026.1
- Fixes - ADD list view for allocations - ADD hide dhcp option (list view)
This commit is contained in:
1 parent
03e543e7f8
commit
800ff061b7
8 files changed
+100
-33
No files matched your search
@@ -6,4 +6,8 @@
|
||||
pre {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
scroll-behavior: auto !important;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
if (history.scrollRestoration) {
|
||||
history.scrollRestoration = 'manual';
|
||||
}
|
||||
|
||||
function instantCenter() {
|
||||
const hash = window.location.hash;
|
||||
if (!hash) return;
|
||||
|
||||
const targetId = hash.substring(1);
|
||||
const element = document.getElementById(targetId);
|
||||
|
||||
if (element) {
|
||||
setTimeout(() => {
|
||||
const elementRect = element.getBoundingClientRect();
|
||||
const absoluteElementTop = elementRect.top + window.scrollY;
|
||||
|
||||
const middle = absoluteElementTop - (window.innerHeight / 2) + (elementRect.height / 2);
|
||||
|
||||
window.scrollTo({
|
||||
top: middle,
|
||||
behavior: 'auto'
|
||||
});
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('load', instantCenter);
|
||||
Reference in new issue
Block a user