Compare commits

...

7 Commits

Author SHA1 Message Date
Tuan-Dat Tran d9f904231a Merge pull request '0.1.2' (#11) from 0.1.2 into dev
Reviewed-on: #11
2024-07-25 12:10:22 +02:00
Tuan-Dat Tran c2ab088799 updated screenshot
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-07-25 12:08:22 +02:00
Tuan-Dat Tran f336daf54b Added robotx.txt, sitemap.xml and meta description
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-07-25 11:33:03 +02:00
Tuan-Dat Tran 991cb57c88 Updated Versioning and switchted to buildx
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-07-25 10:21:56 +02:00
Tuan-Dat Tran 1fbc2b7521 Modified docker push to use buildkit
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-07-25 03:49:16 +02:00
Tuan-Dat Tran 20e1df177c updated version
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-07-25 03:40:14 +02:00
Tuan-Dat Tran 4a18e432b2 Added personal picture and added Author component
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-07-25 03:39:53 +02:00
18 changed files with 289 additions and 159 deletions

131
Cargo.lock generated
View File

@ -87,19 +87,6 @@ dependencies = [
"pin-project-lite",
]
[[package]]
name = "async-compression"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e9eabd7a98fe442131a17c316bd9349c43695e49e730c3c8e12cfb5f4da2693"
dependencies = [
"flate2",
"futures-core",
"memchr",
"pin-project-lite",
"tokio",
]
[[package]]
name = "async-lock"
version = "3.3.0"
@ -130,7 +117,7 @@ dependencies = [
[[package]]
name = "athome"
version = "0.1.0"
version = "0.2.1"
dependencies = [
"dioxus",
"dioxus-free-icons",
@ -498,15 +485,6 @@ dependencies = [
"libc",
]
[[package]]
name = "crc32fast"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa"
dependencies = [
"cfg-if",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.19"
@ -594,9 +572,9 @@ dependencies = [
[[package]]
name = "dioxus"
version = "0.5.1"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e50735a28b303b0d67e1b5637fb57e4711bf2776266290cbc987c0adfdabb55"
checksum = "b8e7fe217b50d43b27528b0f24c89b411f742a3e7564d1cfbf85253f967954db"
dependencies = [
"dioxus-config-macro",
"dioxus-core",
@ -615,9 +593,9 @@ dependencies = [
[[package]]
name = "dioxus-cli-config"
version = "0.5.0"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5d4661064bad2f0b12929faf6c9cea4d94e60217ba6b11ff4146b505a57124b"
checksum = "c7dffc452ed91af6ef772b0d9a5899573f6785314e97c533733ec55413c01df3"
dependencies = [
"once_cell",
"serde",
@ -627,9 +605,9 @@ dependencies = [
[[package]]
name = "dioxus-config-macro"
version = "0.5.0"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebe244197b320dec9e9f38742985fe98c058136ada770df73e9429878ed92863"
checksum = "cb1a1aa34cc04c1f7fcbb7a10791ba773cc02d834fe3ec1fe05647699f3b101f"
dependencies = [
"proc-macro2",
"quote",
@ -637,9 +615,9 @@ dependencies = [
[[package]]
name = "dioxus-core"
version = "0.5.1"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "088daa3f45aaa729e9eef32dc0a9393dd709ee906b092089e5839cad1cad7c85"
checksum = "3730d2459ab66951cedf10b09eb84141a6eda7f403c28057cbe010495be156b7"
dependencies = [
"futures-channel",
"futures-util",
@ -648,15 +626,16 @@ dependencies = [
"rustc-hash",
"serde",
"slab",
"slotmap",
"tracing",
"tracing-subscriber",
]
[[package]]
name = "dioxus-core-macro"
version = "0.5.1"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e29a07448245451334eec2883a394e207f28caedf0a57fd1a903e9ccea0b9531"
checksum = "0d9c0dfe0e6a46626fa716c4aa1d2ccb273441337909cfeacad5bb6fcfb947d2"
dependencies = [
"constcat",
"convert_case",
@ -684,12 +663,11 @@ dependencies = [
[[package]]
name = "dioxus-fullstack"
version = "0.5.2"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db7fb1a22ff7af8756bc9506eebfbecf374b1c8c57f087c85c752ba8bd767fce"
checksum = "b80f0ac18166302341164e681322e0385131c08a11c3cc1c51ee8df799ab0d3d"
dependencies = [
"anymap",
"async-compression",
"async-trait",
"axum",
"base64",
@ -723,9 +701,9 @@ dependencies = [
[[package]]
name = "dioxus-hooks"
version = "0.5.1"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a8c7019308a6d8381fce84a51006f207407af265aebc5425871399c98d788e4"
checksum = "fa8f9c661eea82295219d25555d5c0b597e74186b029038ceb5e3700ccbd4380"
dependencies = [
"dioxus-core",
"dioxus-debug-cell",
@ -740,9 +718,9 @@ dependencies = [
[[package]]
name = "dioxus-hot-reload"
version = "0.5.0"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d5a28a2af6655473c6521fb5a428538807b985e8e5f1a8c30e2ab71bd54e637"
checksum = "77d01246cb1b93437fb0bbd0dd11cfc66342d86b4311819e76654f2017ce1473"
dependencies = [
"dioxus-core",
"dioxus-html",
@ -754,9 +732,9 @@ dependencies = [
[[package]]
name = "dioxus-html"
version = "0.5.1"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8d612d9732f32adc1852e13e1387a9d5baa710b0b004641b5123def53065c8d"
checksum = "f01a0826f179adad6ea8d6586746e8edde0c602cc86f4eb8e5df7a3b204c4018"
dependencies = [
"async-trait",
"dioxus-core",
@ -777,9 +755,9 @@ dependencies = [
[[package]]
name = "dioxus-html-internal-macro"
version = "0.5.0"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1799f34affdb158f6ebec23b46b11f9e65de0bbadbbb781dc68c3eddfe6fd32b"
checksum = "0b96f35a608d0ab8f4ca6f66ce1828354e4ebd41580b12454f490221a11da93c"
dependencies = [
"convert_case",
"proc-macro2",
@ -789,9 +767,9 @@ dependencies = [
[[package]]
name = "dioxus-interpreter-js"
version = "0.5.1"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc68a22e33562317b40ccc7b2d140017e510745c5d7e062e911c6a4f9042e4b1"
checksum = "351fad098c657d14f3ac2900362d2b86e83c22c4c620a404839e1ab628f3395b"
dependencies = [
"dioxus-core",
"dioxus-html",
@ -800,14 +778,15 @@ dependencies = [
"sledgehammer_bindgen",
"sledgehammer_utils",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
]
[[package]]
name = "dioxus-lib"
version = "0.5.1"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9af36a9f985ad68783acf62dc276b0a8f0aa928f1c3b42f78e2ae222b19d445c"
checksum = "8bd39b2c41dd1915dcb91d914ea72d8b646f1f8995aaeff82816b862ec586ecd"
dependencies = [
"dioxus-core",
"dioxus-core-macro",
@ -819,9 +798,9 @@ dependencies = [
[[package]]
name = "dioxus-liveview"
version = "0.5.1"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dc132aacc3eb3d11db8f20afa5f3cfc74147374cc41285488083476a0ed1f17"
checksum = "3ada18a8fe0764f492fd4fb169b818877799e887dbb6ffb19289801d924faf18"
dependencies = [
"axum",
"dioxus-cli-config",
@ -857,9 +836,9 @@ dependencies = [
[[package]]
name = "dioxus-router"
version = "0.5.0"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c4cbbc1aff811aa3715c94a7ca0375be0be34356aba7f3897328d844323519b"
checksum = "c235c5dbeb528c0c2b0424763da812e7500df69b82eddac54db6f4975e065c5f"
dependencies = [
"dioxus-cli-config",
"dioxus-fullstack",
@ -879,9 +858,9 @@ dependencies = [
[[package]]
name = "dioxus-router-macro"
version = "0.5.1"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67fcb6e4a203dc816bca720c638562d5a782695dc71d6598de088ce50ba2a0f8"
checksum = "2e7cd1c5137ba361f2150cdea6b3bc9ddda7b1af84b22c9ee6b5499bf43e1381"
dependencies = [
"proc-macro2",
"quote",
@ -891,9 +870,9 @@ dependencies = [
[[package]]
name = "dioxus-rsx"
version = "0.5.1"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "faa83056104f63fdc6f7f9fc1137208c7b7648bf88d6c86db1e095f15297a0f3"
checksum = "15c400bc8a779107d8f3a67b14375db07dbd2bc31163bf085a8e9097f36f7179"
dependencies = [
"dioxus-core",
"internment",
@ -922,9 +901,9 @@ dependencies = [
[[package]]
name = "dioxus-signals"
version = "0.5.1"
version = "0.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fd04e2b3739d5c12255005cbf3185446e750fc2b3eeee9fa4e83c989132415c"
checksum = "7e3e224cd3d3713f159f0199fc088c292a0f4adb94996b48120157f6a8f8342d"
dependencies = [
"dioxus-core",
"futures-channel",
@ -938,9 +917,9 @@ dependencies = [
[[package]]
name = "dioxus-ssr"
version = "0.5.1"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30ba8e16b3c7e154a61d814a39505c910403b9df29a113e2920cd23334a4e71c"
checksum = "753b1eb29372bb3afcdbc0ac603893802a8b7b70fa94b86a1641408e2b87173b"
dependencies = [
"askama_escape",
"async-trait",
@ -959,9 +938,9 @@ dependencies = [
[[package]]
name = "dioxus-web"
version = "0.5.1"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a75cfbe115b193a05c649a80a54a90a6bdd88779694a617daf27d287d6fb944f"
checksum = "e0855ac81fcc9252a0863930a7a7cbb2504fc1b6efe893489c8d0e23aaeb2cb9"
dependencies = [
"async-trait",
"console_error_panic_hook",
@ -984,9 +963,9 @@ dependencies = [
[[package]]
name = "dioxus_server_macro"
version = "0.5.1"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b723da95503f739f9fc5fb23b6ad1e456f1438a496a0427210fa94e4e0d5fe9"
checksum = "b5ef2cad17001c1155f019cb69adbacd620644566d78a77d0778807bb106a337"
dependencies = [
"convert_case",
"proc-macro2",
@ -1116,16 +1095,6 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
[[package]]
name = "flate2"
version = "1.0.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4556222738635b7a3417ae6130d8f52201e45a0c4d1a907f0826383adb5f85e7"
dependencies = [
"crc32fast",
"miniz_oxide",
]
[[package]]
name = "fnv"
version = "1.0.7"
@ -1257,9 +1226,9 @@ dependencies = [
[[package]]
name = "generational-box"
version = "0.5.1"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f132919c96b85c02a067ceae965fd50ace57111e2f55c7384b95ac191f4d966b"
checksum = "557cf2cbacd0504c6bf8c29f52f8071e0de1d9783346713dc6121d7fa1e5d0e0"
dependencies = [
"parking_lot",
]
@ -2676,6 +2645,16 @@ dependencies = [
"rustc-hash",
]
[[package]]
name = "slotmap"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a"
dependencies = [
"serde",
"version_check",
]
[[package]]
name = "smallvec"
version = "1.13.2"

View File

@ -1,6 +1,6 @@
[package]
name = "athome"
version = "0.1.0"
version = "0.2.1"
authors = ["Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>"]
edition = "2021"

View File

@ -1,9 +1,9 @@
FROM rust:1.77.2 as dioxus
FROM rust:1.79.0 AS dioxus
RUN cargo install dioxus-cli@^0.5
FROM dioxus as builder
FROM dioxus AS builder
WORKDIR /athome/
RUN apt-get update && apt-get install nodejs npm -y && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install nodejs npm libssl-dev musl-tools -y && rm -rf /var/lib/apt/lists/*
RUN npm install -D tailwindcss
COPY ./src/ ./src/
COPY ./assets/ ./assets/
@ -13,7 +13,7 @@ COPY ./Dioxus.toml ./Dioxus.toml
COPY ./tailwind.config.js ./tailwind.config.js
RUN npx tailwindcss -i ./input.css -o ./assets/tailwind.css && dx build --platform fullstack --release
FROM dioxus as runner
FROM dioxus AS runner
WORKDIR /app/
COPY --from=builder /athome/docs/ ./docs/
CMD [ "./docs/athome" ]

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

41
assets/robots.txt Normal file
View File

@ -0,0 +1,41 @@
User-agent: CCBot
Disallow: /
User-agent: img2dataset
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: anthropic-ai
Disallow: /
User-agent: Claude-Web
Disallow: /
User-agent: Omgilibot
Disallow: /
User-agent: Omgili
Disallow: /
User-agent: FacebookBot
Disallow: /
User-agent: Bytespider
Disallow: /
User-agent: magpie-crawler
Disallow: /
User-Agent: GPTBot
Disallow: /
User-agent: *
Disallow: /*
Allow: /
Allow: /resume
Allow: /publications
Allow: /consulting
Sitemap: https://www.tudattr.dev/sitemap.xml

27
assets/sitemap.xml Normal file
View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.tudattr.dev/</loc>
<lastmod>2024-07-25</lastmod>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://www.tudattr.dev/resume</loc>
<lastmod>2024-07-25</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.tudattr.dev/publications</loc>
<lastmod>2024-07-25</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.tudattr.dev/consulting</loc>
<lastmod>2024-07-25</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>

View File

@ -554,6 +554,40 @@ video {
--tw-contain-style: ;
}
.container {
width: 100%;
}
@media (min-width: 640px) {
.container {
max-width: 640px;
}
}
@media (min-width: 768px) {
.container {
max-width: 768px;
}
}
@media (min-width: 1024px) {
.container {
max-width: 1024px;
}
}
@media (min-width: 1280px) {
.container {
max-width: 1280px;
}
}
@media (min-width: 1536px) {
.container {
max-width: 1536px;
}
}
.static {
position: static;
}
@ -642,10 +676,6 @@ video {
display: flex;
}
.inline-flex {
display: inline-flex;
}
.size-auto {
width: auto;
height: auto;
@ -695,11 +725,6 @@ video {
width: 0.75rem;
}
.w-fit {
width: -moz-fit-content;
width: fit-content;
}
.w-full {
width: 100%;
}
@ -717,8 +742,8 @@ video {
max-width: 2rem;
}
.max-w-screen-xl {
max-width: 1280px;
.max-w-md {
max-width: 28rem;
}
.max-w-sm {
@ -729,6 +754,10 @@ video {
max-width: 36rem;
}
.flex-grow {
flex-grow: 1;
}
.cursor-pointer {
cursor: pointer;
}
@ -745,8 +774,8 @@ video {
align-items: center;
}
.justify-start {
justify-content: flex-start;
.justify-end {
justify-content: flex-end;
}
.justify-center {
@ -767,8 +796,10 @@ video {
margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse)));
}
.overflow-hidden {
overflow: hidden;
.space-y-2 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}
.overflow-x-auto {
@ -925,10 +956,6 @@ video {
background-clip: text;
}
.p-1 {
padding: 0.25rem;
}
.p-3 {
padding: 0.75rem;
}
@ -1049,6 +1076,10 @@ video {
text-transform: uppercase;
}
.italic {
font-style: italic;
}
.leading-none {
line-height: 1;
}
@ -1251,6 +1282,16 @@ video {
margin-top: 0px;
}
.sm\:flex-row {
flex-direction: row;
}
.sm\:space-y-0 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(0px * var(--tw-space-y-reverse));
}
.sm\:text-center {
text-align: center;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -1,9 +1,20 @@
#!/bin/sh
VERSION=0.1.1
TAG=$(git branch | grep "*" | awk '{ print $2 }')
LOCAL_IMAGE="athome"
REGISTRY="mos4"
REMOTE_IMAGE="athome"
DOCKERFILE="./Dockerfile"
docker build -t $LOCAL_IMAGE .
docker tag $LOCAL_IMAGE:latest mos4/$REMOTE_IMAGE:$VERSION
docker push mos4/$REMOTE_IMAGE:$VERSION
echo "DOCKERFILE: $DOCKERFILE"
echo "TAG: $TAG"
echo "LOCAL_IMAGE: $LOCAL_IMAGE"
echo "REGISTRY: $REGISTRY"
echo "REMOTE_IMAGE: $REMOTE_IMAGE"
#docker buildx build --platform linux/amd64,linux/arm64 -f ${DOCKERFILE} -t \
# ${REGISTRY}/${REMOTE_IMAGE}:${TAG} . --push
docker buildx build --platform linux/amd64 -f ${DOCKERFILE} \
-t ${REGISTRY}/${REMOTE_IMAGE}:${TAG} \
-t ${REGISTRY}/${REMOTE_IMAGE}:latest . --push

View File

@ -80,7 +80,7 @@ pub fn Card(prop: CardProp) -> Element {
div {
class: "pb-4",
div {
class: "flex justify-between",
class: "justify-between",
Picture {src: "{prop.picture}"},
}
}
@ -112,11 +112,11 @@ pub fn UnderConstruction() -> Element {
rsx! {
div {
class:"rounded flex justify-between w-full p-4 border-b border-gray-200 bg-gray-50 dark:bg-gray-700 dark:border-gray-600 my-8",
class:"rounded justify-between w-full p-4 border-b border-gray-200 bg-gray-50 dark:bg-gray-700 dark:border-gray-600 my-8",
div {
class:"flex items-center mx-auto",
class:"items-center mx-auto",
p {
class:"flex items-center text-sm font-normal text-gray-500 dark:text-gray-400",
class:"items-center text-sm font-normal text-gray-500 dark:text-gray-400",
span { { translate!(i18, "components.under_construction") } }
}
}

View File

@ -29,7 +29,7 @@ fn Introduction() -> Element {
class: "flex",
img {
class: "rounded-full w-16 h-16 mx-16",
src: "/pictures/portrait.webp"
src: "/pictures/headshot.webp"
}
P { { translate!(i18, "cv.introduction") }}
}

View File

@ -6,34 +6,34 @@ use dioxus_sdk::{i18n::use_i18, translate};
pub fn Home() -> Element {
let i18 = use_i18();
rsx! {
Card {
name: translate!(i18, "home.card.name"),
gender: translate!(i18, "home.card.gender"),
picture: "/pictures/comfy.webp",
div {
class: "py-4",
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",
div {
class: "mb-2",
P { { translate!(i18, "home.card.l1") } },
P { { translate!(i18, "home.card.l2") } },
P { { translate!(i18, "home.card.l3") },
Link {
to: "https://git.tudattr.dev/explore/repos",
new_tab: true,
class: "inline-flex items-center font-medium hover:underline",
"gitea"},
{ translate!(i18, "home.card.l3_1") }
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") },
Link {
to: "https://git.tudattr.dev/explore/repos",
new_tab: true,
class: "items-center font-medium hover:underline",
"gitea"},
{ translate!(i18, "home.card.l3_1") }
},
},
},
},
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",
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") }
}
}
},
},
}
}
}

View File

@ -8,6 +8,7 @@ pub fn Footer() -> Element {
rsx! {
div {
class: "container mx-auto",
// ToolsUsed {},
footer {
class:"bg-white rounded-lg shadow dark:bg-gray-800",

View File

@ -9,21 +9,25 @@ pub fn Header() -> Element {
rsx! {
nav {
div {
class: "flex items-center justify-between p-4 space-x-8",
Link {
to: Route::Home {},
class: "justify-start",
img { src:"/pictures/ClackCat_t.webp", class:"rounded-full h-8", alt:"TuDatTr Logo" },
},
// class: "justify-between p-4 space-x-8",
class: "container mx-auto p-4",
ul {
class:"flex space-x-8",
class:"flex flex-col justify-between sm:flex-row justify-center space-y-2 sm:space-y-0 sm:space-s-4",
li {
Link {
to: Route::Home {},
class: "rounded-md shadow-sm",
img { src:"/pictures/ClackCat_t.webp", class:"rounded-full h-8", alt:"TuDatTr Logo" },
},
},
li { HeaderLink { url: Route::Home {}, text: translate!(i18, "headers.home")} },
li { HeaderLink { url: Route::CV {}, text: translate!(i18, "headers.cv") } },
li { HeaderLink { url: Route::PublicationsProjects {}, text: translate!(i18, "headers.publications_projects") } },
li { HeaderLink { url: Route::Consulting {}, text: translate!(i18, "headers.consulting") } },
li { HeaderLink { url: Route::Impressum {}, text: translate!(i18, "headers.about") } },
li { LanguageButtonGroup {} },
},
LanguageButtonGroup { },
}
}
}
@ -38,7 +42,7 @@ fn LanguageButtonGroup() -> Element {
rsx! {
div {
class: "inline-flex rounded-md shadow-sm",
class: "rounded-md shadow-sm justify-end",
button { class: "px-4 py-2 text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-s-lg hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-blue-500 dark:focus:text-white", onclick: change_to_english, label { { translate!(i18, "headers.language_buttons.english") } } },
button { class: "px-4 py-2 text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-e-lg hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-blue-500 dark:focus:text-white", onclick: change_to_german, label { { translate!(i18, "headers.language_buttons.german") } } }
}

View File

@ -9,16 +9,17 @@ use header::Header;
pub fn Layout() -> Element {
rsx! {
meta {
name: "description",
content: "Explore Tuan-Dat Tran's personal website featuring his CV, publications, projects, and consulting services. Get insights into his professional journey and connect for collaboration opportunities.",
}
div {
class: "flex justify-center ",
div {
class: "max-w-screen-xl flex-col" ,
Header {},
Body {
Outlet::<Route> {},
}
Footer {},
class: "flex flex-col min-h-screen" ,
Header {},
Body {
Outlet::<Route> {},
}
Footer {},
}
}
}

View File

@ -60,10 +60,6 @@ fn App() -> Element {
});
rsx! {
meta {
name: "robots",
content: "noindex",
},
div {
class: "bg-white dark:bg-gray-900 min-h-screen",
Router::<Route> {},
@ -75,7 +71,7 @@ fn App() -> Element {
fn PageNotFound(route: Vec<String>) -> Element {
rsx! {
div {
class: "h-screen flex items-center justify-center",
class: "h-screen items-center justify-center",
img {
class: "size-auto",
src: "https://raw.githubusercontent.com/SAWARATSUKI/ServiceLogos/main/404Notfound/NotFound.png"
@ -92,7 +88,7 @@ pub struct BodyProp {
pub fn Body(prop: BodyProp) -> Element {
rsx! {
div {
class: "my-4 flex justify-center",
class: "flex-grow container mx-auto p-4",
{prop.children}
}
}

View File

@ -60,6 +60,7 @@ fn Publications() -> Element {
}
}
fn Publication(prop: PublicationProp) -> Element {
let pattern = "T.-D. Tran";
rsx! {
Link {
class:"block max-w-sm p-6 bg-white border border-gray-200 rounded-lg shadow hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700",
@ -71,8 +72,11 @@ fn Publication(prop: PublicationProp) -> Element {
},
span { class: "text-lg text-gray-900 dark:text-white", "{prop.conference}" },
p {
class:"font-normal text-gray-700 dark:text-gray-400",
"{prop.authors}",
class:"font-normal text-gray-700 dark:text-gray-400 italic",
Authors {
authors: "{prop.authors}",
pattern: "{pattern}",
},
}
p {
class:"font-normal text-gray-700 dark:text-gray-400",
@ -125,6 +129,8 @@ struct ProjectProp {
}
fn Project(prop: ProjectProp) -> Element {
let pattern = "T.-D. Tran";
rsx! {
Link {
class:"block max-w-sm p-6 bg-white border border-gray-200 rounded-lg shadow hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700",
@ -137,7 +143,10 @@ fn Project(prop: ProjectProp) -> Element {
p { class: "text-lg text-gray-900 dark:text-white", "{prop.kind}" },
p {
class:"font-normal text-gray-700 dark:text-gray-400",
"{prop.authors}",
Authors {
authors: "{prop.authors}",
pattern: "{pattern}",
},
}
p {
class:"font-normal text-gray-700 dark:text-gray-400",
@ -146,3 +155,23 @@ fn Project(prop: ProjectProp) -> Element {
}
}
}
#[derive(Clone, PartialEq, Props)]
struct AuthorProp {
authors: String,
pattern: String,
}
fn Authors(prop: AuthorProp) -> Element {
if let Some(start) = prop.authors.find(&prop.pattern) {
let end = start + prop.pattern.len();
let left = &prop.authors[..start];
let middle = &prop.authors[start..end];
let right = &prop.authors[end..];
rsx! {
"{left}" , b { "{middle}" }, "{right}",
}
} else {
rsx! { "{prop.authors}" }
}
}