Compare commits
8 Commits
8d8b461774
...
0.1.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
414678befd | ||
|
|
7fa831ca13 | ||
|
|
8f8c724f5f | ||
|
|
01c3ceb76d | ||
|
|
5ce21498e5 | ||
| a54d1f3c3b | |||
|
|
081229d66a | ||
| 837e19e111 |
6
.dockerignore
Normal file
6
.dockerignore
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
**/target
|
||||||
|
**/dist
|
||||||
|
LICENSES
|
||||||
|
LICENSE
|
||||||
|
temp
|
||||||
|
README.md
|
||||||
374
Cargo.lock
generated
374
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
48
Dockerfile
48
Dockerfile
@@ -1,21 +1,33 @@
|
|||||||
FROM rust:1.84.0 AS dioxus
|
FROM rust:1 AS chef
|
||||||
RUN cargo install dioxus-cli@^0.6
|
RUN cargo install cargo-chef
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
FROM dioxus AS builder
|
FROM chef AS planner
|
||||||
WORKDIR /athome/
|
COPY . .
|
||||||
RUN apt-get update && apt install libwebkit2gtk-4.1-dev build-essential curl npm \
|
RUN cargo chef prepare --recipe-path recipe.json
|
||||||
wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev -y\
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
FROM chef AS builder
|
||||||
RUN npm install -D tailwindcss
|
COPY --from=planner /app/recipe.json recipe.json
|
||||||
COPY ./Cargo.toml ./Cargo.toml
|
RUN cargo chef cook --release --recipe-path recipe.json
|
||||||
COPY ./Dioxus.toml ./Dioxus.toml
|
COPY . .
|
||||||
COPY ./input.css ./input.css
|
|
||||||
COPY ./tailwind.config.js ./tailwind.config.js
|
# Install `dx`
|
||||||
COPY ./src/ ./src/
|
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||||
COPY ./assets/ ./assets/
|
RUN cargo binstall dioxus-cli --root /.cargo -y --force
|
||||||
|
ENV PATH="/.cargo/bin:$PATH"
|
||||||
|
|
||||||
|
# Create the final bundle folder. Bundle always executes in release mode with optimizations enabled
|
||||||
RUN dx bundle --platform web
|
RUN dx bundle --platform web
|
||||||
|
|
||||||
FROM dioxus AS runner
|
FROM chef AS runtime
|
||||||
WORKDIR /app/
|
COPY --from=builder /app/target/dx/athome/release/web/ /usr/local/app
|
||||||
COPY --from=builder /athome/target/dx/athome/release/web/ ./
|
|
||||||
CMD [ "./server" ]
|
# set our port and make sure to listen for all connections
|
||||||
|
ENV PORT=8080
|
||||||
|
ENV IP=0.0.0.0
|
||||||
|
|
||||||
|
# expose the port 8080
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
WORKDIR /usr/local/app
|
||||||
|
ENTRYPOINT [ "/usr/local/app/server" ]
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 24 KiB |
@@ -1,3 +1,6 @@
|
|||||||
@tailwind base;
|
@tailwind base;
|
||||||
@tailwind components;
|
@tailwind components;
|
||||||
@tailwind utilities;
|
@tailwind utilities;
|
||||||
|
|
||||||
|
@custom-variant dark (&:where(.dark, .dark *));
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ use header::Header;
|
|||||||
pub fn Layout() -> Element {
|
pub fn Layout() -> Element {
|
||||||
rsx! {
|
rsx! {
|
||||||
div {
|
div {
|
||||||
class: "flex flex-col min-h-screen",
|
class: "dark flex flex-col min-h-screen",
|
||||||
Header {},
|
Header {},
|
||||||
Body {
|
Body {
|
||||||
Outlet::<Route> {},
|
Outlet::<Route> {},
|
||||||
|
|||||||
17
src/main.rs
17
src/main.rs
@@ -61,7 +61,6 @@ fn App() -> Element {
|
|||||||
rsx! {
|
rsx! {
|
||||||
document::Link { rel: "stylesheet", href: asset!("./assets/tailwind.css") }
|
document::Link { rel: "stylesheet", href: asset!("./assets/tailwind.css") }
|
||||||
document::Link { rel: "icon", href: asset!("./assets/favicon.ico") }
|
document::Link { rel: "icon", href: asset!("./assets/favicon.ico") }
|
||||||
// <link rel="icon" type="image/x-icon" href="/images/favicon.ico">
|
|
||||||
meta {
|
meta {
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "Visit Tuan-Dat Tran's website for his CV, publications, projects, and consulting services. Connect for collaboration.",
|
content: "Visit Tuan-Dat Tran's website for his CV, publications, projects, and consulting services. Connect for collaboration.",
|
||||||
@@ -81,22 +80,6 @@ fn App() -> Element {
|
|||||||
}}
|
}}
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
// 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> {},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
use dioxus_i18n::t;
|
use dioxus_i18n::t;
|
||||||
|
|
||||||
use crate::components::{Bolding, UnderConstruction, H1, HR};
|
use crate::components::{Bolding, H1, HR};
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn PublicationsProjects() -> Element {
|
pub fn PublicationsProjects() -> Element {
|
||||||
|
|||||||
Reference in New Issue
Block a user