From f3ac2abf597b38504c55d0a994919a69c608c2b0 Mon Sep 17 00:00:00 2001 From: dsyoon Date: Sat, 7 Feb 2026 18:07:23 +0900 Subject: [PATCH] Polish quick login buttons and hidden behavior Fix [hidden] being overridden by button styles, render Google/Kakao/Naver quick login as icons, and show logout only when authenticated. Co-authored-by: Cursor --- index.html | 37 ++++++++++++++++++++++++++++++++++--- script.js | 3 ++- styles.css | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index a98f8ca..67a8bb4 100644 --- a/index.html +++ b/index.html @@ -71,9 +71,40 @@ 로그인 필요 - - - + + + diff --git a/script.js b/script.js index 4a05208..927bfda 100644 --- a/script.js +++ b/script.js @@ -448,7 +448,8 @@ // 로그인 기능이 활성(enabled)일 때만 로그인/로그아웃 버튼을 의미 있게 노출 const enabled = auth.mode === "enabled"; el.btnLogin.hidden = enabled ? Boolean(auth.user) : false; - el.btnLogout.hidden = !(enabled && auth.user); + // 로그아웃은 로그인 된 이후에만 노출 + el.btnLogout.hidden = !auth.user; // 설정/SDK 문제 상태에서도 버튼은 "클릭 가능"하게 두고, 클릭 시 토스트로 안내합니다. el.btnLogin.disabled = false; el.btnLogout.disabled = false; diff --git a/styles.css b/styles.css index f594daf..9040c97 100644 --- a/styles.css +++ b/styles.css @@ -35,6 +35,11 @@ html[data-theme="light"] { box-sizing: border-box; } +/* Ensure HTML hidden attribute always works (avoid .btn overriding it) */ +[hidden] { + display: none !important; +} + body { margin: 0; font-family: var(--sans); @@ -138,6 +143,43 @@ html[data-theme="light"] .topbar { justify-content: flex-end; } +.sr-only { + position: absolute !important; + width: 1px !important; + height: 1px !important; + padding: 0 !important; + margin: -1px !important; + overflow: hidden !important; + clip: rect(0, 0, 0, 0) !important; + white-space: nowrap !important; + border: 0 !important; +} + +.btn.icon-only { + width: 40px; + height: 40px; + padding: 0; + justify-content: center; + gap: 0; +} + +.btn.icon-only svg { + width: 18px; + height: 18px; +} + +.btn.provider-google { + border-color: rgba(66, 133, 244, 0.25); +} + +.btn.provider-kakao { + border-color: rgba(250, 225, 0, 0.35); +} + +.btn.provider-naver { + border-color: rgba(3, 199, 90, 0.28); +} + .user { display: inline-flex; align-items: center;