swaf/assets/views/layouts/svelte_layout.html

30 lines
618 B
HTML

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