Stop handling URL hash through routing

We stop handling the URL hash through the routing system. Hashes are
local to the current view and can be handled by the shown components.

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
This commit is contained in:
Thomas Scholtes
2023-07-10 15:15:22 +02:00
parent 74fa05cf26
commit a7f267932d
7 changed files with 6 additions and 21 deletions
+4 -3
View File
@@ -11,7 +11,6 @@
import { Renderer } from "@app/lib/markdown";
export let content: string;
export let hash: string | undefined = undefined;
// If present, resolve all relative links with respect to this URL
export let linkBaseUrl: string | undefined = undefined;
export let path: string = "/";
@@ -69,8 +68,6 @@
}
}
if (hash) scrollIntoView(hash);
// Iterate over all images, and replace the source with a canonicalized URL
// pointing at the projects /raw endpoint.
if (rawPath) {
@@ -112,6 +109,10 @@
}
await Promise.allSettled(treeChanges);
if (window.location.hash) {
scrollIntoView(window.location.hash.substring(1));
}
});
</script>