From 146e78cddf223f7fee8b574b5c2bacf879e15157 Mon Sep 17 00:00:00 2001 From: Horoli Date: Fri, 14 Aug 2026 14:16:04 +0900 Subject: [PATCH] feat: refine navigation and account access flow --- .gitignore | 2 +- deploy/nginx.example.conf | 34 ++++++++++---- public/css/app.css | 17 ++++--- public/index.html | 42 +---------------- public/js/app-bar.js | 97 +++++++++++++++++++++++++++++++++++++++ public/js/app.js | 63 ++++++++----------------- public/js/login.js | 7 +++ public/js/recipe.js | 4 +- public/login.html | 10 ++-- public/recipe.html | 12 +---- src/plugins/auth.js | 12 +++-- tests/app.test.js | 63 +++++++++++++++++++++++-- 12 files changed, 239 insertions(+), 124 deletions(-) create mode 100644 public/js/app-bar.js create mode 100644 public/js/login.js diff --git a/.gitignore b/.gitignore index b32c1a5..d8fec7c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ node_modules/ data/images/* !data/images/.gitkeep coverage/ -package-lock.json +package-lock.json \ No newline at end of file diff --git a/deploy/nginx.example.conf b/deploy/nginx.example.conf index 950b596..66a6a82 100644 --- a/deploy/nginx.example.conf +++ b/deploy/nginx.example.conf @@ -1,6 +1,8 @@ server { listen 80; - server_name recipe.example.com; + listen [::]:80; + + server_name recipeatlas.horoli.kr; location /.well-known/acme-challenge/ { root /var/www/certbot; @@ -12,25 +14,37 @@ server { } server { - listen 443 ssl http2; - server_name recipe.example.com; + listen 443 ssl; + listen [::]:443 ssl http2; - # 실제 인증서 경로로 교체한다. Let's Encrypt/Caddy를 사용해도 된다. - ssl_certificate /etc/letsencrypt/live/recipe.example.com/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/recipe.example.com/privkey.pem; + server_name recipeatlas.horoli.kr; + + ssl_certificate /etc/letsencrypt/live/horoli.kr/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/horoli.kr/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; add_header X-Content-Type-Options nosniff always; add_header Referrer-Policy strict-origin-when-cross-origin always; - client_max_body_size 2m; + + client_max_body_size 10m; + + access_log /var/log/nginx/recipeatlas.horoli.kr.access.log; + error_log /var/log/nginx/recipeatlas.horoli.kr.error.log; location / { - proxy_pass http://127.0.0.1:3000; + proxy_pass http://192.168.0.250:1771; proxy_http_version 1.1; + proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_read_timeout 120s; + proxy_set_header X-Forwarded-Host $host; + + proxy_redirect off; + proxy_connect_timeout 30s; + proxy_send_timeout 360s; + proxy_read_timeout 360s; } } - diff --git a/public/css/app.css b/public/css/app.css index 151bcd3..5aab985 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -81,6 +81,7 @@ img { display: block; max-width: 100%; } .profile { display: flex; align-items: center; gap: 12px; font-size: 0.86rem; } .avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; } +.profile .avatar[hidden] { display: none; } .menu-button { display: grid; width: 42px; height: 42px; padding: 10px; place-content: center; gap: 4px; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; background: transparent; } .menu-button[hidden] { display: none; } .menu-button span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); } @@ -108,7 +109,7 @@ img { display: block; max-width: 100%; } .button-quiet { min-height: 38px; padding: 7px 14px; border-color: var(--line); background: transparent; } .button-danger { border-color: #a43928; color: #8d3022; background: transparent; } .google-login { width: 100%; gap: 12px; } -.google-login span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: var(--green-dark); background: white; } +.google-login > span[aria-hidden] { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: var(--green-dark); background: white; } .page-shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding-bottom: 100px; } @@ -239,6 +240,9 @@ img { display: block; max-width: 100%; } .login-card .brand-mark { margin: 0 auto 28px; } .login-card h1 { margin: 8px 0 16px; font-family: var(--serif); font-size: 3rem; font-weight: 400; line-height: 1; } .login-copy { margin: 0 0 32px; color: var(--muted); } +.login-alert { margin: -12px 0 20px; padding: 14px 16px; border: 1px solid rgba(164, 57, 40, 0.3); border-radius: 14px; color: #7f2e22; background: #fff3ed; text-align: left; } +.login-alert strong { font-size: 0.9rem; } +.login-alert p { margin: 5px 0 0; font-size: 0.76rem; line-height: 1.5; } .fine-print { margin: 18px 0 0; color: var(--muted); font-size: 0.72rem; } .detail-shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: 50px 0 100px; } @@ -300,11 +304,12 @@ img { display: block; max-width: 100%; } .import-form { flex-direction: column; border-radius: 18px; } .import-form .button { width: 100%; } .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } - .recipe-card { border-radius: 14px; } - .recipe-card-body { padding: 14px; } - .recipe-card-body h3 { display: -webkit-box; overflow: hidden; margin: 10px 0 6px; font-size: 1.15rem; -webkit-box-orient: vertical; -webkit-line-clamp: 3; } - .recipe-card-body > p:not(.recipe-card-match) { display: -webkit-box; overflow: hidden; font-size: 0.75rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; } - .recipe-card-tags { gap: 4px; margin-top: 10px; } + .recipe-card { display: flex; overflow: hidden; flex-direction: column; border-radius: 14px; } + .recipe-card-body { display: flex; height: 228px; flex: 0 0 228px; flex-direction: column; overflow: hidden; padding: 14px; } + .recipe-card-body h3 { display: -webkit-box; overflow: hidden; min-height: 2.58rem; max-height: 2.58rem; margin: 10px 0 6px; font-size: 1.15rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; } + .recipe-card-body > p:not(.recipe-card-match) { display: -webkit-box; overflow: hidden; min-height: 2.18rem; max-height: 2.18rem; font-size: 0.75rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; } + .recipe-card-body .recipe-card-match { display: -webkit-box; overflow: hidden; max-height: 2.5rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; } + .recipe-card-tags { overflow: hidden; max-height: 3.4rem; gap: 4px; margin-top: auto; padding-top: 10px; } .recipe-card-tags .tag { font-size: 0.68rem; } .tag-filter-heading { align-items: flex-start; flex-direction: column; } .tag-filter-heading small { display: block; margin: 2px 0 0; } diff --git a/public/index.html b/public/index.html index 31f276c..36cbbe8 100644 --- a/public/index.html +++ b/public/index.html @@ -8,21 +8,7 @@ - +
@@ -94,32 +80,6 @@
- - -