Mercurial
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 258:60a876c4587a | 259:667156fcd3e3 |
|---|---|
| 829 Seobeo_Render_Html_FilePath(final_body, "/talk/index.html", arena); | 829 Seobeo_Render_Html_FilePath(final_body, "/talk/index.html", arena); |
| 830 Dowa_HashMap_Push_Arena(resp, "body", final_body, arena); | 830 Dowa_HashMap_Push_Arena(resp, "body", final_body, arena); |
| 831 return resp; | 831 return resp; |
| 832 } | 832 } |
| 833 | 833 |
| 834 #if defined(MRJUNEJUNE_ENABLE_DEV_PAGES) | |
| 835 Seobeo_Request_Entry *GetJrpg(Seobeo_Request_Entry *req, Dowa_Arena *arena) | |
| 836 { | |
| 837 Seobeo_Request_Entry *resp = NULL; | |
| 838 char *final_body = Dowa_Arena_Allocate(arena, 50 * 1024); | |
| 839 Seobeo_Render_Html_FilePath(final_body, "/jrpg/index.html", arena); | |
| 840 Dowa_HashMap_Push_Arena(resp, "body", final_body, arena); | |
| 841 return resp; | |
| 842 } | |
| 843 #endif | |
| 844 | |
| 834 Seobeo_Request_Entry *GetNotesLogin(Seobeo_Request_Entry *req, Dowa_Arena *arena) | 845 Seobeo_Request_Entry *GetNotesLogin(Seobeo_Request_Entry *req, Dowa_Arena *arena) |
| 835 { | 846 { |
| 836 Seobeo_Request_Entry *resp = NULL; | 847 Seobeo_Request_Entry *resp = NULL; |
| 837 char *final_body = Dowa_Arena_Allocate(arena, 50 * 1024); | 848 char *final_body = Dowa_Arena_Allocate(arena, 50 * 1024); |
| 838 Seobeo_Render_Html_FilePath(final_body, "/notes/login.html", arena); | 849 Seobeo_Render_Html_FilePath(final_body, "/notes/login.html", arena); |
| 865 CREATE_REDIRECT_HANDLER(MarkDownToHtml, "/tools/markdown_to_html") | 876 CREATE_REDIRECT_HANDLER(MarkDownToHtml, "/tools/markdown_to_html") |
| 866 CREATE_REDIRECT_HANDLER(FileConverter, "/tools/file_converter") | 877 CREATE_REDIRECT_HANDLER(FileConverter, "/tools/file_converter") |
| 867 CREATE_REDIRECT_HANDLER(HlsPlayer, "/tools/hls_player") | 878 CREATE_REDIRECT_HANDLER(HlsPlayer, "/tools/hls_player") |
| 868 CREATE_REDIRECT_HANDLER(LatexEditor, "/tools/latex_editor") | 879 CREATE_REDIRECT_HANDLER(LatexEditor, "/tools/latex_editor") |
| 869 CREATE_REDIRECT_HANDLER(Talk, "/talk") | 880 CREATE_REDIRECT_HANDLER(Talk, "/talk") |
| 881 #if defined(MRJUNEJUNE_ENABLE_DEV_PAGES) | |
| 882 CREATE_REDIRECT_HANDLER(Jrpg, "/jrpg") | |
| 883 #endif | |
| 870 CREATE_REDIRECT_HANDLER(Editor, "/editor") | 884 CREATE_REDIRECT_HANDLER(Editor, "/editor") |
| 871 | 885 |
| 872 // S3 Upload URL API | 886 // S3 Upload URL API |
| 873 // POST /api/s3/upload-url | 887 // POST /api/s3/upload-url |
| 874 // Headers: Authorization: Bearer <token>, Content-Type: application/json | 888 // Headers: Authorization: Bearer <token>, Content-Type: application/json |
| 2051 | 2065 |
| 2052 // -- Talk --/ | 2066 // -- Talk --/ |
| 2053 Seobeo_Router_Register("GET", "/talk", GetTalk); | 2067 Seobeo_Router_Register("GET", "/talk", GetTalk); |
| 2054 Seobeo_Router_Register("GET", "/talk/index.html", GetRedirectTalk); | 2068 Seobeo_Router_Register("GET", "/talk/index.html", GetRedirectTalk); |
| 2055 | 2069 |
| 2070 #if defined(MRJUNEJUNE_ENABLE_DEV_PAGES) | |
| 2071 // -- Development pages --/ | |
| 2072 Seobeo_Router_Register("GET", "/jrpg", GetJrpg); | |
| 2073 Seobeo_Router_Register("GET", "/jrpg/index.html", GetRedirectJrpg); | |
| 2074 #endif | |
| 2075 | |
| 2056 // -- Notes --/ | 2076 // -- Notes --/ |
| 2057 Seobeo_Router_Register("GET", "/notes", GetNotes); | 2077 Seobeo_Router_Register("GET", "/notes", GetNotes); |
| 2058 Seobeo_Router_Register("GET", "/notes/", GetNotes); | 2078 Seobeo_Router_Register("GET", "/notes/", GetNotes); |
| 2059 Seobeo_Router_Register("GET", "/notes/index.html", GetNotes); | 2079 Seobeo_Router_Register("GET", "/notes/index.html", GetNotes); |
| 2060 Seobeo_Router_Register("GET", "/notes/login", GetNotesLogin); | 2080 Seobeo_Router_Register("GET", "/notes/login", GetNotesLogin); |