Initial commit

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
Tuan-Dat Tran
2024-04-29 22:48:53 +02:00
commit 75c64a7227
27 changed files with 7453 additions and 0 deletions

61
src/home.rs Normal file
View File

@@ -0,0 +1,61 @@
use crate::components::{Card, H5, P};
use dioxus::prelude::*;
#[component]
pub fn Home() -> Element {
rsx! {
Card {
div {
class: "p-5",
div {
class: "pb-4",
div {
class: "flex justify-between",
Picture {src: "/pictures/comfy.webp"},
}
}
H5 { "Tuan-Dat Tran", span { class: "text-grey-600 dark:text-grey-500 text-lg", " (He/Him)" } },
div {
class: "py-4",
P { "Hey there! 👋🏻👋🏼👋🏽👋🏾👋🏿" },
P { "Welcome to my little place on the internet." },
P { "While you're here, why don't you check out my other projects over on my ",
Link {
to: "https://git.tudattr.dev/explore/repos",
new_tab: true,
class: "inline-flex items-center font-medium hover:underline",
"gitea"},
"?"
},
P { "I also offer IT-related consulting." },
P { "Have a look at my CV and contact me if you're interested." },
},
Link {
to: "mailto:tuan-dat.tran@tudattr.dev",
class: "w-fit relative inline-flex items-center justify-center p-1 mb-2 me-2 overflow-hidden text-sm font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-green-400 to-blue-600 group-hover:from-green-400 group-hover:to-blue-600 hover:text-white dark:text-white w-fill",
p {
class: "p-1",
"Get in touch."
}
},
}
},
}
}
#[derive(PartialEq, Props, Clone)]
struct PictureProp {
#[props(default = "".to_string())]
class: String,
src: String,
}
fn Picture(prop: PictureProp) -> Element {
rsx! {
img {
class: "w-24 h-24 rounded-full shadow-lg",
src: "{prop.src}",
alt: "",
},
}
}