Fixed multi component i18n strings and added serverside impressum
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
24
src/home.rs
24
src/home.rs
@@ -1,10 +1,11 @@
|
||||
use crate::components::{Card, P};
|
||||
use crate::components::{Card, Urling, P};
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_sdk::{i18n::use_i18, translate};
|
||||
|
||||
#[component]
|
||||
pub fn Home() -> Element {
|
||||
let i18 = use_i18();
|
||||
|
||||
rsx! {
|
||||
div {
|
||||
class: "container mx-auto p-4 flex items-center justify-center max-w-md w-full",
|
||||
@@ -16,17 +17,16 @@ pub fn Home() -> Element {
|
||||
class: "py-4",
|
||||
div {
|
||||
class: "mb-2",
|
||||
P { { translate!(i18, "home.card.l1") } },
|
||||
P { { translate!(i18, "home.card.l2") } },
|
||||
P { { translate!(i18, "home.card.l3") } },
|
||||
P { { translate!(i18, "home.card.l4") }
|
||||
Link {
|
||||
to: "https://git.tudattr.dev/explore/repos",
|
||||
new_tab: true,
|
||||
class: "items-center font-medium hover:underline",
|
||||
"gitea"},
|
||||
{ translate!(i18, "home.card.l4_1") }
|
||||
},
|
||||
for line in translate!(i18, "home.card.text").split("\n").into_iter() {
|
||||
P {
|
||||
Urling {
|
||||
class: "items-center font-medium hover:underline",
|
||||
text: line,
|
||||
patterns: vec!["Gitea".to_string()],
|
||||
url: "https://git.tudattr.dev/explore/repos"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
Link {
|
||||
|
||||
Reference in New Issue
Block a user