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}