Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ npm run dev # http://localhost:3000
- `src/lib/api.ts` — fetch 래퍼. Bearer 토큰, `credentials: 'include'`(Refresh 쿠키), 401 시 `/api/auth/refresh` 한 번 재시도, `Idempotency-Key` 지원
- `src/lib/types.ts` — 백엔드 DTO 타입
- `src/components/` — Starfield(#330), SplitMenu(#312), Marquee(#394), SideRail(#040), Poster, Cards, Tabs
- 테마: `src/app/globals.css`의 `--ux-*` 토큰. 기본은 **우주(다크)**, 레일의 테마 버튼으로 **새벽(라이트)** 으로 바꿀 수 있다(`data-theme`).
- 테마: `src/app/globals.css`의 `--ux-*` 토큰. **우주(다크)** 하나만 있다.
- 본 화면(`(main)` 레이아웃) 뒤에도 인트로와 같은 별빛(Starfield)이 흐른다. 들어올 때 워프에서 순항으로 감속하고, 스크롤하면 빨라진다. 카드·레일·문구 띠는 별이 비치는 유리판이다.
4 changes: 0 additions & 4 deletions frontend/src/app/(auth)/auth.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
color: #f4f0e8;
animation: fq-pop-in 0.7s var(--ux-spring);
}
:root:not([data-theme="dark"]) .fq-auth-card {
background: rgba(19, 20, 28, 0.55);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}
.fq-auth-card h1 {
margin: 0;
font-size: 28px;
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/app/(main)/pro.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@
.u040 .fq-btn:hover {
transform: translateY(-1px);
}
.u040 .fq-btn.is-grad,
:root:not([data-theme="dark"]) .fq-btn.is-grad {
.u040 .fq-btn.is-grad {
color: var(--ux-page);
}
.u040 .fq-chip {
Expand Down
95 changes: 9 additions & 86 deletions frontend/src/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,81 +1,8 @@
/* ─────────────────────────────────────────────────────────────
FANQ 테마 토큰 — lucianLabs UI 공통 토큰(--ux-*)을 그대로 쓴다.
라이트 기본 → 시스템 다크면 다크 → data-theme 명시값 우선.
테마는 우주(다크) 하나다.
───────────────────────────────────────────────────────────── */
:root {
color-scheme: light;
--ux-page: #ece9f7;
--ux-surface: rgba(255, 255, 255, 0.7);
--ux-surface-2: rgba(255, 255, 255, 0.55);
--ux-surface-3: rgba(106, 87, 242, 0.1);
--fq-deep: rgba(18, 16, 40, 0.86);
--ux-ink: #16151b;
--ux-ink-2: #57535f;
--ux-ink-3: #8e8a97;
--ux-line: rgba(22, 21, 27, 0.09);
--ux-line-2: rgba(22, 21, 27, 0.17);
--ux-accent: #6a57f2;
--ux-accent-2: #2f8fe0;
--ux-accent-soft: rgba(106, 87, 242, 0.12);
--ux-accent-ink: #ffffff;
--ux-mint: #119c72;
--ux-warn: #d6731e;
--ux-danger: #d93a55;
--ux-hot: #ff5a6e;
--ux-glass: rgba(255, 255, 255, 0.58);
--ux-glass-line: rgba(255, 255, 255, 0.85);
--ux-shadow: rgba(40, 30, 80, 0.14);
--ux-shadow-strong: rgba(40, 30, 80, 0.3);
--ux-grad: linear-gradient(120deg, #16151b, #2a2836);
--ux-grad-hot: linear-gradient(120deg, #e5324a, #d42a43);
--ux-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
--ux-spring: cubic-bezier(0.22, 1, 0.36, 1);
--fq-aurora-a: rgba(123, 97, 255, 0.16);
--fq-aurora-b: rgba(61, 139, 255, 0.12);
--fq-aurora-c: rgba(255, 122, 147, 0.12);
--fq-logo: linear-gradient(120deg, #6a57f2, #3d8bff 45%, #1fa889 72%, #d94f86);
--fq-logo-ink: #ffffff;
--fq-glass-btn: rgba(22, 21, 40, 0.05);
--fq-glass-btn-line: rgba(22, 21, 40, 0.16);
--fq-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
color-scheme: dark;
--ux-page: #04050c;
--ux-surface: rgba(18, 20, 40, 0.58);
--ux-surface-2: rgba(255, 255, 255, 0.05);
--ux-surface-3: rgba(255, 255, 255, 0.1);
--fq-deep: rgba(10, 12, 30, 0.6);
--ux-ink: #f4f0e8;
--ux-ink-2: rgba(244, 240, 232, 0.68);
--ux-ink-3: rgba(244, 240, 232, 0.42);
--ux-line: rgba(255, 255, 255, 0.08);
--ux-line-2: rgba(255, 255, 255, 0.16);
--ux-accent: #b7a4ff;
--ux-accent-2: #7db4ff;
--ux-accent-soft: rgba(183, 164, 255, 0.15);
--ux-accent-ink: #0b0c12;
--ux-mint: #7ee8c0;
--ux-warn: #ffb26b;
--ux-danger: #ff7d8c;
--ux-hot: #ff7d8c;
--ux-glass: rgba(255, 255, 255, 0.07);
--ux-glass-line: rgba(255, 255, 255, 0.18);
--ux-shadow: rgba(0, 0, 0, 0.45);
--ux-shadow-strong: rgba(0, 0, 0, 0.72);
--ux-grad: linear-gradient(120deg, #ffffff, #e9e6f2);
--ux-grad-hot: linear-gradient(120deg, #ff5a6e, #f0425a);
--fq-aurora-a: rgba(183, 164, 255, 0.14);
--fq-aurora-b: rgba(125, 180, 255, 0.1);
--fq-aurora-c: rgba(255, 125, 140, 0.08);
--fq-logo: linear-gradient(120deg, #e6dcff, #b7a4ff 30%, #7db4ff 55%, #a5f2d3 78%, #ff9aae);
--fq-logo-ink: #0b0c12;
--fq-glass-btn: rgba(255, 255, 255, 0.08);
--fq-glass-btn-line: rgba(255, 255, 255, 0.2);
}
}
:root[data-theme="dark"] {
color-scheme: dark;
--ux-page: #04050c;
--ux-surface: rgba(18, 20, 40, 0.58);
Expand Down Expand Up @@ -108,6 +35,9 @@
--fq-logo-ink: #0b0c12;
--fq-glass-btn: rgba(255, 255, 255, 0.08);
--fq-glass-btn-line: rgba(255, 255, 255, 0.2);
--ux-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
--ux-spring: cubic-bezier(0.22, 1, 0.36, 1);
--fq-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── 베이스 ─────────────────────────────────────────────── */
Expand Down Expand Up @@ -196,14 +126,6 @@ button {
background: var(--ux-grad);
color: #0b0c12;
}
:root:not([data-theme="dark"]) .fq-btn.is-grad {
color: #fff;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .fq-btn.is-grad {
color: #0b0c12;
}
}
.fq-btn.is-hot {
background: var(--ux-grad-hot);
color: #fff;
Expand Down Expand Up @@ -493,9 +415,10 @@ textarea.fq-input {
-webkit-backdrop-filter: blur(16px) saturate(1.3);
backdrop-filter: blur(16px) saturate(1.3);
}
:root[data-theme="dark"] .fq-card,
:root[data-theme="dark"] .fq-tabs,
:root[data-theme="dark"] .fq-perf,
:root[data-theme="dark"] .fq-kv-box {
/* :root를 두 번 써서 화면별 카드 그림자보다 우선하게 한다 */
:root:root .fq-card,
:root:root .fq-tabs,
:root:root .fq-perf,
:root:root .fq-kv-box {
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 30px 60px -40px rgba(0, 0, 0, 0.9);
}
12 changes: 2 additions & 10 deletions frontend/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,16 @@ export const metadata: Metadata = {
};

export const viewport: Viewport = {
themeColor: [
{ media: "(prefers-color-scheme: light)", color: "#04050C" },
{ media: "(prefers-color-scheme: dark)", color: "#04050C" },
],
themeColor: "#04050C",
};

// 저장된 테마를 첫 페인트 전에 적용해 깜빡임을 막는다
// 기본은 우주(다크) 테마. 사용자가 새벽(라이트)을 고르면 그 값을 쓴다.
const themeBoot = `(function(){var t='dark';try{if(localStorage.getItem('fanq.theme')==='light')t='light'}catch(e){}document.documentElement.setAttribute('data-theme',t)})()`;

// 인트로 연출 설정도 첫 페인트 전에 표시해, 꺼 둔 사람에게 연출이 잠깐 보이지 않게 한다. 키는 src/lib/intro.tsx와 같다
// 인트로 연출 설정을 첫 페인트 전에 표시해, 꺼 둔 사람에게 연출이 잠깐 보이지 않게 한다. 키는 src/lib/intro.tsx와 같다
const introBoot = `(function(){var v='on';try{var s=localStorage.getItem('fanq.intro');if(s==='on'||s==='off')v=s;else if(matchMedia('(prefers-reduced-motion: reduce)').matches)v='off'}catch(e){}document.documentElement.setAttribute('data-intro',v)})()`;

export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="ko" suppressHydrationWarning>
<head>
<script dangerouslySetInnerHTML={{ __html: themeBoot }} />
<script dangerouslySetInnerHTML={{ __html: introBoot }} />
<link
rel="stylesheet"
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/Constellation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import { useEffect, useRef } from "react";
* 마우스 근처의 별만 조금 밝아진다. 스크롤하면 깊이에 따라 다른 속도로 밀려 원근감이 생긴다.
* 내용 뒤에서 조용히 있어야 하므로 초당 30장만 그리고, 탭이 가려지면 멈춘다.
*/
export default function Constellation({ tone = "dark" }: { tone?: "dark" | "light" }) {
export default function Constellation() {
const ref = useRef<HTMLCanvasElement>(null);

useEffect(() => {
const canvas = ref.current!;
const ctx = canvas.getContext("2d")!;
const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
const ink = tone === "light" ? "40,34,90" : "226,222,255";
const ink = "226,222,255";
const dpr = Math.min(2, window.devicePixelRatio || 1);
type Star = { x: number; y: number; z: number; vx: number; vy: number; ph: number };
let stars: Star[] = [];
Expand Down Expand Up @@ -134,7 +134,7 @@ export default function Constellation({ tone = "dark" }: { tone?: "dark" | "ligh
window.removeEventListener("pointermove", onMove);
document.removeEventListener("visibilitychange", onVis);
};
}, [tone]);
}, []);

return <canvas ref={ref} style={{ position: "absolute", inset: 0, width: "100%", height: "100%" }} aria-hidden="true" />;
}
32 changes: 16 additions & 16 deletions frontend/src/components/SideRail.css
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
outline-offset: -2px;
}
.u040-it svg,
.u040-theme svg,
.u040-foot-btn svg,
.u040-out svg {
width: 22px;
height: 22px;
Expand Down Expand Up @@ -249,7 +249,7 @@
flex-direction: column;
gap: 8px;
}
.u040-theme {
.u040-foot-btn {
display: flex;
align-items: center;
gap: 14px;
Expand All @@ -262,17 +262,17 @@
opacity: 0.62;
transition: opacity 0.2s;
}
.u040-theme:hover {
.u040-foot-btn:hover {
opacity: 1;
}
.u040-theme span {
.u040-foot-btn span {
font-size: 13px;
font-weight: 650;
white-space: nowrap;
opacity: 0;
transition: opacity 0.25s;
}
.u040.is-wide .u040-theme span {
.u040.is-wide .u040-foot-btn span {
opacity: 1;
transition-delay: 0.25s;
}
Expand Down Expand Up @@ -464,12 +464,12 @@
}
}

/* 모바일에서는 레일 아래쪽(테마)이 숨으므로 머리말에 테마 버튼을 둔다 */
.u040-head-theme {
/* 모바일에서는 레일 아래쪽이 숨으므로 머리말에 연출 버튼을 둔다 */
.u040-head-btn {
display: none;
}
@media (max-width: 760px) {
.u040-head-theme {
.u040-head-btn {
display: grid;
place-items: center;
width: 40px;
Expand All @@ -480,15 +480,15 @@
box-shadow: 0 0 0 1px var(--ux-line);
color: var(--ux-ink);
}
.u040-head-theme svg {
.u040-head-btn svg {
width: 20px;
height: 20px;
fill: none;
stroke: currentColor;
stroke-width: 1.9;
stroke-linecap: round;
}
.u040-head-theme span {
.u040-head-btn span {
display: none;
}
}
Expand Down Expand Up @@ -555,13 +555,13 @@
}
/* 접힌 상태의 유리 알약 */
.u040-it,
.u040-theme,
.u040-foot-btn,
.u040-logo,
.u040-me {
transition: background 0.3s, box-shadow 0.3s, opacity 0.25s;
}
.u040:not(.is-wide) .u040-it,
.u040:not(.is-wide) .u040-theme,
.u040:not(.is-wide) .u040-foot-btn,
.u040:not(.is-wide) .u040-me {
width: 52px;
margin-left: 2px;
Expand All @@ -577,11 +577,11 @@
.u040:not(.is-wide) .u040-it {
padding-left: 15px;
}
.u040:not(.is-wide) .u040-theme {
.u040:not(.is-wide) .u040-foot-btn {
padding-left: 15px;
}
.u040:not(.is-wide) .u040-it:hover,
.u040:not(.is-wide) .u040-theme:hover {
.u040:not(.is-wide) .u040-foot-btn:hover {
opacity: 1;
background: rgba(255, 255, 255, 0.12);
}
Expand Down Expand Up @@ -666,13 +666,13 @@
padding: 10px 8px;
}
.u040:not(.is-wide) .u040-it,
.u040:not(.is-wide) .u040-theme,
.u040:not(.is-wide) .u040-foot-btn,
.u040:not(.is-wide) .u040-me {
width: 44px;
margin-left: 0;
}
.u040:not(.is-wide) .u040-it,
.u040:not(.is-wide) .u040-theme {
.u040:not(.is-wide) .u040-foot-btn {
height: 44px;
padding-left: 11px;
border-radius: 13px;
Expand Down
11 changes: 3 additions & 8 deletions frontend/src/components/SideRail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ import Link from "next/link";
import { usePathname, useRouter } from "next/navigation";
import { useEffect, useLayoutEffect, useRef, useState } from "react";
import { useAuth } from "@/lib/auth";
import { useTheme } from "@/lib/hooks";
import Constellation from "./Constellation";
import IntroToggle from "./IntroToggle";
import ThemeToggle from "./ThemeToggle";
import NotificationBell from "./NotificationBell";
import "./SideRail.css";

Expand Down Expand Up @@ -72,7 +70,6 @@ export default function SideRail({ children }: { children: React.ReactNode }) {
const router = useRouter();
const { profile, ready, logout } = useAuth();
const [wide, setWide] = useState(false);
const tone = useTheme();
const liRefs = useRef<(HTMLLIElement | null)[]>([]);
const linkRefs = useRef<(HTMLAnchorElement | null)[]>([]);
const [hlY, setHlY] = useState(0);
Expand Down Expand Up @@ -126,7 +123,7 @@ export default function SideRail({ children }: { children: React.ReactNode }) {
<div className={`u040${wide ? " is-wide" : ""}`}>
<div className="u040-sky" aria-hidden="true">
{/* 본 화면 배경: 빛줄기가 날아다니는 별빛 대신 조용한 별자리 */}
<Constellation tone={tone} />
<Constellation />
</div>
<nav ref={railRef} className="u040-rail" aria-label="주 메뉴">
<Link href="/home" className="u040-top" aria-label="FANQ 홈으로" aria-current={pathname === "/home" ? "page" : undefined}>
Expand Down Expand Up @@ -187,8 +184,7 @@ export default function SideRail({ children }: { children: React.ReactNode }) {
))}
</ul>
<div className="u040-foot">
<ThemeToggle className="u040-theme" />
<IntroToggle className="u040-theme" />
<IntroToggle className="u040-foot-btn" />
{profile ? (
<div className="u040-me">
<Link href="/me" className="u040-me-link" aria-label={`${profile.nickname}, 마이페이지`}>
Expand Down Expand Up @@ -232,8 +228,7 @@ export default function SideRail({ children }: { children: React.ReactNode }) {
</div>
<div className="u040-head-r">
<NotificationBell />
<ThemeToggle className="u040-head-theme" />
<IntroToggle className="u040-head-theme" />
<IntroToggle className="u040-head-btn" />
{/* 레일의 로그아웃은 메뉴를 펼쳐야 보이므로, 메인 화면에서는 머리말에도 둔다 */}
{pathname === "/home" && profile ? (
<button type="button" className="u040-head-out" onClick={() => logout()}>
Expand Down
Loading
Loading