Uses original router

- it has benefits to use hash properly
This commit is contained in:
2026-04-29 13:40:40 +02:00
parent 3cc11b68de
commit 139b1590ce
3 changed files with 2 additions and 14 deletions
-12
View File
@@ -1,12 +0,0 @@
#!/bin/env bash
set -eo pipefail # this can be harmful, see https://www.youtube.com/watch?v=4Jo3Ml53kvc
. bs/.common || {
echo 'Please run this script from the project root directory' >&2;
exit 1;
}
declare -r tmp=/tmp/lit-router-extended
declare -r pkg=./node_modules/@lit-labs/router
git clone git@github.com:klauss194/lit-router-extended.git --depth 1 "$tmp"
cp "$tmp"/* "$pkg"
rm -rf "$tmp"
+1 -1
View File
@@ -2,7 +2,7 @@ import type { RouteConfig } from "@lit-labs/router";
import { html } from "lit";
export const route = {
path: "/#/episodes",
path: "/episodes" as const,
async enter() {
await import("./index.js");
return true;
+1 -1
View File
@@ -16,7 +16,7 @@ export class AppCfpodcasts extends LitElement {
<main>${this._routes.outlet()}</main>
<nav>
<a href="${this._routes.link("/")}">Home</a>
<a href="${this._routes.link("/", { hash: "/episodes" })}">Episodes</a>
<a href="${this._routes.link(routeEpisodes.path)}">Episodes</a>
</nav>
`;
}