feat: initial landing page

This commit is contained in:
Ayo 2023-10-14 23:52:13 +02:00
parent 074ebed6da
commit f906c31216
6 changed files with 40 additions and 28 deletions

View file

@ -20,7 +20,7 @@ export default eventHandler(async (event) => {
}
}
if (!!componentType) {
if (!!componentType && !!html) {
html = await insertRegistry(html.toString(), componentType);
}

36
src/pages/demo/index.html Normal file
View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hello {{name}} :)</title>
<script server:setup>
const name = "AYOs";
let greeting = "hello";
var count = sum(1, 247);
// comment
greeting = "nope";
function sum(x, y) {
return x + y;
}
</script>
</head>
<body>
<a href="/about">{{ count }}</a>
<div>
<hello-world name="{{name }}"></hello-world>
</div>
<p>some text: {{greeting}}</p>
{{greeting}} hey<br />
<clickable-text></clickable-text>
<script>
const helloWorld = document.querySelector("hello-world");
setTimeout(() => {
helloWorld.setAttribute("name", "Nitro");
}, 2000);
</script>
</body>
</html>

View file

@ -3,34 +3,10 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hello {{name}} :)</title>
<script server:setup>
const name = "AYOs";
let greeting = "hello";
var count = sum(1, 247);
// comment
greeting = "nope";
function sum(x, y) {
return x + y;
}
</script>
<title>McFly: Back to the Basics. Into the Future.</title>
</head>
<body>
<a href="/about">{{ count }}</a>
<div>
<hello-world name="{{name }}"></hello-world>
</div>
<p>some text: {{greeting}}</p>
{{greeting}} hey<br />
<clickable-text></clickable-text>
<script>
const helloWorld = document.querySelector("hello-world");
setTimeout(() => {
helloWorld.setAttribute("name", "Nitro");
}, 2000);
</script>
<h1>McFly</h1>
<a href="/demo">Demo</a>
</body>
</html>