swaf/views/layouts/svelte_layout.html
Alice Gaudon e385986aca Svelte: refactor many symbols and safe eval backend calls arguments
Also allow dumping function contents by outputing them directly
2021-04-29 16:13:31 +02:00

29 lines
569 B
HTML

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