website: big snapshot + cleanup

This commit is contained in:
nym21
2026-01-23 00:25:11 +01:00
parent 6ef43ce7ff
commit f7bfe5ecaa
70 changed files with 2975 additions and 5567 deletions

View File

@@ -6,7 +6,7 @@ use aide::{
};
use axum::{
Extension,
http::HeaderMap,
http::{HeaderMap, header},
response::{Html, Redirect, Response},
routing::get,
};
@@ -83,6 +83,9 @@ impl ApiRoutes for ApiRouter<AppState> {
),
)
.route("/api", get(Html::from(include_str!("./scalar.html"))))
.route("/scalar.js", get(|| async {
([(header::CONTENT_TYPE, "application/javascript")], include_str!("./scalar.js"))
}))
.route(
"/api/{*path}",
get(|| async { Redirect::permanent("/api") }),

View File

@@ -13,14 +13,14 @@
<body>
<div id="app"></div>
<!-- https://app.unpkg.com/@scalar/api-reference@1.37.0/files/dist/browser/standalone.js -->
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
<script src="/scalar.js"></script>
<script>
Scalar.createApiReference("#app", {
url: "/openapi.json",
hideClientButton: true,
telemetry: false,
withDefaultFonts: false,
// showToolbar: "never",
});
</script>

File diff suppressed because one or more lines are too long