move doctype into head

This commit is contained in:
JOLIMAITRE Matthieu 2024-08-04 17:35:16 +02:00
parent 86ffc13319
commit 5a021f9781
2 changed files with 3 additions and 8 deletions

View file

@ -13,7 +13,7 @@ use axum::{
};
use chrono::prelude::*;
use common::{footer, head, header, style};
use maud::{html, Escaper, Markup, PreEscaped, DOCTYPE};
use maud::{html, Escaper, Markup, PreEscaped};
use serde::{Deserialize, Serialize};
use store::Store;
use tokio::net::TcpListener;
@ -51,7 +51,6 @@ async fn main() -> Result<()> {
async fn home() -> Markup {
html!(
(DOCTYPE)
(head(""))
body {
content {
@ -73,7 +72,6 @@ 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 {
@ -97,7 +95,6 @@ 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 {
@ -124,7 +121,6 @@ async fn topic(Path(name): Path<String>, State(state): State<MainState>) -> impl
};
html!(
(DOCTYPE)
(head(&name))
body {
content {
@ -218,7 +214,6 @@ fn sanithize_identifier(input: &str) -> String {
async fn create() -> impl IntoResponse {
html!(
(DOCTYPE)
(head("créer"))
body {
content {
@ -251,7 +246,6 @@ async fn create() -> impl IntoResponse {
fn error(message: impl ToString) -> Markup {
let message = message.to_string();
html!(
(DOCTYPE)
(head("Failure"))
body {
content {