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, "");
|
||||
html = html.replace(key, setupMap[value]);
|
||||
}
|
||||
console.log("---------");
|
||||
|
||||
return html;
|
||||
}
|
||||
|
|
|
@ -6,10 +6,15 @@
|
|||
<title>top about</title>
|
||||
<script server:setup>
|
||||
let greeting = "hello";
|
||||
const homeLabel = getHomeLabel();
|
||||
|
||||
function getHomeLabel() {
|
||||
return "Home" + "!!! " + new Date().toLocaleDateString();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a href="/">Home</a>
|
||||
<a href="/">{{homeLabel}}</a>
|
||||
<h1>{{greeting}}!!! Top Level About</h1>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a href="/about">{{ count }}</a>
|
||||
<a href="/about">{{ count + 123 }}</a>
|
||||
{{greeting}} hey
|
||||
<div>
|
||||
<hello-world name="{{name }}"></hello-world>
|
||||
|
|
Loading…
Reference in a new issue