mirror of
https://github.com/headporter81/specialsource-homepage-frontend.git
synced 2026-12-06 07:11:02 +09:00
This commit is contained in:
1 parent
61a5955378
commit
94d2710d5e
2 files changed
+255
-37
No files matched your search
@@ -27,6 +27,8 @@ body, html { margin: 0; padding: 0; width: 100%; height: 100%; background-color:
|
||||
.board-login-btn,
|
||||
.board-load-more,
|
||||
.mode-toggle-btn,
|
||||
.pc-mode-btn,
|
||||
.pc-tongsin-screen,
|
||||
.post-detail-close,
|
||||
.terminal,
|
||||
.terminal span {
|
||||
@@ -121,6 +123,25 @@ body, html { margin: 0; padding: 0; width: 100%; height: 100%; background-color:
|
||||
box-shadow: 0 0 8px var(--tui-glow);
|
||||
}
|
||||
|
||||
.pc-mode-btn {
|
||||
background: none;
|
||||
border: 1px solid var(--tui-border);
|
||||
color: var(--tui-dim);
|
||||
font-size: 11px;
|
||||
padding: 3px 10px;
|
||||
cursor: pointer;
|
||||
letter-spacing: 0.02em;
|
||||
transition: 0.3s;
|
||||
}
|
||||
.pc-mode-btn:hover { color: var(--tui-color); border-color: var(--tui-color); }
|
||||
.pc-mode-btn.active {
|
||||
background: var(--tui-color);
|
||||
color: #000;
|
||||
border-color: var(--tui-color);
|
||||
font-weight: bold;
|
||||
box-shadow: 0 0 8px var(--tui-glow);
|
||||
}
|
||||
|
||||
.server-badge {
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
@@ -313,6 +334,54 @@ iframe { width: 100%; height: 180px; border-radius: 4px; }
|
||||
.board-card:hover .board-card-title { color: var(--tui-color); }
|
||||
.board-card-meta { font-size: 10.5px; color: var(--tui-dim); display: flex; gap: 10px; }
|
||||
|
||||
/* --- PC통신 모드 (하이텔/천리안/나우누리 스타일 넘버 메뉴) --- */
|
||||
.pc-tongsin-screen {
|
||||
--pc-bg: #000033;
|
||||
--pc-fg: #d9d9f5;
|
||||
--pc-accent: #55ffff;
|
||||
--pc-highlight: #ffff55;
|
||||
--pc-dim: #7d7dc4;
|
||||
--pc-border: #ffffff;
|
||||
background: var(--pc-bg);
|
||||
color: var(--pc-fg);
|
||||
border: 3px double var(--pc-border);
|
||||
box-shadow: 0 0 20px rgba(85, 255, 255, 0.25);
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
max-width: 720px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.pc-tongsin-screen::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
pointer-events: none;
|
||||
background: linear-gradient(rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.12) 50%);
|
||||
background-size: 100% 3px;
|
||||
mix-blend-mode: overlay;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.pc-titlebar {
|
||||
display: flex; justify-content: space-between; align-items: center; padding: 8px 16px;
|
||||
border-bottom: 1px solid var(--pc-border); font-size: 12px; font-weight: bold; color: var(--pc-accent);
|
||||
}
|
||||
.pc-body { padding: 18px 20px; font-size: 13.5px; line-height: 1.9; }
|
||||
.pc-screen-title { color: var(--pc-accent); font-weight: bold; margin-bottom: 4px; }
|
||||
.pc-screen-sub { color: var(--pc-dim); font-size: 12px; margin-bottom: 10px; }
|
||||
.pc-rule { border: none; border-top: 1px solid var(--pc-dim); opacity: 0.5; margin: 8px 0 12px; }
|
||||
.pc-menu-row, .pc-post-row { display: flex; gap: 10px; cursor: pointer; padding: 2px 4px; margin: 0 -4px; }
|
||||
.pc-menu-row:hover, .pc-post-row:hover { background: rgba(255, 255, 255, 0.08); }
|
||||
.pc-menu-num { color: var(--pc-highlight); font-weight: bold; width: 1.6em; flex-shrink: 0; text-align: right; }
|
||||
.pc-menu-label { color: var(--pc-fg); }
|
||||
.pc-menu-badge { color: var(--pc-accent); }
|
||||
.pc-post-idx { color: var(--pc-highlight); font-weight: bold; width: 1.8em; flex-shrink: 0; text-align: right; }
|
||||
.pc-post-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.pc-post-meta { color: var(--pc-dim); font-size: 11.5px; flex-shrink: 0; white-space: nowrap; }
|
||||
.pc-footer-hint { color: var(--pc-dim); font-size: 11.5px; }
|
||||
.pc-footer-hint b { color: var(--pc-highlight); }
|
||||
|
||||
/* --- 게시글 상세 (TuiPostDetail.vue) --- */
|
||||
.tui-post-detail {
|
||||
background-color: #000000 !important;
|
||||
@@ -549,6 +618,8 @@ iframe { width: 100%; height: 180px; border-radius: 4px; }
|
||||
.board-rail { flex-direction: row; flex-wrap: wrap; }
|
||||
.tui-post-detail { max-width: 92vw !important; padding: 16px 16px 0 !important; }
|
||||
.post-detail-foot { margin: 18px -16px 0; padding: 12px 16px 16px; }
|
||||
.pc-body { padding: 14px; font-size: 12.5px; }
|
||||
.pc-post-meta { display: none; }
|
||||
|
||||
/* 2. 네비게이션바 줄바꿈 허용 (화면 밖으로 넘어가지 않게 방어) */
|
||||
.auth-nav {
|
||||
|
||||
+184
-37
@@ -21,6 +21,14 @@
|
||||
<option value="white">VT220 (백색)</option>
|
||||
<option value="plasma">GRiD COMPASS (플라즈마)</option>
|
||||
</select>
|
||||
|
||||
<button
|
||||
class="pc-mode-btn"
|
||||
:class="{ active: pcTongsinMode }"
|
||||
@click="togglePcTongsinMode"
|
||||
>
|
||||
PC통신 모드
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="nav-menu">
|
||||
@@ -50,46 +58,72 @@
|
||||
<transition name="fade" mode="out-in">
|
||||
|
||||
<div v-if="activeMenu === 'main'" class="sub-page main-page" key="main">
|
||||
<div class="ascii-container" :class="{ 'is-collapsed': logoDone }">
|
||||
<div class="ascii-clip">
|
||||
<transition name="fade">
|
||||
<pre
|
||||
v-if="!isBooting && !logoDone"
|
||||
class="ascii-art"
|
||||
v-html="formattedAscii"
|
||||
@animationend="logoDone = true"
|
||||
></pre>
|
||||
</transition>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="!isBooting" class="dash-grid">
|
||||
<div v-if="isLoggedIn" class="dash-panel">
|
||||
<h4>LIVE SESSION</h4>
|
||||
<div class="dash-stat"><span>LIVE</span><b class="pulse-text">{{ activeNow }}</b></div>
|
||||
<div class="dash-stat"><span>TODAY</span><b>{{ todayUnique }}</b></div>
|
||||
<template v-if="!pcTongsinMode">
|
||||
<div class="ascii-container" :class="{ 'is-collapsed': logoDone }">
|
||||
<div class="ascii-clip">
|
||||
<transition name="fade">
|
||||
<pre
|
||||
v-if="!isBooting && !logoDone"
|
||||
class="ascii-art"
|
||||
v-html="formattedAscii"
|
||||
@animationend="logoDone = true"
|
||||
></pre>
|
||||
</transition>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dash-panel">
|
||||
<h4>SERVER SOURCE</h4>
|
||||
<span :class="['dash-chip', currentServerSource]">[{{ currentServerSourceDisplay }}]</span>
|
||||
</div>
|
||||
<div v-if="!isBooting" class="dash-grid">
|
||||
<div v-if="isLoggedIn" class="dash-panel">
|
||||
<h4>LIVE SESSION</h4>
|
||||
<div class="dash-stat"><span>LIVE</span><b class="pulse-text">{{ activeNow }}</b></div>
|
||||
<div class="dash-stat"><span>TODAY</span><b>{{ todayUnique }}</b></div>
|
||||
</div>
|
||||
|
||||
<div class="dash-panel weather-panel">
|
||||
<h4>SEOUL WEATHER</h4>
|
||||
<div v-if="weather.loading" class="weather-loading">SYNCING...</div>
|
||||
<div v-else-if="weather.error" class="weather-loading">SYNC FAILED</div>
|
||||
<template v-else>
|
||||
<pre class="weather-ascii">{{ weatherIcon }}</pre>
|
||||
<div class="dash-stat"><span>TEMP</span><b>{{ weather.temp }}°C</b></div>
|
||||
<div class="dash-stat"><span>COND</span><b>{{ weatherLabel }}</b></div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="dash-panel">
|
||||
<h4>SERVER SOURCE</h4>
|
||||
<span :class="['dash-chip', currentServerSource]">[{{ currentServerSourceDisplay }}]</span>
|
||||
</div>
|
||||
|
||||
<div class="dash-panel">
|
||||
<h4>SESSION</h4>
|
||||
<div class="dash-stat"><span>USER</span><b>{{ isLoggedIn ? currentUsername : 'anonymous' }}</b></div>
|
||||
<div class="dash-stat"><span>DISPLAY</span><b>{{ activeThemeLabel }}</b></div>
|
||||
<div class="dash-panel weather-panel">
|
||||
<h4>SEOUL WEATHER</h4>
|
||||
<div v-if="weather.loading" class="weather-loading">SYNCING...</div>
|
||||
<div v-else-if="weather.error" class="weather-loading">SYNC FAILED</div>
|
||||
<template v-else>
|
||||
<pre class="weather-ascii">{{ weatherIcon }}</pre>
|
||||
<div class="dash-stat"><span>TEMP</span><b>{{ weather.temp }}°C</b></div>
|
||||
<div class="dash-stat"><span>COND</span><b>{{ weatherLabel }}</b></div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div class="dash-panel">
|
||||
<h4>SESSION</h4>
|
||||
<div class="dash-stat"><span>USER</span><b>{{ isLoggedIn ? currentUsername : 'anonymous' }}</b></div>
|
||||
<div class="dash-stat"><span>DISPLAY</span><b>{{ activeThemeLabel }}</b></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div v-else class="pc-tongsin-screen">
|
||||
<div class="pc-titlebar">
|
||||
<span>SPECIALSOURCE-BBS v3.2</span>
|
||||
<span>{{ isLoggedIn ? `ONLINE · ${currentUsername || 'admin'} 접속중` : 'ONLINE · 비로그인' }}</span>
|
||||
</div>
|
||||
<div class="pc-body">
|
||||
<div class="pc-screen-title">SPECIALSOURCE.SYSTEM 메인 메뉴</div>
|
||||
<div class="pc-screen-sub">하단 터미널에 번호나 메뉴명을 입력하거나, 줄을 클릭하세요.</div>
|
||||
<hr class="pc-rule">
|
||||
<div
|
||||
v-for="(entry, idx) in pcMenuEntries"
|
||||
:key="entry.id"
|
||||
class="pc-menu-row"
|
||||
@click="activatePcMenuEntry(entry)"
|
||||
>
|
||||
<span class="pc-menu-num">{{ idx + 1 }}.</span>
|
||||
<span class="pc-menu-label">{{ entry.name }}</span>
|
||||
<span v-if="entry.id === 'board' && board.loaded" class="pc-menu-badge">(안읽음 {{ board.posts.length }})</span>
|
||||
</div>
|
||||
<hr class="pc-rule">
|
||||
<div class="pc-footer-hint">예) <b>3</b> 또는 <b>board</b> 입력 → 자유게시판 이동</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -132,7 +166,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="board-layout">
|
||||
<div v-if="!pcTongsinMode" class="board-layout">
|
||||
<div class="board-rail">
|
||||
<button
|
||||
class="rail-item"
|
||||
@@ -202,6 +236,39 @@
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else class="pc-tongsin-screen">
|
||||
<div class="pc-titlebar">
|
||||
<span>SPECIALSOURCE-BBS v3.2</span>
|
||||
<span>{{ isLoggedIn ? `ONLINE · ${currentUsername || 'admin'} 접속중` : 'ONLINE · 비로그인' }}</span>
|
||||
</div>
|
||||
<div class="pc-body">
|
||||
<div class="pc-screen-title">[3] {{ boardViewMode === 'viewed' ? '내가 읽은 글' : '자유게시판' }}</div>
|
||||
<div class="pc-screen-sub">글 번호를 입력하면 읽습니다 · 총 {{ board.posts.length }}건</div>
|
||||
<hr class="pc-rule">
|
||||
<div v-if="board.error === 'auth'" class="pc-screen-sub">
|
||||
로그인이 필요합니다. <b class="pc-menu-badge" style="cursor:pointer" @click="changeMenu('login')">LOGIN으로 이동</b>
|
||||
</div>
|
||||
<div v-else-if="board.loading && board.posts.length === 0" class="pc-screen-sub">SYNCING...</div>
|
||||
<div v-else-if="board.posts.length === 0" class="pc-screen-sub">
|
||||
{{ boardViewMode === 'viewed' ? '아직 읽은 게시물이 없습니다.' : '표시할 글이 없습니다.' }}
|
||||
</div>
|
||||
<template v-else>
|
||||
<div
|
||||
v-for="(post, idx) in board.posts"
|
||||
:key="post.id"
|
||||
class="pc-post-row"
|
||||
@click="openPostDetail(post)"
|
||||
>
|
||||
<span class="pc-post-idx">{{ idx + 1 }}</span>
|
||||
<span class="pc-post-title">{{ post.title }}</span>
|
||||
<span class="pc-post-meta">{{ post.sourceLabel }} · 조회 {{ post.views }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<hr class="pc-rule">
|
||||
<div class="pc-footer-hint"><b>번호</b>=글읽기 · <b>M</b>=메인메뉴 · <b>L</b>=목록</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="activeMenu === 'login'" class="sub-page login-page" key="login">
|
||||
@@ -809,6 +876,86 @@ const handleLoginSubmit = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
const pcTongsinMode = ref(false);
|
||||
|
||||
const pcMenuEntries = computed(() => {
|
||||
const authEntry = isLoggedIn.value
|
||||
? { id: '__logout', name: 'LOGOUT' }
|
||||
: { id: 'login', name: 'LOGIN' };
|
||||
return [...menuItems, authEntry];
|
||||
});
|
||||
|
||||
const activatePcMenuEntry = (entry) => {
|
||||
if (entry.id === '__logout') {
|
||||
handleLogout();
|
||||
} else {
|
||||
changeMenu(entry.id);
|
||||
}
|
||||
};
|
||||
|
||||
const pcTongsinCommand = (raw) => {
|
||||
const term = termInstance.value;
|
||||
const input = (raw || '').trim();
|
||||
if (!term || !input) return;
|
||||
const lower = input.toLowerCase();
|
||||
|
||||
if (activeMenu.value === 'board') {
|
||||
if (lower === 'm' || lower === '메인') {
|
||||
changeMenu('main');
|
||||
return;
|
||||
}
|
||||
if (lower === 'l' || lower === '목록') {
|
||||
term.echo('[SYS] 현재 목록입니다.');
|
||||
return;
|
||||
}
|
||||
const idx = Number(input);
|
||||
if (!Number.isNaN(idx) && board.value.posts[idx - 1]) {
|
||||
openPostDetail(board.value.posts[idx - 1]);
|
||||
return;
|
||||
}
|
||||
term.error(`※ 목록에 없는 번호입니다: "${input}"`);
|
||||
return;
|
||||
}
|
||||
|
||||
const numIdx = Number(input);
|
||||
if (!Number.isNaN(numIdx) && pcMenuEntries.value[numIdx - 1]) {
|
||||
activatePcMenuEntry(pcMenuEntries.value[numIdx - 1]);
|
||||
return;
|
||||
}
|
||||
if (lower === 'm' || lower === '메인') {
|
||||
changeMenu('main');
|
||||
return;
|
||||
}
|
||||
const found = pcMenuEntries.value.find(
|
||||
(entry) => entry.id.toLowerCase() === lower || entry.name.toLowerCase() === lower
|
||||
);
|
||||
if (found) {
|
||||
activatePcMenuEntry(found);
|
||||
return;
|
||||
}
|
||||
|
||||
term.error(`※ 알 수 없는 명령입니다: "${input}"`);
|
||||
};
|
||||
|
||||
const togglePcTongsinMode = () => {
|
||||
pcTongsinMode.value = !pcTongsinMode.value;
|
||||
if (!termInstance.value) return;
|
||||
|
||||
if (pcTongsinMode.value) {
|
||||
termInstance.value.push(pcTongsinCommand, { name: 'pctongsin', prompt: '번호/메뉴 > ' });
|
||||
termInstance.value.echo('[SYS] PC통신 모드 진입. 번호나 메뉴명을 입력하세요 (예: 3 또는 board).');
|
||||
} else {
|
||||
termInstance.value.pop();
|
||||
termInstance.value.echo('[SYS] PC통신 모드 종료.');
|
||||
}
|
||||
};
|
||||
|
||||
watch(activeMenu, (id) => {
|
||||
if (!pcTongsinMode.value || !termInstance.value) return;
|
||||
const label = id === 'board' ? '게시판' : '메인';
|
||||
termInstance.value.set_prompt(`${label} > `);
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
if (shouldShowBootLog()) {
|
||||
runBootSequence();
|
||||
|
||||
Reference in new issue
Block a user