wip: New Application Architecture
Explore a new approach to clean up the implementation of an AppShell and individual pages. Will likely retire htmx for a lightweight custom page router.
This commit is contained in:
44
src/frontend/AppShell.tsx
Normal file
44
src/frontend/AppShell.tsx
Normal file
@@ -0,0 +1,44 @@
|
||||
import { Html } from "@elysiajs/html";
|
||||
|
||||
const styles = Bun.file("./src/public/styles.css").text();
|
||||
const headScript = Bun.file("./src/public/head.js").text();
|
||||
const onLoadScript = Bun.file("./src/public/onLoad.js").text();
|
||||
|
||||
export function AppShell(responseValue: any) {
|
||||
return (
|
||||
<html>
|
||||
<head>
|
||||
<title>Caleb's Blog</title>
|
||||
<style>
|
||||
{styles}
|
||||
</style>
|
||||
<script>
|
||||
{headScript}
|
||||
</script>
|
||||
<script defer>
|
||||
{onLoadScript}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
{responseValue}
|
||||
<aside>
|
||||
<h3>About Me</h3>
|
||||
<p>I'm a software engineer</p>
|
||||
<ul>
|
||||
<li>Twitter</li>
|
||||
<li>GitHub</li>
|
||||
<li>LinkedIn</li>
|
||||
</ul>
|
||||
<h3>Categories</h3>
|
||||
<ul>
|
||||
<li>Web Development</li>
|
||||
<li>UI/UX Design</li>
|
||||
<li>Productivity</li>
|
||||
<li>Career</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user