2024-04-29 22:48:53 +02:00
|
|
|
use dioxus::prelude::{server_fn::error::ServerFnError, *};
|
|
|
|
use tracing::info;
|
|
|
|
|
2024-04-30 10:15:56 +02:00
|
|
|
use crate::components::{H1, HR, P};
|
2024-04-29 22:48:53 +02:00
|
|
|
|
|
|
|
#[component]
|
|
|
|
pub fn Impressum() -> Element {
|
|
|
|
let mut show_impressum = use_signal(|| false);
|
|
|
|
let mut check_impressum = move || {
|
|
|
|
if !show_impressum() {
|
|
|
|
show_impressum.set(true);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
rsx! {
|
|
|
|
if show_impressum() {
|
|
|
|
div {
|
|
|
|
class: "flex flex-col items-center",
|
|
|
|
H1 { "Impressum" },
|
|
|
|
P { "Tuan-Dat Tran" },
|
|
|
|
P { "c/o AutorenServices.de" },
|
|
|
|
P { "Birkenallee 24" },
|
|
|
|
P { "36037 Fulda" },
|
|
|
|
}
|
2024-04-30 10:15:56 +02:00
|
|
|
HR {}
|
2024-04-29 22:48:53 +02:00
|
|
|
div {
|
|
|
|
class: "flex flex-col items-center",
|
|
|
|
P { "tuan-dat.tran@tudattr.dev" },
|
|
|
|
P { "+49 176 83468388" },
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
div {
|
|
|
|
class: "flex flex-col items-center p-3",
|
|
|
|
button {
|
|
|
|
onclick: move |_| {
|
|
|
|
info!("Showing impressum.");
|
|
|
|
check_impressum();
|
|
|
|
},
|
|
|
|
|
|
|
|
H1 { "Show Impressum" },
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[server(GetImpressum)]
|
|
|
|
pub async fn get_impressum() -> Result<(), ServerFnError> {
|
|
|
|
Ok(())
|
|
|
|
}
|