+1
src/main.rs
+1
src/main.rs
+9
src/routes.rs
+9
src/routes.rs
···
6
6
use crate::oauth::OAuthClientType;
7
7
use crate::templates;
8
8
9
+
const FAVICON_SVG: &str = include_str!("../static/favicon.svg");
10
+
9
11
#[derive(Deserialize)]
10
12
pub struct LoginForm {
11
13
handle: String,
···
142
144
session.insert("did", &data.did).unwrap();
143
145
HttpResponse::Ok().finish()
144
146
}
147
+
148
+
#[get("/favicon.svg")]
149
+
pub async fn favicon() -> HttpResponse {
150
+
HttpResponse::Ok()
151
+
.content_type("image/svg+xml")
152
+
.body(FAVICON_SVG)
153
+
}
+2
src/templates.rs
+2
src/templates.rs
···
5
5
<head>
6
6
<meta charset="UTF-8">
7
7
<title>@me - login</title>
8
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
8
9
<style>
9
10
* { margin: 0; padding: 0; box-sizing: border-box; }
10
11
body { font-family: 'Monaco', 'Courier New', monospace; display: flex; align-items: center; justify-content: center; height: 100vh; background: #000; color: #0f0; }
···
64
65
<meta charset="UTF-8">
65
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
67
<title>@me</title>
68
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
67
69
<style>
68
70
* {{ margin: 0; padding: 0; box-sizing: border-box; }}
69
71