feat: update server setup examples about & index.html
This commit is contained in:
parent
f420c9fe2b
commit
0646b44712
3 changed files with 7 additions and 3 deletions
|
@ -96,7 +96,6 @@ function doSetUp(html: string) {
|
||||||
value = value.replace(/\s/g, "");
|
value = value.replace(/\s/g, "");
|
||||||
html = html.replace(key, setupMap[value]);
|
html = html.replace(key, setupMap[value]);
|
||||||
}
|
}
|
||||||
console.log("---------");
|
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,15 @@
|
||||||
<title>top about</title>
|
<title>top about</title>
|
||||||
<script server:setup>
|
<script server:setup>
|
||||||
let greeting = "hello";
|
let greeting = "hello";
|
||||||
|
const homeLabel = getHomeLabel();
|
||||||
|
|
||||||
|
function getHomeLabel() {
|
||||||
|
return "Home" + "!!! " + new Date().toLocaleDateString();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a href="/">Home</a>
|
<a href="/">{{homeLabel}}</a>
|
||||||
<h1>{{greeting}}!!! Top Level About</h1>
|
<h1>{{greeting}}!!! Top Level About</h1>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a href="/about">{{ count }}</a>
|
<a href="/about">{{ count + 123 }}</a>
|
||||||
{{greeting}} hey
|
{{greeting}} hey
|
||||||
<div>
|
<div>
|
||||||
<hello-world name="{{name }}"></hello-world>
|
<hello-world name="{{name }}"></hello-world>
|
||||||
|
|
Loading…
Reference in a new issue