Compare commits
3 Commits
cicd
...
a54d1f3c3b
| Author | SHA1 | Date | |
|---|---|---|---|
| a54d1f3c3b | |||
|
|
081229d66a | ||
| 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
|
|
||||||
|
|||||||
629
Cargo.lock
generated
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "athome"
|
name = "athome"
|
||||||
version = "0.2.2"
|
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"
|
||||||
|
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM rust:1.80.1 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
|
||||||
@@ -11,8 +11,7 @@ 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/
|
||||||
|
|||||||
|
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 |
BIN
assets/pictures/headshot.png
Normal file
|
After Width: | Height: | Size: 11 MiB |
|
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 2.2 MiB |
BIN
assets/pictures/portrait.webp
Normal file
|
After Width: | Height: | Size: 75 KiB |
@@ -32,7 +32,7 @@ User-Agent: GPTBot
|
|||||||
Disallow: /
|
Disallow: /
|
||||||
|
|
||||||
User-agent: *
|
User-agent: *
|
||||||
Disallow: /impressum
|
Disallow: /*
|
||||||
Allow: /
|
Allow: /
|
||||||
Allow: /resume
|
Allow: /resume
|
||||||
Allow: /publications
|
Allow: /publications
|
||||||
|
|||||||
@@ -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"}
|
|
||||||
@@ -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! {
|
||||||
@@ -97,7 +84,7 @@ pub fn Card(prop: CardProp) -> Element {
|
|||||||
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 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -9,13 +9,17 @@ 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 {},
|
||||||
Body {
|
Body {
|
||||||
Outlet::<Route> {},
|
Outlet::<Route> {},
|
||||||
Footer {},
|
|
||||||
}
|
}
|
||||||
|
Footer {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
52
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;
|
||||||
@@ -63,41 +60,6 @@ fn App() -> Element {
|
|||||||
});
|
});
|
||||||
|
|
||||||
rsx! {
|
rsx! {
|
||||||
meta {
|
|
||||||
name: "description",
|
|
||||||
content: "Visit Tuan-Dat Tran's website for his CV, publications, projects, and consulting services. Connect for collaboration.",
|
|
||||||
},
|
|
||||||
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 +71,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 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 {}
|
}
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||