Refactor containers to template literals for independent updates

- Extract all containers (login, notes list, note detail, note form, conversation form, conversations list) to CONTAINERS object
- Create initializeContainers() function to inject templates on page load
- Replace 300+ lines of inline HTML with single containerHost div
- Add session log documenting Option 1 approach with future intent for Option 2
- Each container now independently updatable without touching markup
- Maintains functionality while improving code organization and maintainability
This commit is contained in:
2026-01-10 15:38:57 +00:00
parent f563eb2a24
commit cee91571cd
5 changed files with 891 additions and 162 deletions
+3
View File
@@ -104,6 +104,9 @@ app.post('/api/submit', async (c) => {
}
});
// Serve static files (images, css, etc)
app.use('/images/*', serveStatic({ root: new URL('./', import.meta.url).pathname }));
// Serve static index.html
app.get('/', async (c) => {
const html = await Bun.file(new URL('./index.html', import.meta.url)).text();