use markup::DynRender; /* This file is part of jellything (https://codeberg.org/metamuffin/jellything) which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2025 metamuffin */ pub mod filter_sort; pub mod format; pub mod home; pub mod locale; pub mod node_card; pub mod node_page; pub mod props; pub mod scaffold; pub mod search; pub mod settings; pub mod stats; /// render as supertrait would be possible but is not /// dyn compatible and I really dont want to expose generics /// that generate rendering code because of compile speed. pub trait Page { fn title(&self) -> String; fn to_render(&self) -> DynRender; fn class(&self) -> Option<&'static str> { None } } pub fn render_page(page: &dyn Page) -> String { // page.render() "a".to_string() }