Compare commits
2 Commits
b06122b7b1
...
15450285e9
Author | SHA1 | Date | |
---|---|---|---|
15450285e9 | |||
aa9165b4df |
@ -14,11 +14,11 @@ pub mod web_app_backend {
|
||||
use rocket::response::Redirect;
|
||||
use rocket::{Build, Rocket};
|
||||
use rocket_dyn_templates::{context, Template};
|
||||
use void_fe::utils::prop_structs::{PoemDatabase, VoidProps, ContentProps};
|
||||
use void_fe::utils::user_prefs::*;
|
||||
use void_fe::void_app::{self, VirtualDom};
|
||||
pub use void_fe::components::void_content::RenderContent;
|
||||
use void_fe::utils::helpers::get_homepage_paragraph;
|
||||
use void_fe::utils::prop_structs::{ContentProps, PoemDatabase, VoidProps};
|
||||
use void_fe::utils::user_prefs::*;
|
||||
use void_fe::void_app::{self, VirtualDom};
|
||||
|
||||
static POEM_DATABASE: OnceCell<PoemDatabase> = OnceCell::new();
|
||||
|
||||
@ -91,7 +91,7 @@ pub mod web_app_backend {
|
||||
// user_prefs: user_prefs
|
||||
// };
|
||||
// let mut vdom = VirtualDom::new_with_props(void_app::HomePage, void_props);
|
||||
let mut vdom = VirtualDom::new_with_props(void_app::HomePage, void_fe::void_app::HomePageProps { props: void_props });
|
||||
let mut vdom = VirtualDom::new_with_props(void_app::HomePage, void_props);
|
||||
let _ = vdom.rebuild_in_place();
|
||||
let output = dioxus_ssr::render(&vdom);
|
||||
Template::render(
|
||||
@ -188,7 +188,9 @@ pub mod web_app_backend {
|
||||
pub async fn build_rocket() -> Rocket<Build> {
|
||||
let mut poem_database = PoemDatabase::new();
|
||||
poem_database.build_poem_database().await;
|
||||
POEM_DATABASE.set(poem_database).expect("Could not initialize poem database.");
|
||||
POEM_DATABASE
|
||||
.set(poem_database)
|
||||
.expect("Could not initialize poem database.");
|
||||
rocket::build()
|
||||
.mount("/images", FileServer::from("public/images"))
|
||||
.mount("/styles", FileServer::from("public/styles"))
|
||||
|
@ -193,7 +193,7 @@ pub mod void_app {
|
||||
PageBase {
|
||||
Title { title: "Settings".to_string(), is_html: false, user_prefs: user_prefs.clone() }
|
||||
BackToHomePage { theme: user_prefs.clone().get_theme(), font: user_prefs.clone().get_font() }
|
||||
div { class: "p-4 flex flex-col space-y-4 mx-auto max-w-full justify-center",
|
||||
div { class: "flex flex-col justify-center max-w-full p-4 mx-auto space-y-4",
|
||||
div { class: "p-4 flex flex-col space-y-4 text-xl text-center ring-4 {user_theme_card} {user_font_card}",
|
||||
p {
|
||||
"Theme"
|
||||
|
Loading…
Reference in New Issue
Block a user