diff --git a/src/handlers.rs b/src/handlers.rs index 17999c0..a1ecbb7 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -47,6 +47,13 @@ pub async fn show_calendar( 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( State(state): State, headers: HeaderMap, diff --git a/src/main.rs b/src/main.rs index 1f40bf9..7a8a535 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,6 +34,7 @@ async fn main() -> Result<(), Box> { // Route wiring stays here so `main` is the single startup overview. let app = Router::new() .route("/", get(handlers::show_calendar)) + .route("/favicon.ico", get(handlers::favicon)) .route("/login", get(handlers::show_login)) .route("/login", post(handlers::login)) .route("/signup", get(handlers::show_signup)) diff --git a/templates/favicon.ico b/templates/favicon.ico new file mode 100644 index 0000000..f844f5d Binary files /dev/null and b/templates/favicon.ico differ diff --git a/templates/signup.html b/templates/signup.html index 8f5d796..e328f06 100644 --- a/templates/signup.html +++ b/templates/signup.html @@ -5,7 +5,6 @@ {% block content %}

Create Account

-

First account created becomes admin.

{% if !page.allow_signup %}

Sign-up is disabled by server config.

{% endif %}