use axum::http::header;
use axum::response::IntoResponse;
const TAILWIND_CSS: &str = include_str!("static/tailwind.css");
const HTMX_JS: &str = include_str!("static/htmx.min.js");
pub async fn serve_tailwind_css() -> impl IntoResponse {
(
[
(header::CONTENT_TYPE, "text/css; charset=utf-8"),
(header::CACHE_CONTROL, "public, max-age=86400"),
],
TAILWIND_CSS,
)
}
pub async fn serve_htmx_js() -> impl IntoResponse {
(
[
(
header::CONTENT_TYPE,
"application/javascript; charset=utf-8",
),
(header::CACHE_CONTROL, "public, max-age=86400"),
],
HTMX_JS,
)
}