Mercurial
diff mrjunejune/main.c @ 259:667156fcd3e3
Add dev-only cyberpunk JRPG page
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Wed, 05 Aug 2026 09:19:41 -0700 |
| parents | 745fd127b2a1 |
| children | 1f9877b637e9 |
line wrap: on
line diff
--- a/mrjunejune/main.c Wed Aug 05 05:25:40 2026 -0700 +++ b/mrjunejune/main.c Wed Aug 05 09:19:41 2026 -0700 @@ -831,6 +831,17 @@ return resp; } +#if defined(MRJUNEJUNE_ENABLE_DEV_PAGES) +Seobeo_Request_Entry *GetJrpg(Seobeo_Request_Entry *req, Dowa_Arena *arena) +{ + Seobeo_Request_Entry *resp = NULL; + char *final_body = Dowa_Arena_Allocate(arena, 50 * 1024); + Seobeo_Render_Html_FilePath(final_body, "/jrpg/index.html", arena); + Dowa_HashMap_Push_Arena(resp, "body", final_body, arena); + return resp; +} +#endif + Seobeo_Request_Entry *GetNotesLogin(Seobeo_Request_Entry *req, Dowa_Arena *arena) { Seobeo_Request_Entry *resp = NULL; @@ -867,6 +878,9 @@ CREATE_REDIRECT_HANDLER(HlsPlayer, "/tools/hls_player") CREATE_REDIRECT_HANDLER(LatexEditor, "/tools/latex_editor") CREATE_REDIRECT_HANDLER(Talk, "/talk") +#if defined(MRJUNEJUNE_ENABLE_DEV_PAGES) +CREATE_REDIRECT_HANDLER(Jrpg, "/jrpg") +#endif CREATE_REDIRECT_HANDLER(Editor, "/editor") // S3 Upload URL API @@ -2053,6 +2067,12 @@ Seobeo_Router_Register("GET", "/talk", GetTalk); Seobeo_Router_Register("GET", "/talk/index.html", GetRedirectTalk); +#if defined(MRJUNEJUNE_ENABLE_DEV_PAGES) + // -- Development pages --/ + Seobeo_Router_Register("GET", "/jrpg", GetJrpg); + Seobeo_Router_Register("GET", "/jrpg/index.html", GetRedirectJrpg); +#endif + // -- Notes --/ Seobeo_Router_Register("GET", "/notes", GetNotes); Seobeo_Router_Register("GET", "/notes/", GetNotes);