Compare commits
1 Commits
cicd
...
837e19e111
| Author | SHA1 | Date | |
|---|---|---|---|
| 837e19e111 |
@@ -12,17 +12,7 @@ jobs:
|
|||||||
name: Build
|
name: Build
|
||||||
runs-on: [ubuntu-latest, aya01]
|
runs-on: [ubuntu-latest, aya01]
|
||||||
steps:
|
steps:
|
||||||
- name: Set up QEMU
|
- uses: docker/setup-buildx-action@v3
|
||||||
uses: docker/setup-qemu-action@v3
|
- uses: docker/build-push-action@v5
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
tags: tudattr/athome:latest
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
- name: Build and push
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
push: true
|
|
||||||
tags: user/app:latest
|
|
||||||
|
|||||||
760
Cargo.lock
generated
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "athome"
|
name = "athome"
|
||||||
version = "0.2.2"
|
version = "0.1.0"
|
||||||
authors = ["Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>"]
|
authors = ["Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
@@ -8,6 +8,7 @@ edition = "2021"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { version = "1.0.197", features = ["derive"] }
|
serde = { version = "1.0.197", features = ["derive"] }
|
||||||
|
|
||||||
dioxus = { version = "0.5", features = ["fullstack", "router"] }
|
dioxus = { version = "0.5", features = ["fullstack", "router"] }
|
||||||
|
|
||||||
# Debug
|
# Debug
|
||||||
|
|||||||
11
Dockerfile
@@ -1,9 +1,9 @@
|
|||||||
FROM rust:1.80.1 AS dioxus
|
FROM rust:1.77.2 as dioxus
|
||||||
RUN cargo install dioxus-cli@^0.5
|
RUN cargo install dioxus-cli@^0.5
|
||||||
|
|
||||||
FROM dioxus AS builder
|
FROM dioxus as builder
|
||||||
WORKDIR /athome/
|
WORKDIR /athome/
|
||||||
RUN apt-get update && apt-get install nodejs npm libssl-dev musl-tools -y && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get install nodejs npm -y && rm -rf /var/lib/apt/lists/*
|
||||||
RUN npm install -D tailwindcss
|
RUN npm install -D tailwindcss
|
||||||
COPY ./src/ ./src/
|
COPY ./src/ ./src/
|
||||||
COPY ./assets/ ./assets/
|
COPY ./assets/ ./assets/
|
||||||
@@ -11,10 +11,9 @@ COPY ./Cargo.toml ./Cargo.toml
|
|||||||
COPY ./input.css ./input.css
|
COPY ./input.css ./input.css
|
||||||
COPY ./Dioxus.toml ./Dioxus.toml
|
COPY ./Dioxus.toml ./Dioxus.toml
|
||||||
COPY ./tailwind.config.js ./tailwind.config.js
|
COPY ./tailwind.config.js ./tailwind.config.js
|
||||||
RUN npx tailwindcss -i ./input.css -o ./assets/tailwind.css
|
RUN npx tailwindcss -i ./input.css -o ./assets/tailwind.css && dx build --platform fullstack --release
|
||||||
RUN dx build --platform fullstack --release
|
|
||||||
|
|
||||||
FROM dioxus AS runner
|
FROM dioxus as runner
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
COPY --from=builder /athome/docs/ ./docs/
|
COPY --from=builder /athome/docs/ ./docs/
|
||||||
CMD [ "./docs/athome" ]
|
CMD [ "./docs/athome" ]
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 742 B |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 130 KiB |
BIN
assets/pictures/comfy.webp
Normal file
|
After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 190 KiB |
BIN
assets/pictures/portrait.webp
Normal file
|
After Width: | Height: | Size: 75 KiB |
@@ -1,41 +0,0 @@
|
|||||||
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: /impressum
|
|
||||||
Allow: /
|
|
||||||
Allow: /resume
|
|
||||||
Allow: /publications
|
|
||||||
Allow: /consulting
|
|
||||||
Sitemap: https://www.tudattr.dev/sitemap.xml
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
<?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>
|
|
||||||
@@ -554,40 +554,6 @@ video {
|
|||||||
--tw-contain-style: ;
|
--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 {
|
.static {
|
||||||
position: static;
|
position: static;
|
||||||
}
|
}
|
||||||
@@ -676,6 +642,10 @@ video {
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inline-flex {
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
|
||||||
.size-auto {
|
.size-auto {
|
||||||
width: auto;
|
width: auto;
|
||||||
height: auto;
|
height: auto;
|
||||||
@@ -725,6 +695,11 @@ video {
|
|||||||
width: 0.75rem;
|
width: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w-fit {
|
||||||
|
width: -moz-fit-content;
|
||||||
|
width: fit-content;
|
||||||
|
}
|
||||||
|
|
||||||
.w-full {
|
.w-full {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
@@ -742,8 +717,8 @@ video {
|
|||||||
max-width: 2rem;
|
max-width: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.max-w-md {
|
.max-w-screen-xl {
|
||||||
max-width: 28rem;
|
max-width: 1280px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.max-w-sm {
|
.max-w-sm {
|
||||||
@@ -754,10 +729,6 @@ video {
|
|||||||
max-width: 36rem;
|
max-width: 36rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-grow {
|
|
||||||
flex-grow: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cursor-pointer {
|
.cursor-pointer {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
@@ -774,8 +745,8 @@ video {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.justify-end {
|
.justify-start {
|
||||||
justify-content: flex-end;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.justify-center {
|
.justify-center {
|
||||||
@@ -796,10 +767,8 @@ video {
|
|||||||
margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse)));
|
margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse)));
|
||||||
}
|
}
|
||||||
|
|
||||||
.space-y-2 > :not([hidden]) ~ :not([hidden]) {
|
.overflow-hidden {
|
||||||
--tw-space-y-reverse: 0;
|
overflow: hidden;
|
||||||
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 {
|
.overflow-x-auto {
|
||||||
@@ -956,6 +925,10 @@ video {
|
|||||||
background-clip: text;
|
background-clip: text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.p-1 {
|
||||||
|
padding: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
.p-3 {
|
.p-3 {
|
||||||
padding: 0.75rem;
|
padding: 0.75rem;
|
||||||
}
|
}
|
||||||
@@ -1076,10 +1049,6 @@ video {
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
.italic {
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leading-none {
|
.leading-none {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
@@ -1282,16 +1251,6 @@ video {
|
|||||||
margin-top: 0px;
|
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 {
|
.sm\:text-center {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 14 KiB |
@@ -1,20 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
TAG=$(git branch | grep "*" | awk '{ print $2 }')
|
VERSION=0.1.0
|
||||||
LOCAL_IMAGE="athome"
|
LOCAL_IMAGE="athome"
|
||||||
REGISTRY="mos4"
|
|
||||||
REMOTE_IMAGE="athome"
|
REMOTE_IMAGE="athome"
|
||||||
DOCKERFILE="./Dockerfile"
|
|
||||||
|
|
||||||
echo "DOCKERFILE: $DOCKERFILE"
|
docker build -t $LOCAL_IMAGE .
|
||||||
echo "TAG: $TAG"
|
docker tag $LOCAL_IMAGE:latest mos4/$REMOTE_IMAGE:$VERSION
|
||||||
echo "LOCAL_IMAGE: $LOCAL_IMAGE"
|
docker push mos4/$REMOTE_IMAGE:$VERSION
|
||||||
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
|
|
||||||
|
|||||||
@@ -21,19 +21,6 @@ pub fn P(props: PProps) -> Element {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[component]
|
|
||||||
pub fn Title(props: PProps) -> Element {
|
|
||||||
rsx! {
|
|
||||||
div {
|
|
||||||
class: "{props.class}",
|
|
||||||
h1 {
|
|
||||||
class: "mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white",
|
|
||||||
{props.children}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn H1(props: PProps) -> Element {
|
pub fn H1(props: PProps) -> Element {
|
||||||
rsx! {
|
rsx! {
|
||||||
@@ -93,11 +80,11 @@ pub fn Card(prop: CardProp) -> Element {
|
|||||||
div {
|
div {
|
||||||
class: "pb-4",
|
class: "pb-4",
|
||||||
div {
|
div {
|
||||||
class: "justify-between",
|
class: "flex justify-between",
|
||||||
Picture {src: "{prop.picture}"},
|
Picture {src: "{prop.picture}"},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Title { "{prop.name}", span { class: "text-grey-600 dark:text-grey-500 text-lg", " {prop.gender}" } },
|
H5 { "{prop.name}", span { class: "text-grey-600 dark:text-grey-500 text-lg", " {prop.gender}" } },
|
||||||
{ prop.children }
|
{ prop.children }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -125,11 +112,11 @@ pub fn UnderConstruction() -> Element {
|
|||||||
|
|
||||||
rsx! {
|
rsx! {
|
||||||
div {
|
div {
|
||||||
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",
|
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",
|
||||||
div {
|
div {
|
||||||
class:"items-center mx-auto",
|
class:"flex items-center mx-auto",
|
||||||
p {
|
p {
|
||||||
class:"items-center text-sm font-normal text-gray-500 dark:text-gray-400",
|
class:"flex items-center text-sm font-normal text-gray-500 dark:text-gray-400",
|
||||||
span { { translate!(i18, "components.under_construction") } }
|
span { { translate!(i18, "components.under_construction") } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
src/cv.rs
@@ -29,7 +29,7 @@ fn Introduction() -> Element {
|
|||||||
class: "flex",
|
class: "flex",
|
||||||
img {
|
img {
|
||||||
class: "rounded-full w-16 h-16 mx-16",
|
class: "rounded-full w-16 h-16 mx-16",
|
||||||
src: "/pictures/headshot.webp"
|
src: "/pictures/portrait.webp"
|
||||||
}
|
}
|
||||||
P { { translate!(i18, "cv.introduction") }}
|
P { { translate!(i18, "cv.introduction") }}
|
||||||
}
|
}
|
||||||
@@ -49,19 +49,19 @@ fn WorkExperience() -> Element {
|
|||||||
technologies: vec!["Rust".to_string(), "Python".to_string(), "P4".to_string(), "Linux".to_string(), "Docker".to_string(), "Kubernetes".to_string()],
|
technologies: vec!["Rust".to_string(), "Python".to_string(), "P4".to_string(), "Linux".to_string(), "Docker".to_string(), "Kubernetes".to_string()],
|
||||||
description: translate!(i18, "cv.workexperience.ra_ude.description")
|
description: translate!(i18, "cv.workexperience.ra_ude.description")
|
||||||
},
|
},
|
||||||
CVEntry {time: translate!(i18, "cv.workexperience.mentoring_ude.time"), title: translate!(i18, "cv.workexperience.mentoring_ude.title"),
|
CVEntry {time: translate!(i18, "cv.workexperience.ra_ude.time"), title: translate!(i18, "cv.workexperience.mentoring_ude.title"),
|
||||||
technologies: vec!["Powerpoint".to_string()],
|
technologies: vec!["Powerpoint".to_string()],
|
||||||
description: translate!(i18, "cv.workexperience.mentoring_ude.description")
|
description: translate!(i18, "cv.workexperience.mentoring_ude.description")
|
||||||
},
|
},
|
||||||
CVEntry {time: translate!(i18, "cv.workexperience.se2_gefeba.time"), title: translate!(i18, "cv.workexperience.se2_gefeba.title"),
|
CVEntry {time: translate!(i18, "cv.workexperience.ra_ude.time"), title: translate!(i18, "cv.workexperience.se2_gefeba.title"),
|
||||||
technologies: vec!["C#".to_string(), "Angular".to_string(), "bootstrap".to_string(), "Entity Framework".to_string()],
|
technologies: vec!["C#".to_string(), "Angular".to_string(), "bootstrap".to_string(), "Entity Framework".to_string()],
|
||||||
description: translate!(i18, "cv.workexperience.se2_gefeba.description")
|
description: translate!(i18, "cv.workexperience.se2_gefeba.description")
|
||||||
},
|
},
|
||||||
CVEntry {time: translate!(i18, "cv.workexperience.student_fse.time"), title: translate!(i18, "cv.workexperience.student_fse.title"),
|
CVEntry {time: translate!(i18, "cv.workexperience.ra_ude.time"), title: translate!(i18, "cv.workexperience.student_fse.title"),
|
||||||
technologies: vec!["Linux".to_string(), "Networking".to_string(), "LaTeX".to_string()],
|
technologies: vec!["Linux".to_string(), "Networking".to_string(), "LaTeX".to_string()],
|
||||||
description: translate!(i18, "cv.workexperience.student_fse.description")
|
description: translate!(i18, "cv.workexperience.student_fse.description")
|
||||||
},
|
},
|
||||||
CVEntry {time: translate!(i18, "cv.workexperience.se1_gefeba.time"), title: translate!(i18, "cv.workexperience.se1_gefeba.title"),
|
CVEntry {time: translate!(i18, "cv.workexperience.ra_ude.time"), title: translate!(i18, "cv.workexperience.se1_gefeba.title"),
|
||||||
technologies: vec!["C#".to_string(), "HTML".to_string(), "Javascript".to_string(), "CSS".to_string()],
|
technologies: vec!["C#".to_string(), "HTML".to_string(), "Javascript".to_string(), "CSS".to_string()],
|
||||||
description: translate!(i18, "cv.workexperience.se1_gefeba.description")
|
description: translate!(i18, "cv.workexperience.se1_gefeba.description")
|
||||||
},
|
},
|
||||||
|
|||||||
48
src/home.rs
@@ -6,34 +6,34 @@ use dioxus_sdk::{i18n::use_i18, translate};
|
|||||||
pub fn Home() -> Element {
|
pub fn Home() -> Element {
|
||||||
let i18 = use_i18();
|
let i18 = use_i18();
|
||||||
rsx! {
|
rsx! {
|
||||||
div {
|
Card {
|
||||||
class: "container mx-auto p-4 flex items-center justify-center max-w-md w-full",
|
name: translate!(i18, "home.card.name"),
|
||||||
Card {
|
gender: translate!(i18, "home.card.gender"),
|
||||||
name: translate!(i18, "home.card.name"),
|
picture: "/pictures/comfy.webp",
|
||||||
gender: translate!(i18, "home.card.gender"),
|
div {
|
||||||
picture: "/pictures/headshot.webp",
|
class: "py-4",
|
||||||
div {
|
div {
|
||||||
class: "py-4",
|
class: "mb-2",
|
||||||
div {
|
P { { translate!(i18, "home.card.l1") } },
|
||||||
class: "mb-2",
|
P { { translate!(i18, "home.card.l2") } },
|
||||||
P { { translate!(i18, "home.card.l1") } },
|
P { { translate!(i18, "home.card.l3") },
|
||||||
P { { translate!(i18, "home.card.l2") } },
|
Link {
|
||||||
P { { translate!(i18, "home.card.l3") },
|
to: "https://git.tudattr.dev/explore/repos",
|
||||||
Link {
|
new_tab: true,
|
||||||
to: "https://git.tudattr.dev/explore/repos",
|
class: "inline-flex items-center font-medium hover:underline",
|
||||||
new_tab: true,
|
"gitea"},
|
||||||
class: "items-center font-medium hover:underline",
|
{ translate!(i18, "home.card.l3_1") }
|
||||||
"gitea"},
|
|
||||||
{ translate!(i18, "home.card.l3_1") }
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Link {
|
},
|
||||||
to: "mailto:tuan-dat.tran@tudattr.dev",
|
Link {
|
||||||
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",
|
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",
|
||||||
{ translate!(i18, "home.card.contact_button") }
|
{ translate!(i18, "home.card.contact_button") }
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ pub fn Footer() -> Element {
|
|||||||
|
|
||||||
rsx! {
|
rsx! {
|
||||||
div {
|
div {
|
||||||
class: "container mx-auto",
|
|
||||||
// ToolsUsed {},
|
// ToolsUsed {},
|
||||||
footer {
|
footer {
|
||||||
class:"bg-white rounded-lg shadow dark:bg-gray-800",
|
class:"bg-white rounded-lg shadow dark:bg-gray-800",
|
||||||
|
|||||||
@@ -9,25 +9,21 @@ pub fn Header() -> Element {
|
|||||||
rsx! {
|
rsx! {
|
||||||
nav {
|
nav {
|
||||||
div {
|
div {
|
||||||
// class: "justify-between p-4 space-x-8",
|
class: "flex items-center justify-between p-4 space-x-8",
|
||||||
class: "container mx-auto p-4",
|
Link {
|
||||||
|
to: Route::Home {},
|
||||||
|
class: "justify-start",
|
||||||
|
img { src:"/pictures/ClackCat_t.webp", class:"rounded-full h-8", alt:"TuDatTr Logo" },
|
||||||
|
},
|
||||||
ul {
|
ul {
|
||||||
class:"flex flex-col justify-between sm:flex-row justify-center space-y-2 sm:space-y-0 sm:space-s-4",
|
class:"flex space-x-8",
|
||||||
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::Home {}, text: translate!(i18, "headers.home")} },
|
||||||
li { HeaderLink { url: Route::CV {}, text: translate!(i18, "headers.cv") } },
|
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::PublicationsProjects {}, text: translate!(i18, "headers.publications_projects") } },
|
||||||
li { HeaderLink { url: Route::Consulting {}, text: translate!(i18, "headers.consulting") } },
|
li { HeaderLink { url: Route::Consulting {}, text: translate!(i18, "headers.consulting") } },
|
||||||
li { HeaderLink { url: Route::Impressum {}, text: translate!(i18, "headers.about") } },
|
li { HeaderLink { url: Route::Impressum {}, text: translate!(i18, "headers.about") } },
|
||||||
li { LanguageButtonGroup {} },
|
|
||||||
},
|
},
|
||||||
|
LanguageButtonGroup { },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -42,7 +38,7 @@ fn LanguageButtonGroup() -> Element {
|
|||||||
|
|
||||||
rsx! {
|
rsx! {
|
||||||
div {
|
div {
|
||||||
class: "rounded-md shadow-sm justify-end",
|
class: "inline-flex rounded-md shadow-sm",
|
||||||
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-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") } } }
|
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") } } }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
|
|
||||||
pub mod footer;
|
mod footer;
|
||||||
pub mod header;
|
mod header;
|
||||||
|
|
||||||
use crate::{Body, Route};
|
use crate::{Body, Route};
|
||||||
use footer::Footer;
|
use footer::Footer;
|
||||||
@@ -10,11 +10,14 @@ use header::Header;
|
|||||||
pub fn Layout() -> Element {
|
pub fn Layout() -> Element {
|
||||||
rsx! {
|
rsx! {
|
||||||
div {
|
div {
|
||||||
class: "flex flex-col min-h-screen",
|
class: "flex justify-center ",
|
||||||
Header {},
|
div {
|
||||||
Body {
|
class: "max-w-screen-xl flex-col" ,
|
||||||
Outlet::<Route> {},
|
Header {},
|
||||||
Footer {},
|
Body {
|
||||||
|
Outlet::<Route> {},
|
||||||
|
}
|
||||||
|
Footer {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
54
src/main.rs
@@ -2,12 +2,9 @@
|
|||||||
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
use components::H1;
|
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
use dioxus_sdk::i18n::*;
|
use dioxus_sdk::i18n::*;
|
||||||
|
|
||||||
use layout::footer::Footer;
|
|
||||||
use layout::header::Header;
|
|
||||||
use tracing::Level;
|
use tracing::Level;
|
||||||
|
|
||||||
pub mod components;
|
pub mod components;
|
||||||
@@ -64,40 +61,9 @@ fn App() -> Element {
|
|||||||
|
|
||||||
rsx! {
|
rsx! {
|
||||||
meta {
|
meta {
|
||||||
name: "description",
|
name: "robots",
|
||||||
content: "Visit Tuan-Dat Tran's website for his CV, publications, projects, and consulting services. Connect for collaboration.",
|
content: "noindex",
|
||||||
},
|
},
|
||||||
script {
|
|
||||||
r#type: "application/ld+json",
|
|
||||||
"
|
|
||||||
{{
|
|
||||||
\"@context\": \"https://schema.org\",
|
|
||||||
\"@type\": \"ProfilePage\",
|
|
||||||
\"mainEntity\": {{
|
|
||||||
\"@type\": \"Person\",
|
|
||||||
\"name\": \"Tuan-Dat Tran\",
|
|
||||||
\"alternateName\": \"TuDatTr\",
|
|
||||||
\"image\": \"https://www.tudattr.dev/pictures/headshot.webp\",
|
|
||||||
}}
|
|
||||||
}}
|
|
||||||
"
|
|
||||||
}
|
|
||||||
// meta {
|
|
||||||
// property: "og:title",
|
|
||||||
// content: "Tuan-Dat Trans Personal Website",
|
|
||||||
// }
|
|
||||||
// meta {
|
|
||||||
// property: "og: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.",
|
|
||||||
// }
|
|
||||||
// meta {
|
|
||||||
// property: "og:image",
|
|
||||||
// content: "https://www.tudattr.dev/pictures/headshot.webp",
|
|
||||||
// }
|
|
||||||
// meta {
|
|
||||||
// property: "og:url",
|
|
||||||
// content: "https://tudattr.dev",
|
|
||||||
// }
|
|
||||||
div {
|
div {
|
||||||
class: "bg-white dark:bg-gray-900 min-h-screen",
|
class: "bg-white dark:bg-gray-900 min-h-screen",
|
||||||
Router::<Route> {},
|
Router::<Route> {},
|
||||||
@@ -109,16 +75,12 @@ fn App() -> Element {
|
|||||||
fn PageNotFound(route: Vec<String>) -> Element {
|
fn PageNotFound(route: Vec<String>) -> Element {
|
||||||
rsx! {
|
rsx! {
|
||||||
div {
|
div {
|
||||||
class: "flex flex-col min-h-screen items",
|
class: "h-screen flex items-center justify-center",
|
||||||
Header {},
|
img {
|
||||||
div {
|
class: "size-auto",
|
||||||
class: "container mx-auto p-4 flex items-center justify-center max-w-md w-full",
|
src: "https://raw.githubusercontent.com/SAWARATSUKI/ServiceLogos/main/404Notfound/NotFound.png"
|
||||||
H1 {
|
|
||||||
"Site not found (404)"
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
Footer {}
|
}
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,7 +92,7 @@ pub struct BodyProp {
|
|||||||
pub fn Body(prop: BodyProp) -> Element {
|
pub fn Body(prop: BodyProp) -> Element {
|
||||||
rsx! {
|
rsx! {
|
||||||
div {
|
div {
|
||||||
class: "flex-grow container mx-auto p-4",
|
class: "my-4 flex justify-center",
|
||||||
{prop.children}
|
{prop.children}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ fn Publications() -> Element {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
fn Publication(prop: PublicationProp) -> Element {
|
fn Publication(prop: PublicationProp) -> Element {
|
||||||
let pattern = "T.-D. Tran";
|
|
||||||
rsx! {
|
rsx! {
|
||||||
Link {
|
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",
|
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",
|
||||||
@@ -72,11 +71,8 @@ fn Publication(prop: PublicationProp) -> Element {
|
|||||||
},
|
},
|
||||||
span { class: "text-lg text-gray-900 dark:text-white", "{prop.conference}" },
|
span { class: "text-lg text-gray-900 dark:text-white", "{prop.conference}" },
|
||||||
p {
|
p {
|
||||||
class:"font-normal text-gray-700 dark:text-gray-400 italic",
|
class:"font-normal text-gray-700 dark:text-gray-400",
|
||||||
Authors {
|
"{prop.authors}",
|
||||||
authors: "{prop.authors}",
|
|
||||||
pattern: "{pattern}",
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
p {
|
p {
|
||||||
class:"font-normal text-gray-700 dark:text-gray-400",
|
class:"font-normal text-gray-700 dark:text-gray-400",
|
||||||
@@ -129,8 +125,6 @@ struct ProjectProp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn Project(prop: ProjectProp) -> Element {
|
fn Project(prop: ProjectProp) -> Element {
|
||||||
let pattern = "T.-D. Tran";
|
|
||||||
|
|
||||||
rsx! {
|
rsx! {
|
||||||
Link {
|
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",
|
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",
|
||||||
@@ -143,10 +137,7 @@ fn Project(prop: ProjectProp) -> Element {
|
|||||||
p { class: "text-lg text-gray-900 dark:text-white", "{prop.kind}" },
|
p { class: "text-lg text-gray-900 dark:text-white", "{prop.kind}" },
|
||||||
p {
|
p {
|
||||||
class:"font-normal text-gray-700 dark:text-gray-400",
|
class:"font-normal text-gray-700 dark:text-gray-400",
|
||||||
Authors {
|
"{prop.authors}",
|
||||||
authors: "{prop.authors}",
|
|
||||||
pattern: "{pattern}",
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
p {
|
p {
|
||||||
class:"font-normal text-gray-700 dark:text-gray-400",
|
class:"font-normal text-gray-700 dark:text-gray-400",
|
||||||
@@ -155,23 +146,3 @@ 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}" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||