From c39cb5ed341d87375d559d92a87d94119c9833a9 Mon Sep 17 00:00:00 2001 From: Dave Smith-Hayes Date: Sat, 2 Mar 2024 12:26:15 -0500 Subject: [PATCH] move to hono for the platform. --- app/src/frontend/layout.tsx | 2 ++ app/src/frontend/layout/header.tsx | 9 +++++++++ app/src/index.ts | 9 --------- app/src/index.tsx | 24 ++++++++++++++++++++++++ 4 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 app/src/frontend/layout/header.tsx delete mode 100644 app/src/index.ts create mode 100644 app/src/index.tsx diff --git a/app/src/frontend/layout.tsx b/app/src/frontend/layout.tsx index 289b93d..b151874 100644 --- a/app/src/frontend/layout.tsx +++ b/app/src/frontend/layout.tsx @@ -1,4 +1,5 @@ import { FC } from 'hono/jsx'; +import Header from './layout/header'; const Layout: FC = (props) => { return ( @@ -7,6 +8,7 @@ const Layout: FC = (props) => { {props.siteData.title} +
{props.children} diff --git a/app/src/frontend/layout/header.tsx b/app/src/frontend/layout/header.tsx new file mode 100644 index 0000000..ed612d5 --- /dev/null +++ b/app/src/frontend/layout/header.tsx @@ -0,0 +1,9 @@ +const Header = (props) => { + return ( +
+
{props.title}
+
+ ); +}; + +export default Header; diff --git a/app/src/index.ts b/app/src/index.ts deleted file mode 100644 index 12aa4a9..0000000 --- a/app/src/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Hono } from 'hono'; - -const app = new Hono(); - -app.get('/', (c) => { - return c.text('Hello Hono!'); -}); - -export default app; diff --git a/app/src/index.tsx b/app/src/index.tsx new file mode 100644 index 0000000..f5a191c --- /dev/null +++ b/app/src/index.tsx @@ -0,0 +1,24 @@ +import { Hono } from 'hono'; +import SiteData from './model/SiteData'; +import Layout from './frontend/layout'; + +const app = new Hono(); + +app.get('/', (c) => { + const siteData: SiteData = { + title: "Slovocast", + description: "A no-nonsense podcast hosting platform." + }; + + const layout = ( + +
+

Slovocast

+
+
+ ); + + return c.html(layout); +}); + +export default app;