51 lines
1.3 KiB
Rust
51 lines
1.3 KiB
Rust
|
use dioxus::prelude::{server_fn::error::ServerFnError, *};
|
||
|
use tracing::info;
|
||
|
|
||
|
use crate::components::{H1, P};
|
||
|
|
||
|
#[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" },
|
||
|
}
|
||
|
hr { class:"h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"}
|
||
|
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(())
|
||
|
}
|