diff --git a/.omp/RULES.md b/RULES.md
similarity index 100%
rename from .omp/RULES.md
rename to RULES.md
diff --git a/docker-compose.yaml b/docker-compose.yaml
new file mode 100644
index 0000000..94ab6d9
--- /dev/null
+++ b/docker-compose.yaml
@@ -0,0 +1,13 @@
+services:
+ dong-site:
+ image: nginx:alpine
+ container_name: dong-site
+ restart: unless-stopped
+ volumes:
+ - ./dist:/usr/share/nginx/html:ro
+ - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
+ networks:
+ - docker-network
+networks:
+ docker-network:
+ external: true
\ No newline at end of file
diff --git a/nginx.conf b/nginx.conf
new file mode 100644
index 0000000..9b4f24d
--- /dev/null
+++ b/nginx.conf
@@ -0,0 +1,41 @@
+server {
+ listen 80;
+ listen [::]:80;
+
+ server_name _;
+
+ root /usr/share/nginx/html;
+ index index.html;
+
+ # React/Vue/Vite SPA routing
+ location / {
+ try_files $uri $uri/ /index.html;
+ }
+
+ # Do not aggressively cache index.html.
+ # It references the latest hashed JS/CSS files.
+ location = /index.html {
+ try_files $uri =404;
+
+ add_header Cache-Control "no-cache, must-revalidate";
+ }
+
+ # Vite-generated assets normally contain content hashes.
+ # They can safely be cached for a long time.
+ location ~* \.(?:css|js|mjs|map|png|jpg|jpeg|gif|svg|ico|webp|avif|woff|woff2|ttf|otf)$ {
+ try_files $uri =404;
+
+ expires 30d;
+ add_header Cache-Control "public, max-age=2592000, immutable";
+ }
+
+ location = /favicon.ico {
+ access_log off;
+ log_not_found off;
+ }
+
+ location = /robots.txt {
+ access_log off;
+ log_not_found off;
+ }
+}
\ No newline at end of file
diff --git a/public/profile-photo.jpg b/public/profile-photo.jpg
deleted file mode 100644
index 3d8c0ec..0000000
Binary files a/public/profile-photo.jpg and /dev/null differ
diff --git a/public/toast-bar0001-0120.mp4 b/public/toast-bar0001-0120.mp4
deleted file mode 100644
index 99d9088..0000000
Binary files a/public/toast-bar0001-0120.mp4 and /dev/null differ
diff --git a/src/App.css b/src/App.css
index c902a2f..0e86750 100644
--- a/src/App.css
+++ b/src/App.css
@@ -427,7 +427,7 @@
}
.hero-photo {
- width: 100%;
+ width: 80%;
height: 100%;
object-fit: cover;
object-position: center top;
diff --git a/src/components/layout/Layout.tsx b/src/components/layout/Layout.tsx
index 8bfdc98..86b4d09 100644
--- a/src/components/layout/Layout.tsx
+++ b/src/components/layout/Layout.tsx
@@ -1,4 +1,5 @@
import { Navigation } from './Navigation'
+import { BackToTop } from '@/components/ui/BackToTop'
import { Footer } from './Footer'
interface LayoutProps {
@@ -16,6 +17,7 @@ export function Layout({ children }: LayoutProps) {
{children}
+
>
)
}
diff --git a/src/components/ui/BackToTop.tsx b/src/components/ui/BackToTop.tsx
new file mode 100644
index 0000000..1b405a2
--- /dev/null
+++ b/src/components/ui/BackToTop.tsx
@@ -0,0 +1,48 @@
+import { useEffect, useState } from "react"
+import { motion, AnimatePresence } from "motion/react"
+
+const SCROLL_THRESHOLD = 300
+
+export function BackToTop() {
+ const [visible, setVisible] = useState(false)
+
+ useEffect(() => {
+ const handleScroll = () => {
+ setVisible(window.scrollY > SCROLL_THRESHOLD)
+ }
+
+ window.addEventListener("scroll", handleScroll, { passive: true })
+ return () => window.removeEventListener("scroll", handleScroll)
+ }, [])
+
+ const scrollToTop = () => {
+ window.scrollTo({ top: 0, behavior: "smooth" })
+ }
+
+ return (
+
+ {visible && (
+
+
+
+ )}
+
+ )
+}
\ No newline at end of file
diff --git a/vite.config.ts b/vite.config.ts
index be139b4..ee14e3f 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -6,7 +6,7 @@ export default defineConfig({
plugins: [react()],
resolve: {
alias: {
- '@': path.resolve(__dirname, './src'),
+ '@': path.resolve(import.meta.dirname, './src'),
},
},
})