Redesign main page with minimalist "No" and move interactive UI to /playground
- Create elegant minimalist main page with centered "No" - Add automatic dark mode support for main page - Move original interactive API testing interface to /playground - Add footer links to main page for navigation - Update routing to serve both pages appropriately - Update documentation to reflect new page structure The main page now provides a clean, focused experience while the playground remains available for API testing and exploration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
858e14a520
commit
ebd0fcc448
3 changed files with 98 additions and 5 deletions
|
|
@ -56,10 +56,13 @@ The entire application is contained in `src/main.rs` with ~372 lines of code. Th
|
|||
|
||||
### Key Components
|
||||
|
||||
1. **Embedded HTML Frontend**: The HTML/CSS/JavaScript frontend is embedded as a string constant (`HTML_FRONTEND`) directly in the source code, eliminating the need for static file serving.
|
||||
1. **Embedded HTML Frontends**: Two HTML frontends are embedded as string constants:
|
||||
- `SIMPLE_FRONTEND`: Minimalist main page with just "No" centered on screen
|
||||
- `PLAYGROUND_FRONTEND`: Interactive API testing playground with buttons and examples
|
||||
|
||||
2. **Request Router**: The `route_request()` function handles all routing logic:
|
||||
- `/` - Serves the embedded HTML frontend
|
||||
- `/` - Serves the minimalist "No" page
|
||||
- `/playground` - Serves the interactive API testing interface
|
||||
- `/api/no` - API endpoint with format parameter support
|
||||
- `/health` - Health check endpoint
|
||||
- CORS headers are added to all responses
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue