48 lines
974 B
Markdown
48 lines
974 B
Markdown
# Episode Web Viewer (Node.js)
|
|
|
|
A simple Express.js web application to view translated episodes with speaker color coding.
|
|
|
|
## Features
|
|
|
|
Same as the Python/Flask version:
|
|
- Mobile-first design
|
|
- Vertical line display with selectable lines
|
|
- Translation toggle (Chinese shown in expanded card)
|
|
- Speaker colors from `_colors.json`
|
|
- Episode navigation via side menu
|
|
- Server-side rendering with EJS templates
|
|
|
|
## Running the App
|
|
|
|
```bash
|
|
# From webnode folder
|
|
./run.sh
|
|
|
|
# Or manually:
|
|
npm install
|
|
npm start
|
|
|
|
# Development mode (auto-reload on Node 18+):
|
|
npm run dev
|
|
```
|
|
|
|
Then open http://localhost:5000
|
|
|
|
## Project Structure
|
|
|
|
```
|
|
webnode/
|
|
├── server.js # Express server
|
|
├── package.json # Node dependencies
|
|
├── run.sh # Run script
|
|
├── views/
|
|
│ └── episode.ejs # EJS template
|
|
└── public/
|
|
└── style.css # Styles
|
|
```
|
|
|
|
## Dependencies
|
|
|
|
- **express**: Web framework
|
|
- **ejs**: Templating engine
|