chore(dioxus): Upgraded to dioxus 0.6.0

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
Tuan-Dat Tran
2024-12-11 23:28:12 +01:00
parent ac80065e82
commit 74f68eff5b
21 changed files with 3317 additions and 1211 deletions

View File

@@ -1,23 +1,21 @@
use crate::components::{Card, Urling, P};
use dioxus::prelude::*;
use dioxus_sdk::{i18n::use_i18, translate};
use dioxus_i18n::t;
#[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",
Card {
name: translate!(i18, "home.card.name"),
gender: translate!(i18, "home.card.gender"),
picture: "/pictures/headshot.webp",
name: t!("home_card_name"),
gender: t!("home_card_gender"),
picture: asset!("./assets/pictures/headshot.webp"),
div {
class: "py-4",
div {
class: "mb-2",
for line in translate!(i18, "home.card.text").split("\n").into_iter() {
for line in t!("home_card_text").split("\n").into_iter() {
P {
Urling {
class: "items-center font-medium hover:underline",
@@ -32,7 +30,7 @@ pub fn Home() -> Element {
Link {
to: "mailto:tuan-dat.tran@tudattr.dev",
class: "text-gray-900 bg-gradient-to-br from-green-400 to-blue-600 group-hover:from-green-400 group-hover:to-blue-600 hover:text-white rounded-full shadow-lg py-4 px-4",
{ translate!(i18, "home.card.contact_button") }
{ t!("home_card_contact_button") }
}
},
}