Refactor endpoints and update HTML for new API

Simplified /archive endpoint to return static HTML without dynamic content or database queries. Refactored CreatePaste method to accept a Paste object and conditionally write compressed or uncompressed content based on size. Added new /api/pastes/get endpoint for fetching paginated pastes in JSON format.

Updated archives.html to remove dynamic placeholders, using JavaScript for fetching and displaying pastes, and handling user authentication and pagination. Improved index.html with new font family and font weight for buttons. Updated paste.html to truncate long paste titles for display.

Removed unused using directive in Turnstile.cs. Updated Program.cs to include new API endpoint and refactored CreatePaste method.
This commit is contained in:
whoswhip
2024-10-25 16:40:26 -04:00
parent 59c609e7c1
commit 46615aba5b
5 changed files with 185 additions and 104 deletions
+2
View File
@@ -308,6 +308,8 @@
border: #2a2a2a00 2px solid;
cursor: pointer;
font-size: 1.2em;
font-family: "Noto Sans Mono", "Consolas", "SF Mono", monospace;
font-weight: bold;
}
.button:hover {