Alice Gaudon
6aa37eb9e4
Reorganize views into new "assets" folder structure
Turn locals into a store so locals don't have to be passed through files that don't need them
Some fixes to previous commit (esm) 82ab0b963c
Remove afs in favor of fs.promises (renamed afs.exists to Utils.doesFileExist
Rename Utils.readdirRecursively to Utils.listFilesRecursively
30 lines
618 B
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>
|