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 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 11:47:21 +09:00
parent c380b5e411
commit 53c7c85caf
3 changed files with 86 additions and 6 deletions
+45 -1
View File
@@ -19,7 +19,9 @@
<div class="shape shape-4"></div>
<div class="shape shape-5"></div>
<div class="shape shape-6"></div>
<div class="shape shape-king">King</div>
<div class="shape shape-king" id="orbit-king">King</div>
{# 등록 사용자 아이디 — King 주위를 사람마다 다른 무작위 곡선으로 돈다(아래 스크립트) #}
{% for n in orbit_names or [] %}<div class="shape shape-orbit">{{ n }}</div>{% endfor %}
</div>
<div class="brand-logo">
@@ -74,5 +76,47 @@
</main>
</div>
<script>
// King 을 중심으로 사용자 아이디가 돈다 — 사람마다 반지름·속도·방향·기울기·흔들림이 무작위인 타원 곡선.
// King 자체도 CSS(kingFloat)로 떠다니므로 매 프레임 King 의 지금 위치를 중심으로 삼는다. 뒤쪽(위)은 작고 흐리게.
(function () {
var box = document.querySelector(".brand-shapes");
var king = document.getElementById("orbit-king");
var els = Array.prototype.slice.call(document.querySelectorAll(".shape-orbit"));
if (!box || !king || !els.length) return;
var reduce = window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
function rnd(a, b) { return a + Math.random() * (b - a); }
var n = els.length;
var orbs = els.map(function (el, i) {
return {
el: el,
base: (i / n) * Math.PI * 2 + rnd(-0.4, 0.4),
rx: rnd(80, 200), ry: rnd(50, 140),
speed: rnd(0.018, 0.045) * (Math.random() < 0.5 ? -1 : 1), // 초당 바퀴 수
tilt: rnd(-0.6, 0.6),
wa: rnd(10, 30), wf: rnd(0.15, 0.5), wp: rnd(0, 6.28),
wb: rnd(8, 30), wg: rnd(0.12, 0.45), wq: rnd(0, 6.28)
};
});
function place(t) {
var b = box.getBoundingClientRect(), k = king.getBoundingClientRect();
var cx = k.left - b.left + k.width / 2, cy = k.top - b.top + k.height / 2;
orbs.forEach(function (o) {
var a = o.base + t * o.speed * Math.PI * 2;
var x0 = Math.cos(a) * (o.rx + Math.sin(t * o.wf + o.wp) * o.wa);
var y0 = Math.sin(a) * (o.ry + Math.sin(t * o.wg + o.wq) * o.wb);
var x = x0 * Math.cos(o.tilt) - y0 * Math.sin(o.tilt);
var y = x0 * Math.sin(o.tilt) + y0 * Math.cos(o.tilt);
var depth = (Math.sin(a) + 1) / 2; // 0 = 뒤(위), 1 = 앞(아래)
o.el.style.transform = "translate(" + (cx + x).toFixed(1) + "px," + (cy + y).toFixed(1) + "px) translate(-50%,-50%) scale(" + (0.78 + depth * 0.3).toFixed(3) + ")";
o.el.style.opacity = (0.4 + depth * 0.5).toFixed(2);
o.el.style.zIndex = depth > 0.5 ? 3 : 1;
});
}
if (reduce) { place(0); return; }
function frame(ms) { place(ms / 1000); requestAnimationFrame(frame); }
requestAnimationFrame(frame);
})();
</script>
</body>
</html>