diff --git a/src/components/helper/spa/SPARouter.astro b/src/components/helper/spa/SPARouter.astro new file mode 100644 index 0000000..688e06e --- /dev/null +++ b/src/components/helper/spa/SPARouter.astro @@ -0,0 +1,4 @@ +--- +import { ClientRouter } from "astro:transitions"; +--- + \ No newline at end of file diff --git a/src/components/helper/spa/Spinner.astro b/src/components/helper/spa/Spinner.astro new file mode 100644 index 0000000..5913186 --- /dev/null +++ b/src/components/helper/spa/Spinner.astro @@ -0,0 +1,41 @@ +--- + +--- +
+
+ Loading... +
+ + + \ No newline at end of file diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index e1b69fd..56f78d0 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -18,8 +18,9 @@ interface Props { ogImage?: string; } -import { ClientRouter } from "astro:transitions"; import PoweredBy from "../components/PoweredBy.astro"; +import SPARouter from "../components/helper/spa/SPARouter.astro"; +import Spinner from "../components/helper/spa/Spinner.astro"; const spaEnabled = siteConfig.spa const noscript = siteConfig.noClientJavaScript @@ -47,7 +48,7 @@ const { title = pageTitle, author = siteConfig.defaultAuthor.name,description = {pageTitle} - {spaEnabled && } + {spaEnabled && } @@ -58,6 +59,7 @@ const { title = pageTitle, author = siteConfig.defaultAuthor.name,description = + {spaEnabled && }