feat : BBS 화면을 PC통신(DOS 텍스트 모드) 스타일 전체화면으로 개편
SpecialSource Frontend (React) CD / deploy (push) Successful in 14s

- 상태줄 / 이중선 창 / 명령줄 / 기능키(F1~F5) 레이아웃, PC·모바일 반응형
- 메인에 새 글 창 추가, 게시판을 번호·글쓴이·날짜·조회·제목 표로 변경
- 팔레트 버튼을 F4 색상 순환으로 대체 (PaletteSwitch 삭제)
- 나눔고딕코딩 글꼴 적용

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
headporterandClaude Opus 5.5 committed 2026-11-18 11:21:48 +09:00
1 parent 97321b8bef
commit d0aced1026
10 files changed
+269 -165

No files matched your search

+1 -8
View File
@@ -6,7 +6,7 @@
--ink-4: #8fae93; --ink-4: #8fae93;
--line: #2c3a2c; --line: #2c3a2c;
--panel-soft: rgba(255, 255, 255, 0.03); --panel-soft: rgba(255, 255, 255, 0.03);
--mono: ui-monospace, "D2Coding", "Cascadia Mono", "JetBrains Mono", "SFMono-Regular", Consolas, monospace; --mono: var(--font-bbs), ui-monospace, "D2Coding", "Cascadia Mono", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
color-scheme: dark; color-scheme: dark;
} }
@@ -21,13 +21,6 @@ body {
button, input { font-family: inherit; } button, input { font-family: inherit; }
.page {
padding: clamp(20px, 4vw, 56px) clamp(14px, 4vw, 40px) 80px;
display: flex;
flex-direction: column;
align-items: center;
gap: 32px;
}
@media (prefers-reduced-motion: reduce) { @media (prefers-reduced-motion: reduce) {
* { transition: none !important; } * { transition: none !important; }
+5 -1
View File
@@ -1,7 +1,11 @@
import type { Metadata } from "next"; import type { Metadata } from "next";
import { Nanum_Gothic_Coding } from "next/font/google";
import { PALETTE_KEY } from "@/features/bbs"; import { PALETTE_KEY } from "@/features/bbs";
import "./globals.css"; import "./globals.css";
// 한글 고정폭 글꼴. 한글 파일이 커서 미리 받지(preload) 않고 필요할 때 내려받음
const bbsFont = Nanum_Gothic_Coding({ weight: ["400", "700"], preload: false, variable: "--font-bbs" });
export const metadata: Metadata = { export const metadata: Metadata = {
title: "SPECIALSOURCE-BBS", title: "SPECIALSOURCE-BBS",
description: "PC통신 스타일 TUI — 넘버 메뉴", description: "PC통신 스타일 TUI — 넘버 메뉴",
@@ -10,7 +14,7 @@ export const metadata: Metadata = {
export default function RootLayout({ children }: LayoutProps<"/">) { export default function RootLayout({ children }: LayoutProps<"/">) {
return ( return (
// 아래 스크립트가 hydration 전에 data-palette를 붙이므로 경고 억제 // 아래 스크립트가 hydration 전에 data-palette를 붙이므로 경고 억제
<html lang="ko" suppressHydrationWarning> <html lang="ko" className={bbsFont.variable} suppressHydrationWarning>
<head> <head>
<script <script
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
+1 -5
View File
@@ -1,13 +1,9 @@
import { BbsTerminal } from "@/features/bbs"; import { BbsTerminal } from "@/features/bbs";
import Intro from "./_components/Intro";
import Notes from "./_components/Notes";
export default function Home() { export default function Home() {
return ( return (
<main className="page"> <main>
<Intro />
<BbsTerminal /> <BbsTerminal />
<Notes />
</main> </main>
); );
} }
+66 -16
View File
@@ -6,7 +6,6 @@ import { execute, initialState } from "../lib/command";
import type { Nav, Palette } from "../types"; import type { Nav, Palette } from "../types";
import LoginForm from "./LoginForm"; import LoginForm from "./LoginForm";
import MainMenu from "./MainMenu"; import MainMenu from "./MainMenu";
import PaletteSwitch from "./PaletteSwitch";
import PostDetail from "./PostDetail"; import PostDetail from "./PostDetail";
import PostList from "./PostList"; import PostList from "./PostList";
import styles from "./bbs.module.css"; import styles from "./bbs.module.css";
@@ -17,12 +16,19 @@ const DEFAULT_PALETTE: Palette = "blue";
const subscribe = (onChange: () => void) => { const subscribe = (onChange: () => void) => {
const handler = () => { const handler = () => {
document.documentElement.dataset.palette = readPalette(); // 색은 CSS가 <html> 속성으로 적용 document.documentElement.dataset.palette = readPalette(); // 색은 CSS가 <html> 속성으로 적용
onChange(); // 버튼 활성 표시는 React가 갱신 onChange(); // F4가 다음 색을 고를 수 있게 React state도 갱신
}; };
window.addEventListener("storage", handler); window.addEventListener("storage", handler);
return () => window.removeEventListener("storage", handler); return () => window.removeEventListener("storage", handler);
}; };
// 상태줄 시계: 1초마다 다시 읽음 (서버 렌더링 땐 자리표시 문자열)
const subscribeClock = (onChange: () => void) => {
const t = setInterval(onChange, 1000);
return () => clearInterval(t);
};
const readClock = () => new Date().toTimeString().slice(0, 8);
const readPalette = (): Palette => { const readPalette = (): Palette => {
try { try {
const saved = localStorage.getItem(PALETTE_KEY); const saved = localStorage.getItem(PALETTE_KEY);
@@ -35,6 +41,7 @@ const readPalette = (): Palette => {
export default function BbsTerminal() { export default function BbsTerminal() {
const [state, dispatch] = useReducer(execute, initialState); const [state, dispatch] = useReducer(execute, initialState);
const palette = useSyncExternalStore(subscribe, readPalette, () => DEFAULT_PALETTE); const palette = useSyncExternalStore(subscribe, readPalette, () => DEFAULT_PALETTE);
const clock = useSyncExternalStore(subscribeClock, readClock, () => "--:--:--");
const [input, setInput] = useState(""); const [input, setInput] = useState("");
const inputRef = useRef<HTMLInputElement>(null); const inputRef = useRef<HTMLInputElement>(null);
const mounted = useRef(false); const mounted = useRef(false);
@@ -58,13 +65,28 @@ export default function BbsTerminal() {
return () => removeEventListener("popstate", onPop); return () => removeEventListener("popstate", onPop);
}, []); }, []);
const changePalette = (p: Palette) => { // F4: 블루 → 그린 → 앰버 순서로 돌아가며 변경
const cyclePalette = () => {
const next = PALETTES[(PALETTES.findIndex((p) => p.key === palette) + 1) % PALETTES.length].key;
try { try {
localStorage.setItem(PALETTE_KEY, p); localStorage.setItem(PALETTE_KEY, next);
} catch {} } catch {}
window.dispatchEvent(new StorageEvent("storage")); // 같은 탭은 storage 이벤트가 안 오므로 직접 알림 window.dispatchEvent(new StorageEvent("storage")); // 같은 탭은 storage 이벤트가 안 오므로 직접 알림
}; };
// 하단 기능키 (PC는 키보드 F1~F5도 동작)
const fkeys = [
{ key: "F1", label: "메인", run: () => dispatch({ screen: "main" }) },
{ key: "F2", label: "게시판", run: () => dispatch({ screen: "list", list: "board" }) },
{ key: "F3", label: "이전", run: () => history.back(), disabled: state.screen === "main" },
{ key: "F4", label: "색상", run: cyclePalette },
{
key: "F5",
label: state.user ? "로그아웃" : "로그인",
run: () => dispatch(state.user ? { user: null } : { screen: "login" }),
},
];
// 클릭 = 명령어 대리 입력: 입력창에 채운 뒤 엔터와 같은 경로로 실행 // 클릭 = 명령어 대리 입력: 입력창에 채운 뒤 엔터와 같은 경로로 실행
const submitFromClick = (cmd: string) => { const submitFromClick = (cmd: string) => {
setInput(cmd); setInput(cmd);
@@ -77,28 +99,49 @@ export default function BbsTerminal() {
}; };
return ( return (
<div className={styles.shell}> <div
<PaletteSwitch value={palette} onChange={changePalette} /> className={styles.frame}
onKeyDown={(e) => {
<div className={styles.frame}> const f = fkeys.find((k) => k.key === e.key);
<div className={styles.titlebar}> if (!f || f.disabled) return;
e.preventDefault(); // F5 새로고침 등 브라우저 기본 동작 막기
f.run();
}}
>
<div className={styles.status}>
<span>SPECIALSOURCE-BBS</span> <span>SPECIALSOURCE-BBS</span>
<span>{state.user ? `ONLINE: 7 · ${state.user} 접속중` : "ONLINE: 6 · 비로그인"}</span> {/*<span className={styles.opt}></span>*/}
<span>{state.user ? `${state.user} 접속중` : "손님 (비로그인)"}</span>
<span className={styles.opt}>{clock}</span>
</div> </div>
<div className={styles.screen}> <div className={styles.screen}>
<div className={styles.grid}>
{state.screen === "main" && ( {state.screen === "main" && (
<MainMenu readIds={state.readIds} loggedIn={!!state.user} onSelect={submitFromClick} /> <MainMenu
readIds={state.readIds}
loggedIn={!!state.user}
onSelect={submitFromClick}
onOpenPost={(id) => {
// 메인에서 숫자는 메뉴 번호라서, 게시판으로 옮긴 뒤 글 번호를 실행
dispatch({ screen: "list", list: "board" });
dispatch(String(id));
}}
/>
)} )}
{state.screen === "login" && <LoginForm onSuccess={(user) => dispatch({ screen: "main", user })} />} {state.screen === "login" && <LoginForm onSuccess={(user) => dispatch({ screen: "main", user })} />}
{state.screen === "list" && <PostList kind={state.list} readIds={state.readIds} onSelect={submitFromClick} />} {state.screen === "list" && <PostList kind={state.list} readIds={state.readIds} onSelect={submitFromClick} />}
{state.screen === "post" && state.postId !== null && <PostDetail postId={state.postId} />} {state.screen === "post" && state.postId !== null && <PostDetail postId={state.postId} />}
{state.error && <div className={`${styles.sub} ${styles.error}`}>{state.error}</div>} {state.error && <div className={`${styles.full} ${styles.error}`}>{state.error}</div>}
</div>
</div> </div>
<div className={styles.cmdline}> <div className={styles.cmdline}>
<span className={styles.prompt}>&gt;</span> <label htmlFor="bbs-cmd" className={styles.prompt}>
선택 &gt;
</label>
<input <input
id="bbs-cmd"
ref={inputRef} ref={inputRef}
type="text" type="text"
value={input} value={input}
@@ -108,13 +151,20 @@ export default function BbsTerminal() {
dispatch(input); dispatch(input);
setInput(""); setInput("");
}} }}
placeholder="번호 또는 메뉴명을 입력하세요" placeholder="번호 또는 메뉴명 (M 메인 · L 목록)"
aria-label="BBS 명령어 입력"
autoComplete="off" autoComplete="off"
autoFocus autoFocus
/> />
</div> </div>
</div>
<nav className={styles.fkeys} aria-label="기능키">
{fkeys.map((f) => (
<button key={f.key} type="button" onClick={f.run} disabled={f.disabled}>
<span>{f.key}</span>
{f.label}
</button>
))}
</nav>
</div> </div>
); );
} }
+5 -6
View File
@@ -32,9 +32,9 @@ export default function LoginForm({ onSuccess }: { onSuccess: (user: string) =>
}; };
return ( return (
<> <section className={`${styles.win} ${styles.full}`}>
<div className={styles.title}>[7] 로그인</div> <span className={styles.cap}>═ [7] 로그인 ═</span>
<div className={styles.sub}>아이디와 비밀번호를 입력하세요.</div> <div className={styles.dim}>아이디와 비밀번호를 입력하세요.</div>
<hr className={styles.rule} /> <hr className={styles.rule} />
<form className={styles.loginForm} onSubmit={submit}> <form className={styles.loginForm} onSubmit={submit}>
<label> <label>
@@ -49,11 +49,10 @@ export default function LoginForm({ onSuccess }: { onSuccess: (user: string) =>
{busy ? "접속중..." : "로그인"} {busy ? "접속중..." : "로그인"}
</button> </button>
</form> </form>
{error && <div className={`${styles.sub} ${styles.error}`}>※ {error}</div>} {error && <div className={styles.error}>※ {error}</div>}
<hr className={styles.rule} />
<div className={styles.footer}> <div className={styles.footer}>
<b>M</b>=메인메뉴 <b>M</b>=메인메뉴
</div> </div>
</> </section>
); );
} }
+49 -16
View File
@@ -1,35 +1,68 @@
import { MENU } from "../constants"; import { MENU } from "../constants";
import { POSTS } from "../mocks/posts"; import { POSTS } from "../mocks/posts";
import { PostTable } from "./PostList";
import styles from "./bbs.module.css"; import styles from "./bbs.module.css";
interface Props { interface Props {
readIds: number[]; readIds: number[];
loggedIn: boolean; loggedIn: boolean;
onSelect: (cmd: string) => void; onSelect: (cmd: string) => void;
onOpenPost: (id: number) => void;
} }
export default function MainMenu({ readIds, loggedIn, onSelect }: Props) { // 영문 ASCII만 사용: ╔═╗ 같은 박스 문자는 한글 글꼴에서 폭이 달라져 줄이 어긋남
const unread = POSTS.length - readIds.length; // String.raw: 백슬래시(\)를 이스케이프 문자로 해석하지 않고 그대로 둠
const LOGO = '';
// String.raw` ___ ___ ___ ___ ___ _ _
// / __|| _ \| __| / __||_ _| /_\ | |
// \__ \| _/| _| | (__ | | / _ \ | |__
// |___/|_| |___| \___||___|/_/ \_\|____|
// ___ ___ _ _ ___ ___ ___
// / __| / _ \ | | | || _ \ / __|| __|
// \__ \| (_) || |_| || /| (__ | _|
// |___/ \___/ \___/ |_|_\ \___||___|`;
export default function MainMenu({ readIds, loggedIn, onSelect, onOpenPost }: Props) {
const unread = POSTS.filter((p) => !readIds.includes(p.id));
return ( return (
<> <>
<div className={styles.title}>SPECIALSOURCE.SYSTEM 메인 메뉴</div> <section className={`${styles.win} ${styles.full}`}>
<div className={styles.sub}>번호나 메뉴명을 입력하거나, 줄을 클릭하세요.</div> <span className={styles.cap}>═ 접속을 환영합니다 ═</span>
<hr className={styles.rule} /> <pre className={styles.logo}>{LOGO}</pre>
{MENU.map((m) => ( <div className={styles.dim}>SPECIALSOURCE 전자게시판 · 번호나 메뉴명을 입력하거나 줄을 클릭하세요</div>
<div key={m.num} className={styles.row} onClick={() => onSelect(String(m.num))}> </section>
<section className={styles.win}>
<span className={styles.cap}>═ 메인 메뉴 ═</span>
<ul className={styles.menu}>
{MENU.map((m) => {
const logout = m.key === "login" && loggedIn;
return (
<li key={m.num} onClick={() => onSelect(String(m.num))}>
<span className={styles.num}>{m.num}.</span> <span className={styles.num}>{m.num}.</span>
<span>{m.key === "login" && loggedIn ? "로그아웃" : m.label}</span> <span>{logout ? "로그아웃" : m.label}</span>
<span className={styles.dim}>{m.key === "login" && loggedIn ? "LOGOUT" : m.en}</span> {m.key === "board" && <span className={styles.accent}>[새글 {unread.length}]</span>}
{m.key === "login" && <span className={styles.dim}>(L)</span>} {m.key === "viewed" && <span className={styles.accent}>[{readIds.length}건]</span>}
{m.key === "board" && <span className={styles.accent}>(안읽음 {unread})</span>} <span className={`${styles.dim} ${styles.en}`}>{logout ? "LOGOUT" : m.en}</span>
{m.key === "viewed" && <span className={styles.accent}>({readIds.length}건)</span>} </li>
</div> );
))} })}
<hr className={styles.rule} /> </ul>
</section>
<section className={styles.win}>
<span className={styles.cap}>═ 새 글 ═</span>
{unread.length === 0 ? (
<div className={styles.dim}>새 글을 모두 읽었습니다.</div>
) : (
<PostTable posts={unread.slice(0, 5)} onSelect={onOpenPost} />
)}
<div className={styles.footer}> <div className={styles.footer}>
예) <b>2</b> 또는 <b>board</b> 입력 → 자유게시판 이동 줄을 누르면 바로 읽기 · <b>2</b>=게시판 전체
</div> </div>
</section>
</> </>
); );
} }
@@ -1,26 +0,0 @@
import { PALETTES } from "../constants";
import type { Palette } from "../types";
import styles from "./bbs.module.css";
interface Props {
value: Palette;
onChange: (p: Palette) => void;
}
export default function PaletteSwitch({ value, onChange }: Props) {
return (
<div className={styles.paletteSwitch}>
{PALETTES.map((p) => (
<button
key={p.key}
type="button"
className={`${styles.paletteBtn} ${value === p.key ? styles.active : ""}`}
aria-pressed={value === p.key}
onClick={() => onChange(p.key)}
>
{p.label}
</button>
))}
</div>
);
}
+9 -6
View File
@@ -6,17 +6,20 @@ export default function PostDetail({ postId }: { postId: number }) {
if (!post) return null; if (!post) return null;
return ( return (
<> <section className={`${styles.win} ${styles.full}`}>
<div className={styles.title}>{post.title}</div> <span className={styles.cap}>═ 자유게시판 #{post.id} ═</span>
<div className={styles.sub}> <div className={styles.postHead}>
글쓴이 {post.author} · 조회 {post.views} · {post.date} <span>제목 :</span> {post.title}
</div>
<div className={styles.postHead}>
<span>글쓴이:</span> {post.author} <span>날짜:</span> {post.date} <span>조회:</span> {post.views}
</div> </div>
<hr className={styles.rule} /> <hr className={styles.rule} />
<div className={styles.body}>{post.body}</div> <div className={styles.body}>{post.body}</div>
<hr className={styles.rule} /> <hr className={styles.rule} />
<div className={styles.footer}> <div className={styles.footer}>
<b>L</b>=목록으로 · <b>M</b>=메인메뉴 <b>L</b>=목록 · <b>M</b>=메인
</div> </div>
</> </section>
); );
} }
+39 -19
View File
@@ -1,5 +1,5 @@
import { POSTS } from "../mocks/posts"; import { POSTS } from "../mocks/posts";
import type { ListKind } from "../types"; import type { ListKind, Post } from "../types";
import styles from "./bbs.module.css"; import styles from "./bbs.module.css";
interface Props { interface Props {
@@ -8,31 +8,51 @@ interface Props {
onSelect: (cmd: string) => void; onSelect: (cmd: string) => void;
} }
/** 번호 / 글쓴이 / 날짜 / 조회 / 제목 표 (메인의 "새 글" 창에서도 사용) */
export function PostTable({ posts, dim, onSelect }: { posts: Post[]; dim?: boolean; onSelect: (id: number) => void }) {
return (
<table className={styles.tbl}>
<thead>
<tr>
<th className={styles.idx}>번호</th>
<th className={styles.wide}>글쓴이</th>
<th>날짜</th>
<th className={`${styles.idx} ${styles.wide}`}>조회</th>
<th>제목</th>
</tr>
</thead>
<tbody>
{posts.map((p) => (
<tr key={p.id} onClick={() => onSelect(p.id)}>
<td className={styles.idx}>{p.id}</td>
<td className={styles.wide}>{p.author}</td>
<td>{p.date}</td>
<td className={`${styles.idx} ${styles.wide}`}>{p.views}</td>
<td className={`${styles.title} ${dim ? styles.dim : ""}`}>{p.title}</td>
</tr>
))}
</tbody>
</table>
);
}
export default function PostList({ kind, readIds, onSelect }: Props) { export default function PostList({ kind, readIds, onSelect }: Props) {
const viewed = kind === "viewed"; const viewed = kind === "viewed";
const posts = POSTS.filter((p) => readIds.includes(p.id) === viewed); const posts = POSTS.filter((p) => readIds.includes(p.id) === viewed);
return ( return (
<> <section className={`${styles.win} ${styles.full}`}>
<div className={styles.title}> <span className={styles.cap}>
[{viewed ? 3 : 2}] {viewed ? "내가 읽은 글" : "자유게시판"} ═ [{viewed ? 3 : 2}] {viewed ? "내가 읽은 글" : "자유게시판"} ({posts.length}건) ═
</div>
<div className={styles.sub}>글 번호를 입력하면 읽습니다 · 총 {posts.length}건</div>
<hr className={styles.rule} />
{posts.length === 0 && <div className={styles.sub}>표시할 글이 없습니다.</div>}
{posts.map((p) => (
<div key={p.id} className={`${styles.row} ${styles.postRow}`} onClick={() => onSelect(String(p.id))}>
<span className={styles.postIdx}>{p.id}</span>
<span className={`${styles.postTitle} ${viewed ? styles.dim : ""}`}>{p.title}</span>
<span className={styles.postMeta}>
{p.author} · 조회 {p.views} · {p.date}
</span> </span>
</div> {posts.length === 0 ? (
))} <div className={styles.dim}>표시할 글이 없습니다.</div>
<hr className={styles.rule} /> ) : (
<PostTable posts={posts} dim={viewed} onSelect={(id) => onSelect(String(id))} />
)}
<div className={styles.footer}> <div className={styles.footer}>
<b>번호</b>=글읽기 · <b>M</b>=메인 · <b>L</b>=이 목록 새로고침 <b>번호</b>=글읽기 · <b>M</b>=메인 · <b>L</b>=새로고침
</div> </div>
</> </section>
); );
} }
+94 -62
View File
@@ -1,100 +1,132 @@
/* --- BBS 팔레트 (시대별 PC통신 느낌) --- */ /* PC통신(DOS 텍스트 모드) 화면 — 상태줄 / 본문 / 명령줄 / 기능키 줄이 화면을 꽉 채움 */
/* <html data-palette>는 layout.tsx 인라인 스크립트가 첫 페인트 전에 설정 → 깜빡임 없음 */ /* <html data-palette>는 layout.tsx 인라인 스크립트가 첫 페인트 전에 설정 → 깜빡임 없음 */
.frame, :global(html[data-palette="blue"]) .frame { .frame, :global(html[data-palette="blue"]) .frame {
--bbs-bg: #000033; --bbs-fg: #d9d9f5; --bbs-accent: #55ffff; --bbs-bg: #0000a8; --bbs-fg: #c0c0c0; --bbs-hi: #ffffff; --bbs-accent: #55ffff;
--bbs-highlight: #ffff55; --bbs-dim: #7d7dc4; --bbs-border: #ffffff; --bbs-glow: rgba(85, 255, 255, 0.35); --bbs-highlight: #ffff55; --bbs-dim: #8080d0; --bbs-bar: #00a8a8; --bbs-bar-fg: #000000; --bbs-sel: #a8a8a8;
} }
:global(html[data-palette="green"]) .frame { :global(html[data-palette="green"]) .frame {
--bbs-bg: #000d00; --bbs-fg: #cdf7cd; --bbs-accent: #4dff4d; --bbs-bg: #001400; --bbs-fg: #33ff66; --bbs-hi: #b8ffc8; --bbs-accent: #66ff99;
--bbs-highlight: #ffff55; --bbs-dim: #3f8f3f; --bbs-border: #4dff4d; --bbs-glow: rgba(77, 255, 77, 0.35); --bbs-highlight: #ccff66; --bbs-dim: #1f8f3f; --bbs-bar: #33ff66; --bbs-bar-fg: #000000; --bbs-sel: #1f8f3f;
} }
:global(html[data-palette="amber"]) .frame { :global(html[data-palette="amber"]) .frame {
--bbs-bg: #190f00; --bbs-fg: #ffe3ba; --bbs-accent: #ffb347; --bbs-bg: #140a00; --bbs-fg: #ffb000; --bbs-hi: #ffe0a0; --bbs-accent: #ffcc55;
--bbs-highlight: #ffffff; --bbs-dim: #a06a2c; --bbs-border: #ffb347; --bbs-glow: rgba(255, 179, 71, 0.35); --bbs-highlight: #ffffff; --bbs-dim: #a06a00; --bbs-bar: #ffb000; --bbs-bar-fg: #000000; --bbs-sel: #a06a00;
} }
.shell { width: 100%; max-width: 760px; display: flex; flex-direction: column; align-items: center; }
.paletteSwitch { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.paletteBtn {
background: none; border: 1px solid #333; color: #8fae93; font-size: 11px;
padding: 6px 12px; cursor: pointer; letter-spacing: 0.02em;
}
.paletteBtn:hover, .active { border-color: #eafff0; color: #eafff0; }
.frame { .frame {
width: 100%; background: var(--bbs-bg); color: var(--bbs-fg); height: 100dvh; /* dvh: 모바일 주소창이 나타나거나 사라져도 화면에 딱 맞음 */
border: 3px double var(--bbs-border); display: grid; grid-template-rows: auto 1fr auto auto;
box-shadow: 0 0 24px var(--bbs-glow), 0 20px 60px rgba(0, 0, 0, 0.6); background: var(--bbs-bg); color: var(--bbs-fg);
font-size: clamp(14px, 1.15vw + 4px, 20px); line-height: 1.55;
position: relative; overflow: hidden; position: relative; overflow: hidden;
} }
/* CRT 스캔라인 */ /* CRT 스캔라인 + 가장자리 어둡게 */
.frame::after { .frame::after {
content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
background: linear-gradient(rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.12) 50%); background:
background-size: 100% 3px; mix-blend-mode: overlay; opacity: 0.5; repeating-linear-gradient(rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.18) 2px 3px),
radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.45) 100%);
} }
.frame :focus-visible { outline: 2px solid var(--bbs-accent); outline-offset: 2px; } .frame :focus-visible { outline: 2px solid var(--bbs-highlight); outline-offset: -2px; }
.titlebar { /* 상단 상태줄 (반전색) */
display: flex; justify-content: space-between; align-items: center; gap: 8px; .status {
padding: 8px 16px; border-bottom: 1px solid var(--bbs-border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 2ch;
font-size: 12.5px; font-weight: 700; color: var(--bbs-accent); letter-spacing: 0.03em; padding: 0 16px; background: var(--bbs-bar); color: var(--bbs-bar-fg); font-weight: 700; white-space: nowrap;
} }
.screen { padding: 18px 20px; min-height: 360px; font-size: 13.5px; line-height: 1.9; }
.row { display: flex; gap: 10px; cursor: pointer; padding: 1px 4px; margin: 0 -4px; } /* 본문: 이중선 창들을 배치하는 격자 */
.row:hover { background: rgba(255, 255, 255, 0.08); } .screen { overflow-y: auto; min-height: 0; padding: 1.4em 16px; }
.num { color: var(--bbs-highlight); font-weight: 700; width: 1.4em; flex-shrink: 0; text-align: right; } .grid {
display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.6em 2ch;
max-width: 120ch; margin: 0 auto;
}
.win { border: 4px double var(--bbs-hi); padding: 1.1em 1.5ch 0.8em; position: relative; min-width: 0; }
.full { grid-column: 1 / -1; }
/* 창 제목: 위쪽 테두리 위에 얹기 */
.cap {
position: absolute; top: -0.85em; left: 2ch; padding: 0 1ch;
background: var(--bbs-bg); color: var(--bbs-highlight); font-weight: 700; white-space: nowrap;
}
.logo { margin: 0; font: inherit; font-size: 0.9em; font-weight: 700; line-height: 1.15; color: var(--bbs-accent); overflow: hidden; }
.num { color: var(--bbs-highlight); font-weight: 700; }
.dim { color: var(--bbs-dim); } .dim { color: var(--bbs-dim); }
.accent { color: var(--bbs-accent); } .accent { color: var(--bbs-accent); }
.title { color: var(--bbs-accent); font-weight: 700; margin-bottom: 4px; }
.sub { color: var(--bbs-dim); font-size: 12px; margin-bottom: 10px; }
.error { color: #ff6b6b; } .error { color: #ff6b6b; }
.rule { border: none; border-top: 1px solid var(--bbs-dim); opacity: 0.5; margin: 8px 0 12px; } .rule { border: none; border-top: 1px dashed var(--bbs-dim); margin: 0.6em 0; }
.footer { color: var(--bbs-dim); margin-top: 0.6em; }
.footer b { color: var(--bbs-highlight); }
.postRow { font-size: 13px; } /* 메인 메뉴: 마우스를 올리면 반전 막대 */
.postIdx { color: var(--bbs-highlight); width: 1.6em; flex-shrink: 0; text-align: right; } .menu { list-style: none; margin: 0; padding: 0; }
.postTitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .menu li { display: flex; gap: 1ch; padding: 0 0.5ch; cursor: pointer; }
.postMeta { color: var(--bbs-dim); font-size: 11.5px; flex-shrink: 0; white-space: nowrap; } .menu li .en { margin-left: auto; }
.menu li:hover, .menu li:hover * { background: var(--bbs-sel); color: var(--bbs-bar-fg); }
.body { white-space: pre-wrap; margin-bottom: 14px; } /* 게시판 표 */
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th {
color: var(--bbs-accent); text-align: left; font-weight: 700; white-space: nowrap;
border-bottom: 1px dashed var(--bbs-dim); padding: 0 1ch 0.2em 0;
}
.tbl td { padding: 0 1ch 0 0; white-space: nowrap; }
.tbl .idx { color: var(--bbs-highlight); text-align: right; }
.tbl .title { width: 100%; white-space: normal; color: var(--bbs-hi); }
.tbl .title.dim { color: var(--bbs-dim); }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--bbs-sel); color: var(--bbs-bar-fg); }
.loginForm { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; } /* 글 읽기 */
.loginForm label { display: flex; gap: 10px; align-items: center; } .postHead span { color: var(--bbs-accent); }
.body { white-space: pre-wrap; color: var(--bbs-hi); }
/* 로그인 */
.loginForm { display: flex; flex-direction: column; gap: 0.5em; }
.loginForm label { display: flex; gap: 1ch; align-items: center; }
.loginForm input { .loginForm input {
flex: 1; max-width: 260px; background: none; border: none; border-bottom: 1px solid var(--bbs-dim); flex: 1; max-width: 30ch; background: none; border: none; border-bottom: 1px solid var(--bbs-dim);
color: var(--bbs-fg); font: inherit; outline: none; caret-color: var(--bbs-highlight); color: var(--bbs-hi); font: inherit; outline: none; caret-color: var(--bbs-highlight);
} }
.loginForm input:focus { border-bottom-color: var(--bbs-accent); } .loginForm input:focus { border-bottom-color: var(--bbs-accent); }
.loginForm button { .loginForm button {
align-self: flex-start; background: none; border: 1px solid var(--bbs-accent); color: var(--bbs-accent); align-self: flex-start; background: none; border: 1px solid var(--bbs-accent); color: var(--bbs-accent);
font: inherit; padding: 0 12px; cursor: pointer; font: inherit; padding: 0 1.5ch; cursor: pointer;
} }
.loginForm button:disabled { opacity: 0.5; cursor: wait; } .loginForm button:disabled { opacity: 0.5; cursor: wait; }
.footer { color: var(--bbs-dim); font-size: 11.5px; } /* 명령줄 */
.footer b { color: var(--bbs-highlight); } .cmdline { display: flex; align-items: center; gap: 1ch; padding: 0.3em 16px; border-top: 1px solid var(--bbs-dim); }
.prompt { color: var(--bbs-highlight); font-weight: 700; white-space: nowrap; }
.cmdline {
display: flex; align-items: center; gap: 8px; padding: 10px 16px;
border-top: 1px solid var(--bbs-border); background: rgba(0, 0, 0, 0.25);
}
.prompt { color: var(--bbs-highlight); font-size: 13px; font-weight: 700; flex-shrink: 0; }
.cmdline input { .cmdline input {
flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--bbs-fg); flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--bbs-hi); font: inherit;
font-size: 13.5px; caret-color: var(--bbs-highlight); caret-color: var(--bbs-hi); caret-shape: block; /* 블록 커서 (지원 브라우저만, 나머지는 일반 커서) */
} }
.cmdline input::placeholder { color: var(--bbs-dim); } .cmdline input::placeholder { color: var(--bbs-dim); }
@media (max-width: 560px) { /* 하단 기능키 줄 */
.postMeta { display: none; } .fkeys { display: flex; padding-bottom: env(safe-area-inset-bottom, 0px); }
.screen { padding: 14px; } .fkeys button {
.titlebar { padding: 8px 12px; font-size: 11.5px; } flex: 1; min-width: 0; display: flex; justify-content: center; gap: 0.4ch; padding: 0.15em 0;
background: none; border: none; color: var(--bbs-hi); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap;
} }
/* iOS는 16px 미만 input에 포커스하면 화면을 확대함 */ .fkeys button span { background: var(--bbs-bar); color: var(--bbs-bar-fg); padding: 0 0.4ch; }
.fkeys button:hover span { background: var(--bbs-hi); }
.fkeys button:disabled { opacity: 0.4; cursor: default; }
/* ── 모바일 ── */
@media (max-width: 720px) {
.frame { font-size: 15px; }
.grid { grid-template-columns: minmax(0, 1fr); }
.opt { display: none; }
.logo { font-size: 3.4vw; }
.tbl .wide { display: none; } /* 글쓴이·조회 숨김 */
.tbl .title { max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fkeys button { flex-direction: column; align-items: center; gap: 0; padding: 0.4em 0; font-size: 13px; border-top: 1px solid var(--bbs-dim); }
}
/* 손가락 터치 영역 확보 + iOS는 16px 미만 input에 포커스하면 화면을 확대함 */
@media (pointer: coarse) { @media (pointer: coarse) {
.cmdline input { font-size: 16px; } .menu li { padding: 0.35em 0.5ch; }
.row { padding: 4px; } /* 손가락 터치 영역 확보 */ .tbl td { padding-block: 0.3em; }
.cmdline input, .loginForm input { font-size: 16px; }
} }