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