mirror of
https://github.com/Lapikud/lapikud.github.io.git
synced 2026-08-08 19:49:13 +00:00
mentors update + navbar bug fixes
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export function routeTo(path) {
|
export function routeTo(path) {
|
||||||
window.history.pushState({}, "", path);
|
window.history.pushState({}, "", path);
|
||||||
|
window.scrollTo(0, 0);
|
||||||
window.dispatchEvent(new PopStateEvent("popstate"));
|
window.dispatchEvent(new PopStateEvent("popstate"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -14,6 +15,7 @@
|
|||||||
|
|
||||||
function navigate(path) {
|
function navigate(path) {
|
||||||
window.history.pushState({}, "", path);
|
window.history.pushState({}, "", path);
|
||||||
|
window.scrollTo(0, 0);
|
||||||
currentPath = path;
|
currentPath = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ export function navigate(path, options = {}) {
|
|||||||
const resolvedPath = getTranslatedRoute(path, selectedLang);
|
const resolvedPath = getTranslatedRoute(path, selectedLang);
|
||||||
|
|
||||||
window.history.pushState({}, "", resolvedPath);
|
window.history.pushState({}, "", resolvedPath);
|
||||||
|
window.scrollTo(0, 0);
|
||||||
window.dispatchEvent(new PopStateEvent('popstate'));
|
window.dispatchEvent(new PopStateEvent('popstate'));
|
||||||
|
|
||||||
// Update language based on new route
|
// Update language based on new route
|
||||||
|
|||||||
Reference in New Issue
Block a user