This commit is contained in:
Peter Li 2026-02-07 18:11:31 -08:00
parent 3b8d877eca
commit b6ae017457
4 changed files with 8 additions and 1 deletions

View File

@ -47,6 +47,13 @@ pub async fn show_calendar(
render_calendar_for_month(&state, &auth, today, today).await render_calendar_for_month(&state, &auth, today, today).await
} }
pub async fn favicon() -> impl IntoResponse {
(
[(header::CONTENT_TYPE, "image/x-icon")],
include_bytes!("../templates/favicon.ico").as_slice(),
)
}
pub async fn show_calendar_for_month( pub async fn show_calendar_for_month(
State(state): State<AppState>, State(state): State<AppState>,
headers: HeaderMap, headers: HeaderMap,

View File

@ -34,6 +34,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Route wiring stays here so `main` is the single startup overview. // Route wiring stays here so `main` is the single startup overview.
let app = Router::new() let app = Router::new()
.route("/", get(handlers::show_calendar)) .route("/", get(handlers::show_calendar))
.route("/favicon.ico", get(handlers::favicon))
.route("/login", get(handlers::show_login)) .route("/login", get(handlers::show_login))
.route("/login", post(handlers::login)) .route("/login", post(handlers::login))
.route("/signup", get(handlers::show_signup)) .route("/signup", get(handlers::show_signup))

BIN
templates/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -5,7 +5,6 @@
{% block content %} {% block content %}
<section class="mx-auto max-w-md rounded-3xl border border-slate-200/80 bg-white/90 p-6 shadow-sm"> <section class="mx-auto max-w-md rounded-3xl border border-slate-200/80 bg-white/90 p-6 shadow-sm">
<h1 class="text-2xl font-bold tracking-tight">Create Account</h1> <h1 class="text-2xl font-bold tracking-tight">Create Account</h1>
<p class="mt-2 text-sm text-slate-600">First account created becomes admin.</p>
{% if !page.allow_signup %} {% if !page.allow_signup %}
<p class="mt-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-800">Sign-up is disabled by server config.</p> <p class="mt-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-800">Sign-up is disabled by server config.</p>
{% endif %} {% endif %}