Redesign SNS quick login buttons
Show Naver/Kakao/Google as circular icon buttons with a 'SNS 간편로그인' label, and toggle the group based on configured connections. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
46
index.html
46
index.html
@@ -71,40 +71,18 @@
|
|||||||
<span class="user-dot" aria-hidden="true"></span>
|
<span class="user-dot" aria-hidden="true"></span>
|
||||||
<span class="user-text" id="userText">로그인 필요</span>
|
<span class="user-text" id="userText">로그인 필요</span>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn icon-only provider-google" id="btnGoogle" type="button" hidden aria-label="구글로 로그인">
|
<div class="sns-login" id="snsLogin" hidden>
|
||||||
<span class="sr-only">구글</span>
|
<span class="sns-label">SNS 간편로그인</span>
|
||||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
<button class="sns-btn sns-naver" id="btnNaver" type="button" hidden aria-label="네이버로 로그인">
|
||||||
<path
|
<span class="sns-letter">N</span>
|
||||||
fill="#EA4335"
|
</button>
|
||||||
d="M12 10.2v3.9h5.45c-.24 1.26-1.44 3.7-5.45 3.7-3.28 0-5.96-2.72-5.96-6.1S8.72 5.6 12 5.6c1.87 0 3.12.8 3.84 1.5l2.62-2.52C16.86 3.08 14.7 2 12 2 6.48 2 2 6.48 2 11.7S6.48 21.4 12 21.4c6.92 0 9.6-4.86 9.6-7.38 0-.5-.06-.88-.13-1.26H12z"
|
<button class="sns-btn sns-kakao" id="btnKakao" type="button" hidden aria-label="카카오로 로그인">
|
||||||
/>
|
<span class="sns-kakao-bubble" aria-hidden="true"></span>
|
||||||
<path
|
</button>
|
||||||
fill="#34A853"
|
<button class="sns-btn sns-google" id="btnGoogle" type="button" hidden aria-label="구글로 로그인">
|
||||||
d="M3.15 7.55l3.21 2.36C7.2 7.7 9.38 5.6 12 5.6c1.87 0 3.12.8 3.84 1.5l2.62-2.52C16.86 3.08 14.7 2 12 2 8.16 2 4.84 4.1 3.15 7.55z"
|
<span class="sns-google-g">G</span>
|
||||||
opacity=".0"
|
</button>
|
||||||
/>
|
</div>
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
<button class="btn icon-only provider-kakao" id="btnKakao" type="button" hidden aria-label="카카오로 로그인">
|
|
||||||
<span class="sr-only">카카오</span>
|
|
||||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
||||||
<path
|
|
||||||
fill="#FAE100"
|
|
||||||
d="M12 3C6.76 3 2.5 6.23 2.5 10.22c0 2.58 1.78 4.85 4.45 6.12l-1.01 3.69a.7.7 0 0 0 1.05.77l4.3-2.85c.55.05 1.11.08 1.66.08 5.24 0 9.5-3.23 9.5-7.22C21.5 6.23 17.24 3 12 3z"
|
|
||||||
/>
|
|
||||||
<path
|
|
||||||
fill="#000"
|
|
||||||
d="M12 6.4c-3.7 0-6.7 2.2-6.7 4.9S8.3 16.2 12 16.2s6.7-2.2 6.7-4.9-3-4.9-6.7-4.9z"
|
|
||||||
opacity=".08"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
<button class="btn icon-only provider-naver" id="btnNaver" type="button" hidden aria-label="네이버로 로그인">
|
|
||||||
<span class="sr-only">네이버</span>
|
|
||||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
||||||
<path fill="#03C75A" d="M6 4h5.1l6.9 10.1V4H18v16h-5.1L6 9.9V20H6V4z" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
<button class="btn" id="btnLogin" type="button">로그인</button>
|
<button class="btn" id="btnLogin" type="button">로그인</button>
|
||||||
<button class="btn" id="btnLogout" type="button" hidden>로그아웃</button>
|
<button class="btn" id="btnLogout" type="button" hidden>로그아웃</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
userText: document.getElementById("userText"),
|
userText: document.getElementById("userText"),
|
||||||
btnLogin: document.getElementById("btnLogin"),
|
btnLogin: document.getElementById("btnLogin"),
|
||||||
btnLogout: document.getElementById("btnLogout"),
|
btnLogout: document.getElementById("btnLogout"),
|
||||||
|
snsLogin: document.getElementById("snsLogin"),
|
||||||
btnGoogle: document.getElementById("btnGoogle"),
|
btnGoogle: document.getElementById("btnGoogle"),
|
||||||
btnKakao: document.getElementById("btnKakao"),
|
btnKakao: document.getElementById("btnKakao"),
|
||||||
btnNaver: document.getElementById("btnNaver"),
|
btnNaver: document.getElementById("btnNaver"),
|
||||||
@@ -463,6 +464,7 @@
|
|||||||
if (el.btnGoogle) el.btnGoogle.hidden = !g;
|
if (el.btnGoogle) el.btnGoogle.hidden = !g;
|
||||||
if (el.btnKakao) el.btnKakao.hidden = !k;
|
if (el.btnKakao) el.btnKakao.hidden = !k;
|
||||||
if (el.btnNaver) el.btnNaver.hidden = !n;
|
if (el.btnNaver) el.btnNaver.hidden = !n;
|
||||||
|
if (el.snsLogin) el.snsLogin.hidden = !(g || k || n);
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyManageLock() {
|
function applyManageLock() {
|
||||||
|
|||||||
95
styles.css
95
styles.css
@@ -180,6 +180,101 @@ html[data-theme="light"] .topbar {
|
|||||||
border-color: rgba(3, 199, 90, 0.28);
|
border-color: rgba(3, 199, 90, 0.28);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sns-login {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 8px 10px;
|
||||||
|
border-radius: 14px;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
background: rgba(255, 255, 255, 0.03);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sns-label {
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--muted2);
|
||||||
|
margin-right: 4px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sns-btn {
|
||||||
|
width: 42px;
|
||||||
|
height: 42px;
|
||||||
|
border-radius: 999px;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.08);
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0;
|
||||||
|
user-select: none;
|
||||||
|
transition: transform 120ms ease, filter 120ms ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sns-btn:hover {
|
||||||
|
transform: translateY(-1px);
|
||||||
|
filter: brightness(1.02);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sns-btn:active {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sns-btn:focus-visible {
|
||||||
|
outline: none;
|
||||||
|
box-shadow: var(--focus);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sns-naver {
|
||||||
|
background: #03c75a;
|
||||||
|
border-color: rgba(3, 199, 90, 0.35);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sns-letter {
|
||||||
|
font-weight: 900;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #fff;
|
||||||
|
letter-spacing: -0.02em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sns-kakao {
|
||||||
|
background: #fae100;
|
||||||
|
border-color: rgba(250, 225, 0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sns-kakao-bubble {
|
||||||
|
width: 16px;
|
||||||
|
height: 13px;
|
||||||
|
background: rgba(0, 0, 0, 0.82);
|
||||||
|
border-radius: 6px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sns-kakao-bubble::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
bottom: -4px;
|
||||||
|
left: 4px;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border: 4px solid transparent;
|
||||||
|
border-top-color: rgba(0, 0, 0, 0.82);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sns-google {
|
||||||
|
background: #ffffff;
|
||||||
|
border-color: rgba(66, 133, 244, 0.35);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sns-google-g {
|
||||||
|
font-weight: 900;
|
||||||
|
font-size: 18px;
|
||||||
|
background: conic-gradient(from 210deg, #ea4335 0 25%, #fbbc05 25% 50%, #34a853 50% 75%, #4285f4 75% 100%);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
background-clip: text;
|
||||||
|
color: transparent;
|
||||||
|
letter-spacing: -0.04em;
|
||||||
|
}
|
||||||
|
|
||||||
.user {
|
.user {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user