Big commit. Implement handlers for everything that's currently rendered server side in the client-side frontend.

Add compiled templates file to .gitignore, will work out a system for making sure templates are compiled later.
Fix a couple bugs in the API and templates.

TODO for client-side rendering:
Make sure templates get compiled before running the server.
Add a config option to switch between server-side and client-side rendering
Fancy SPA stuff like intercepting links to render changes without a page-reload
This commit is contained in:
knotteye
2020-10-14 07:44:19 -05:00
parent 57d0b0f856
commit 988e3473a7
8 changed files with 177 additions and 31 deletions

View File

@ -10,7 +10,7 @@
"setup": "sh install/setup.sh",
"migrate": "ts-node src/migrate.ts",
"invite": "ts-node src/cli.ts --invite",
"make-templates": "cp node_modules/nunjucks/browser/nunjucks-slim.js site &&nunjucks-precompile -i [\"\\.html$\",\"\\.njk$\"] templates > site/templates.js"
"make-templates": "nunjucks-precompile -i [\"\\.html$\",\"\\.njk$\"] templates > site/templates.js"
},
"repository": {
"type": "git",