diff --git a/demo/src/lib/Alert.svelte b/demo/src/lib/Alert.svelte new file mode 100644 index 0000000..05cbf9d --- /dev/null +++ b/demo/src/lib/Alert.svelte @@ -0,0 +1,82 @@ + + +{#if !dismissed} +
{routingMode}
+ Experience the difference between single and multi-hash routing modes!
++ Currently in {routingMode} mode. + {#if routingMode === 'single'} + The entire hash value represents one route. + {:else} + The hash contains multiple key/value pairs for independent routers. + {/if} +
+ ++ Watch how the URL hash updates in real-time as you navigate through both demos: +
+{key}: {value || '(empty)'}In single mode, the entire hash represents one route:
+@@ -127,12 +32,12 @@
Hash routing is perfect for single-page applications. It works without server configuration and plays nicely with static hosting! @@ -147,34 +52,57 @@ đĄ Try changing the URL hash to see routing in action!
See how URLs look in both single and multi-hash modes:
+ You should always stick to Link components when creating navigation links. However,
+ hash HREF's in anchor elements work:
+
Run multiple independent hash routers simultaneously! Each router gets its own namespace in the hash value using key-value pairs. @@ -191,15 +119,15 @@
Mix path and hash routing! Use path routing for main navigation and hash routing for modals, tabs, or secondary navigation. @@ -213,191 +141,9 @@ Best practice: Use path routing for main content and hash routing for overlays and temporary UI states.
{routingMode}
-
- - Experience the difference between single and multi-hash routing modes! -
-- Currently in {routingMode} mode. - {#if routingMode === 'single'} - The entire hash value represents one route. - {:else} - The hash contains multiple key/value pairs for independent routers. - {/if} -
- -- Watch how the URL hash updates in real-time as you navigate through both demos: -
-{key}: {value || '(empty)'}- In single mode, the entire hash represents one route: -
-