swaf/src/assets/views/layouts/svelte_layout.html

29 lines
626 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
%head%
<style>%css%</style>
<script type="module" defer>
import View from '/js/views/%canonicalViewName%.js';
import * as stores from '/js/stores.js';
const localStore = stores[Object.keys(stores)[0]].locals;
const localMap = %locals%;
localStore.set((key, args) => {
return localMap[args ?
`'${key}', \`${args}\``
: `'${key}'`];
});
new View({
hydrate: true,
target: document.body,
});
</script>
</head>
<body>
%html%
</body>
</html>