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;