From c4d99ef7307c238244c975e45ae1e24c923538b6 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 13 Feb 2023 19:48:42 +0100 Subject: prepare for blog stuff --- src/source.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/source.rs') diff --git a/src/source.rs b/src/source.rs index ef76512..04ec929 100644 --- a/src/source.rs +++ b/src/source.rs @@ -1,3 +1,4 @@ +use crate::layout::{DynScaffold, Scaffold}; use rocket::{ get, http::Header, @@ -6,8 +7,6 @@ use rocket::{ }; use std::time::{Duration, SystemTime, UNIX_EPOCH}; -use crate::layout::{DynLayoutPage, LayoutPage}; - pub struct Reload(pub T); #[rocket::async_trait] @@ -51,7 +50,7 @@ pub fn prepare_source() -> SourceWrap { } #[get("/source")] -pub async fn r_source(text: &State) -> Reload { +pub async fn r_source(text: &State) -> Reload { let mspf = 100u128; let ts = SystemTime::now() @@ -74,7 +73,7 @@ pub async fn r_source(text: &State) -> Reload { out += &text.0[(i % text.0.len() as u128) as usize]; out += "\n"; } - Reload(LayoutPage { + Reload(Scaffold { title: "Source".to_string(), content: markup::new! { pre { @out } }, }) -- cgit v1.2.3-70-g09d2