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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user