4 Commits

Author SHA1 Message Date
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
10 changed files with 97 additions and 53 deletions

2
Cargo.lock generated
View File

@@ -117,7 +117,7 @@ dependencies = [
[[package]] [[package]]
name = "athome" name = "athome"
version = "0.2.0" version = "0.2.1"
dependencies = [ dependencies = [
"dioxus", "dioxus",
"dioxus-free-icons", "dioxus-free-icons",

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "athome" name = "athome"
version = "0.2.0" version = "0.2.1"
authors = ["Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>"] authors = ["Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>"]
edition = "2021" 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 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 -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 RUN npm install -D tailwindcss
COPY ./src/ ./src/ COPY ./src/ ./src/
COPY ./assets/ ./assets/ COPY ./assets/ ./assets/
@@ -13,7 +13,7 @@ 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 && dx build --platform fullstack --release 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/ WORKDIR /app/
COPY --from=builder /athome/docs/ ./docs/ COPY --from=builder /athome/docs/ ./docs/
CMD [ "./docs/athome" ] CMD [ "./docs/athome" ]

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

@@ -676,10 +676,6 @@ video {
display: flex; display: flex;
} }
.inline-flex {
display: inline-flex;
}
.size-auto { .size-auto {
width: auto; width: auto;
height: auto; height: auto;
@@ -729,11 +725,6 @@ video {
width: 0.75rem; width: 0.75rem;
} }
.w-fit {
width: -moz-fit-content;
width: fit-content;
}
.w-full { .w-full {
width: 100%; width: 100%;
} }
@@ -751,6 +742,10 @@ video {
max-width: 2rem; max-width: 2rem;
} }
.max-w-md {
max-width: 28rem;
}
.max-w-sm { .max-w-sm {
max-width: 24rem; max-width: 24rem;
} }
@@ -759,10 +754,6 @@ video {
max-width: 36rem; max-width: 36rem;
} }
.max-w-md {
max-width: 28rem;
}
.flex-grow { .flex-grow {
flex-grow: 1; flex-grow: 1;
} }
@@ -783,10 +774,6 @@ video {
align-items: center; align-items: center;
} }
.justify-start {
justify-content: flex-start;
}
.justify-end { .justify-end {
justify-content: flex-end; justify-content: flex-end;
} }
@@ -815,10 +802,6 @@ video {
margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
} }
.overflow-hidden {
overflow: hidden;
}
.overflow-x-auto { .overflow-x-auto {
overflow-x: auto; overflow-x: auto;
} }
@@ -973,10 +956,6 @@ video {
background-clip: text; background-clip: text;
} }
.p-1 {
padding: 0.25rem;
}
.p-3 { .p-3 {
padding: 0.75rem; padding: 0.75rem;
} }
@@ -1303,10 +1282,6 @@ video {
margin-top: 0px; margin-top: 0px;
} }
.sm\:max-w-sm {
max-width: 24rem;
}
.sm\:flex-row { .sm\:flex-row {
flex-direction: row; flex-direction: row;
} }
@@ -1323,10 +1298,6 @@ video {
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.md\:max-w-md {
max-width: 28rem;
}
.md\:bg-transparent { .md\:bg-transparent {
background-color: transparent; background-color: transparent;
} }
@@ -1353,12 +1324,6 @@ video {
} }
} }
@media (min-width: 1280px) {
.xl\:max-w-screen-xl {
max-width: 1280px;
}
}
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
.dark\:border-gray-600 { .dark\:border-gray-600 {
--tw-border-opacity: 1; --tw-border-opacity: 1;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -1,9 +1,20 @@
#!/bin/sh #!/bin/sh
VERSION=0.1.2 TAG=$(git branch | grep "*" | awk '{ print $2 }')
LOCAL_IMAGE="athome" LOCAL_IMAGE="athome"
REGISTRY="mos4"
REMOTE_IMAGE="athome" REMOTE_IMAGE="athome"
DOCKERFILE="./Dockerfile"
docker build -t $LOCAL_IMAGE . echo "DOCKERFILE: $DOCKERFILE"
docker tag $LOCAL_IMAGE:latest mos4/$REMOTE_IMAGE:$VERSION echo "TAG: $TAG"
docker push mos4/$REMOTE_IMAGE:$VERSION 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

@@ -9,6 +9,10 @@ use header::Header;
pub fn Layout() -> Element { pub fn Layout() -> Element {
rsx! { 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 { div {
class: "flex flex-col min-h-screen" , class: "flex flex-col min-h-screen" ,
Header {}, Header {},

View File

@@ -60,10 +60,6 @@ fn App() -> Element {
}); });
rsx! { rsx! {
meta {
name: "robots",
content: "noindex",
},
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> {},