/* 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) 2026 metamuffin */ mod components; pub(crate) mod format; mod scaffold; pub use jellyui_client_scripts::*; pub use jellyui_client_style::*; pub use jellyui_locale::tr; use crate::{components::View, scaffold::Scaffold}; use jellycommon::{jellyobject::Object, *}; use serde::{Deserialize, Serialize}; #[rustfmt::skip] #[derive(Debug, Deserialize, Serialize, Default)] pub struct Config { pub brand: String, pub slogan: String, pub logo: bool, } pub struct RenderInfo<'a> { pub user: Option>, pub lang: &'a str, pub status_message: Option<&'a str>, pub config: &'a Config, } pub fn render_view(ri: RenderInfo<'_>, view: Object<'_>) -> String { Scaffold { ri: &ri, main: View { ri: &ri, view }, title: view.get(VIEW_TITLE).unwrap_or_default(), class: "theme-purple", } .to_string() }