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