Clone starter

This commit is contained in:
2024-03-07 15:31:41 +01:00
commit 1b7ee20d05
87 changed files with 17015 additions and 0 deletions

View File

@ -0,0 +1,12 @@
---
import MainLayout from "../layouts/MainLayout.astro";
import { getLayoutSingle } from "../services/api/layout.service";
const layout = await getLayoutSingle("404");
---
<MainLayout title="Error 404" layout={layout} description="Page not found">
Not found, error 404 The page you are looking for no longer exists. Perhaps
you can return back to the homepage and see if you can find what you are
looking for. Or, you can try finding it by using the search form below.
</MainLayout>

View File

@ -0,0 +1,16 @@
---
import MainLayout from "../layouts/MainLayout.astro";
import { getPageSingle } from "../services/api";
const { slug } = Astro.params;
const page = await getPageSingle(slug!);
if (!page) return Astro.redirect("/404");
if (page.slug == "home") return Astro.redirect("/");
---
<MainLayout title={page.title} layout={page.layout} description="">
{page.title}
{page.layout}
<!-- {homePage && <RenderPage page={homePage} />}
{!homePage && <NoHomePage />} -->
</MainLayout>

View File

@ -0,0 +1,18 @@
---
import MainLayout from "../layouts/MainLayout.astro";
import { getPageSingle } from "../services/api";
const homePage = await getPageSingle("home");
const pageTitle = homePage?.meta?.title ?? homePage?.title ?? "TurboPress";
const layout = homePage?.layout;
---
<MainLayout
title={pageTitle}
{layout}
description={homePage?.meta?.description}
content={homePage?.content}
image={homePage?.meta?.image}
/>