Fix browser console warning
This commit is contained in:
parent
a844af69a0
commit
67b3a91a23
2 changed files with 8 additions and 2 deletions
|
@ -88,5 +88,5 @@ pub async fn style() -> impl IntoResponse {
|
||||||
.get_style_str()
|
.get_style_str()
|
||||||
.to_string();
|
.to_string();
|
||||||
|
|
||||||
([("content-type", "style/css")], style)
|
([("content-type", "text/css")], style)
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ use axum::{
|
||||||
};
|
};
|
||||||
use chrono::prelude::*;
|
use chrono::prelude::*;
|
||||||
use common::{footer, head, header, style};
|
use common::{footer, head, header, style};
|
||||||
use maud::{html, Escaper, Markup, PreEscaped};
|
use maud::{html, Escaper, Markup, PreEscaped, DOCTYPE};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use store::Store;
|
use store::Store;
|
||||||
use tokio::net::TcpListener;
|
use tokio::net::TcpListener;
|
||||||
|
@ -50,6 +50,7 @@ async fn main() -> Result<()> {
|
||||||
|
|
||||||
async fn home() -> Markup {
|
async fn home() -> Markup {
|
||||||
html!(
|
html!(
|
||||||
|
(DOCTYPE)
|
||||||
(head(""))
|
(head(""))
|
||||||
body {
|
body {
|
||||||
content {
|
content {
|
||||||
|
@ -71,6 +72,7 @@ async fn home() -> Markup {
|
||||||
async fn topics(State(state): State<MainState>) -> impl IntoResponse {
|
async fn topics(State(state): State<MainState>) -> impl IntoResponse {
|
||||||
let topics = state.store.read().unwrap().list().unwrap();
|
let topics = state.store.read().unwrap().list().unwrap();
|
||||||
html!(
|
html!(
|
||||||
|
(DOCTYPE)
|
||||||
(head("sujets"))
|
(head("sujets"))
|
||||||
body {
|
body {
|
||||||
content {
|
content {
|
||||||
|
@ -94,6 +96,7 @@ async fn topics(State(state): State<MainState>) -> impl IntoResponse {
|
||||||
async fn activity(State(state): State<MainState>) -> impl IntoResponse {
|
async fn activity(State(state): State<MainState>) -> impl IntoResponse {
|
||||||
let topics = state.store.read().unwrap().activity().unwrap();
|
let topics = state.store.read().unwrap().activity().unwrap();
|
||||||
html!(
|
html!(
|
||||||
|
(DOCTYPE)
|
||||||
(head("activité"))
|
(head("activité"))
|
||||||
body {
|
body {
|
||||||
content {
|
content {
|
||||||
|
@ -120,6 +123,7 @@ async fn topic(Path(name): Path<String>, State(state): State<MainState>) -> impl
|
||||||
};
|
};
|
||||||
|
|
||||||
html!(
|
html!(
|
||||||
|
(DOCTYPE)
|
||||||
(head(&name))
|
(head(&name))
|
||||||
body {
|
body {
|
||||||
content {
|
content {
|
||||||
|
@ -210,6 +214,7 @@ fn sanithize_identifier(input: &str) -> String {
|
||||||
|
|
||||||
async fn create() -> impl IntoResponse {
|
async fn create() -> impl IntoResponse {
|
||||||
html!(
|
html!(
|
||||||
|
(DOCTYPE)
|
||||||
(head("créer"))
|
(head("créer"))
|
||||||
body {
|
body {
|
||||||
content {
|
content {
|
||||||
|
@ -242,6 +247,7 @@ async fn create() -> impl IntoResponse {
|
||||||
fn error(message: impl ToString) -> Markup {
|
fn error(message: impl ToString) -> Markup {
|
||||||
let message = message.to_string();
|
let message = message.to_string();
|
||||||
html!(
|
html!(
|
||||||
|
(DOCTYPE)
|
||||||
(head("Failure"))
|
(head("Failure"))
|
||||||
body {
|
body {
|
||||||
content {
|
content {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue