2024-05-14 11:33:25 +02:00
|
|
|
use dioxus::prelude::*;
|
2024-05-21 16:39:11 +02:00
|
|
|
use dioxus_sdk::{i18n::use_i18, translate};
|
2024-04-29 22:48:53 +02:00
|
|
|
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);
|
2024-05-21 16:39:11 +02:00
|
|
|
let i18 = use_i18();
|
2024-04-29 22:48:53 +02:00
|
|
|
|
|
|
|
rsx! {
|
|
|
|
if show_impressum() {
|
|
|
|
div {
|
2024-05-21 18:11:25 +02:00
|
|
|
div {
|
|
|
|
class: "flex flex-col items-center",
|
|
|
|
button {
|
|
|
|
onclick: move |_| {
|
|
|
|
info!("Hide impressum.");
|
|
|
|
},
|
|
|
|
H1 { { translate!(i18, "impressum.on") } },
|
2024-05-14 11:33:25 +02:00
|
|
|
},
|
2024-05-21 18:11:25 +02:00
|
|
|
P { "Tuan-Dat Tran" },
|
|
|
|
P { "c/o AutorenServices.de" },
|
|
|
|
P { "Birkenallee 24" },
|
|
|
|
P { "36037 Fulda" },
|
2024-05-14 11:33:25 +02:00
|
|
|
},
|
2024-05-21 18:11:25 +02:00
|
|
|
HR {}
|
|
|
|
div {
|
|
|
|
class: "flex flex-col items-center",
|
|
|
|
P { "tuan-dat.tran@tudattr.dev" },
|
|
|
|
P { "+49 176 83468388" },
|
|
|
|
}
|
2024-04-29 22:48:53 +02:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
div {
|
|
|
|
class: "flex flex-col items-center p-3",
|
|
|
|
button {
|
2024-05-14 11:33:25 +02:00
|
|
|
onclick: move |_| async move {
|
|
|
|
show_impressum.set(true);
|
2024-04-29 22:48:53 +02:00
|
|
|
},
|
|
|
|
|
2024-05-21 16:39:11 +02:00
|
|
|
H1 { { translate!(i18, "impressum.off") } },
|
2024-04-29 22:48:53 +02:00
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|