swaf/views/layouts/svelte_layout.html

29 lines
569 B
HTML
Raw Normal View History

2021-03-24 16:07:50 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
%head%
<style>%css%</style>
<script type="module" defer>
import View from '/js/%canonicalViewName%.js';
const locals = %locals%;
2021-03-24 16:07:50 +01:00
new View({
hydrate: true,
target: document.body,
props: {
locals: (key, args) => {
return locals[args ?
`'${key}', \`${args}\``
: `'${key}'`];
2021-03-24 16:07:50 +01:00
},
},
});
</script>
</head>
<body>
%html%
</body>
</html>