From b32de9540d2542f152d92da931ecbdad90edd4ec Mon Sep 17 00:00:00 2001 From: Keep Creating Online <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Wed, 29 Jan 2025 22:21:04 -0500 Subject: [PATCH] update --- ..._Multi-View_Architecture_Migration_Plan.md | 329 -------------- ...eo_&_Audio_Note_Specification_Version 3.md | 412 ++++++++---------- src/index.html | 2 +- 3 files changed, 190 insertions(+), 553 deletions(-) delete mode 100644 src/content/roadmap/01_bitvid_Enhanced_Multi-View_Architecture_Migration_Plan.md diff --git a/src/content/roadmap/01_bitvid_Enhanced_Multi-View_Architecture_Migration_Plan.md b/src/content/roadmap/01_bitvid_Enhanced_Multi-View_Architecture_Migration_Plan.md deleted file mode 100644 index ec5f4be..0000000 --- a/src/content/roadmap/01_bitvid_Enhanced_Multi-View_Architecture_Migration_Plan.md +++ /dev/null @@ -1,329 +0,0 @@ -# **bitvid: Enhanced Multi-View Architecture Migration Plan** - -This plan describes how to transform your current `index.html` file so that different sections of content are loaded as separate views. It keeps the header and footer consistent on each view, while the center portion of the page switches among “most recent videos,” user profiles, trending feeds, and more. Future features like personalized feeds or channel pages can be added following the same approach. - ---- - -## **1. Goals** - -1. **Preserve Navigation Bar & Footer** - Keep the top navigation (logo, login/logout, “add video” controls) and the bottom footer in `index.html` at all times. - -2. **Separate the Content Grid** - Move the existing video grid or “recent videos” listing into its own file, for example `views/most-recent-videos.html`. You will load this content into a main container within `index.html`. - -3. **Handle Additional Views** - Prepare to load other views (profiles, trending, personalized feeds) in the same container. Each view can be its own HTML snippet or partial, stored separately (e.g. `views/profile-view.html`, `views/trending.html`, etc.). - -4. **Single-Page Navigation** - Use JavaScript to switch or load the correct view based on the URL. This keeps the user on a single page, but updates what they see in the main section. - -5. **Maintain Existing Modal** - The video-modal (`video-modal.html`) will remain a separate file, loaded into the DOM as is. This ensures consistent playback. - ---- - -## **2. Proposed File Structure** - -Below is an example layout. You do not need to follow it exactly, but it helps you see where each piece goes. - -``` -project/ -├─ index.html -├─ components/ -│ └─ video-modal.html -├─ views/ -│ ├─ most-recent-videos.html -│ ├─ profile-view.html -│ ├─ trending.html -│ └─ ... -├─ js/ -│ ├─ app.js -│ ├─ nostr.js -│ ├─ webtorrent.js -│ ├─ ... -│ └─ viewManager.js <-- new file for handling view loading -├─ css/ -│ └─ style.css -└─ ... -``` - -1. **`index.html`** - - Contains the header, top nav, login/logout, plus the footer. - - Has a single `
` where content from your partial views will be loaded. - -2. **`views/most-recent-videos.html`** - - Contains only the HTML (and minimal inline scripts) for the grid of most recent videos. - - No header or footer. - - No scripts for Nostr or WebTorrent—those remain in your main JS files. - -3. **Other Views** (optional) - - Similar structure to `most-recent-videos.html`. - - Example: `profile-view.html`, `trending.html`, etc. - -4. **`video-modal.html`** - - Remains a separate component file for the modal. - - Inserted into the DOM in `index.html` or on demand, as you already do. - -5. **`viewManager.js`** (new optional file) - - Manages the logic of fetching these partial view files and inserting them into the page container. - - Handles route changes to decide which view to load. - ---- - -## **3. Modifying `index.html`** - -Below is a suggested strategy for `index.html`: - -1. **Keep the current `
`** - It has your logo and login/logout UI. - -2. **Keep the current `