diff --git a/src/pages/index.astro b/src/pages/index.astro index da0d29d..abe49d7 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -2,6 +2,7 @@ import Footer from "../components/Footer.astro" import Layout from "../layouts/Layout.astro" import {Calendar, ChevronDown} from "@lucide/astro" +import path from "../utils/path.ts" --- @@ -66,7 +67,7 @@ import {Calendar, ChevronDown} from "@lucide/astro" Office-Programm, oder die eigene Cloud.

Wenn ihr euch mit eurer Stadtteil-Initiative, Computer-Stammtisch oder Aktivisty-Gruppe an den DIDAYS beteiligen möchtet, dann schaut - doch in unsere Einladung an Gruppen. + doch in unsere Einladung an Gruppen. Wir freuen uns auf die Zusammenarbeit!

diff --git a/src/utils/path.ts b/src/utils/path.ts new file mode 100644 index 0000000..907a692 --- /dev/null +++ b/src/utils/path.ts @@ -0,0 +1,6 @@ +export default function path(...components: Array){ + return '/' + components + .map(component => component.trim().replace(/(^[\/]*|[\/]*$)/g, '')) + .filter(component => component.length > 0) + .join("/") +} \ No newline at end of file