From 53c7c85caf5d20f477c5de89e64b95f86d248f93 Mon Sep 17 00:00:00 2001 From: king Date: Thu, 8 Oct 2026 11:47:21 +0900 Subject: [PATCH] feat(login): 100px logo, user ids orbit around King Login brand panel logo is 100px wide (height by ratio). Registered user ids (email local part, no full email/real name) float around the King label on random tilted, wobbling elliptical paths; respects prefers-reduced-motion. Co-Authored-By: Claude Opus 5.5 --- app/main.py | 24 +++++++++++++++++++-- app/static/styles.css | 22 ++++++++++++++++--- app/templates/login.html | 46 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 86 insertions(+), 6 deletions(-) diff --git a/app/main.py b/app/main.py index bac8401..e1c776a 100644 --- a/app/main.py +++ b/app/main.py @@ -488,16 +488,36 @@ def build_erp_nav( return items +def _login_orbit_names(limit: int = 40) -> list[str]: + """로그인 화면 왼쪽 패널 — King 주위를 도는 사용자 아이디(이메일 @ 앞, 첫 글자 대문자). 이메일·실명은 내보내지 않는다.""" + names: set[str] = set() + try: + users = user_store.list_all() + except Exception: # noqa: BLE001 — 장식이라 실패해도 로그인 화면은 그대로 + return [] + for u in users: + email = str(u.get("email") or "").lower().strip() + local = email.split("@", 1)[0] + if not local or email == SUPER_ADMIN_EMAIL: + continue + names.add(local[:1].upper() + local[1:]) + return sorted(names)[:limit] + + +def _render_login(request: Request) -> HTMLResponse: + return render_template(request, "login.html", {"orbit_names": _login_orbit_names()}) + + @app.get("/", response_class=HTMLResponse) async def home(request: Request) -> HTMLResponse: sess = get_session_user(request) if not sess: - return render_template(request, "login.html") + return _render_login(request) user_rec = user_store.get(sess["email"]) if user_rec is None: # 도메인은 통과했으나 저장소에 없음 — 세션 정리 후 재로그인 request.session.clear() - return render_template(request, "login.html") + return _render_login(request) # 슈퍼 관리자 → 업무 모듈 선택 화면(main.html). # 일반 사용자 → ERP 메인(좌측 메뉴 + 우측 콘텐츠). diff --git a/app/static/styles.css b/app/static/styles.css index e7de15d..58e3e1c 100644 --- a/app/static/styles.css +++ b/app/static/styles.css @@ -87,8 +87,9 @@ a { color: inherit; text-decoration: none; } .brand-logo-mark svg { color: #fff; } +/* 로그인 왼쪽 위 로고 — 가로 100px, 세로는 비율대로 */ .brand-logo-img { - width: auto; + width: 100px; height: auto; } @@ -705,13 +706,28 @@ a { color: inherit; text-decoration: none; } color: rgba(255, 255, 255, .9); letter-spacing: 4px; text-transform: none; - top: 28%; - right: 7%; + top: 30%; + right: 26%; + z-index: 2; animation: kingFloat 13s ease-in-out infinite, kingSparkle 2.4s ease-in-out infinite; white-space: nowrap; user-select: none; } +/* King 주위를 도는 사용자 아이디 — 위치·크기·투명도는 login.html 스크립트가 매 프레임 정한다 */ +.shape-orbit { + top: 0; + left: 0; + font-size: 15px; + font-weight: 600; + letter-spacing: 1px; + color: rgba(255, 255, 255, .88); + text-shadow: 0 0 8px rgba(99, 179, 237, .55), 0 0 18px rgba(59, 130, 246, .3); + white-space: nowrap; + user-select: none; + will-change: transform, opacity; +} + @keyframes shapeFloat1 { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-22px, 32px); } diff --git a/app/templates/login.html b/app/templates/login.html index f2f1f63..74a4f70 100644 --- a/app/templates/login.html +++ b/app/templates/login.html @@ -19,7 +19,9 @@
-
King
+
King
+ {# 등록 사용자 아이디 — King 주위를 사람마다 다른 무작위 곡선으로 돈다(아래 스크립트) #} + {% for n in orbit_names or [] %}
{{ n }}
{% endfor %} +