bibimbap/.atp/work-session/20260617-110836/artifacts/home-pathB.html

1191 lines
34 KiB
HTML

<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="csrf-token" content="y-MSCvdQMyEZ4ljovuu_sLewMLJQymd0jr2e7eMnZRU">
<script>
(function () {
try {
var k = 'bibimbap-theme';
var t = localStorage.getItem(k);
if (t !== 'light' && t !== 'dark') {
t = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
}
document.documentElement.setAttribute('data-theme', t);
} catch (e) {}
window.BibimbapCsrf = {
token: function () {
var meta = document.querySelector('meta[name="csrf-token"]');
return meta ? meta.getAttribute('content') || '' : '';
},
headers: function (extra) {
var headers = extra || {};
var token = this.token();
if (token) headers['X-CSRF-Token'] = token;
return headers;
}
};
})();
</script>
<title>bibimbap</title>
<style>
html {
color-scheme: light;
--surface: #faf8f5;
--card-bg: #fff;
--text: #1a1a1a;
--text-muted: #5c5c5c;
--accent: #e8a54b;
--border: rgba(0, 0, 0, 0.08);
--card-media-1: #f0ebe3;
--card-media-2: #e5ddd2;
--card-media-3: #dccfb8;
--card-shadow: rgba(0, 0, 0, 0.06);
--search-btn-text: #1a1a1a;
}
html[data-theme="dark"] {
color-scheme: dark;
--surface: #121212;
--card-bg: #1e1e1e;
--text: #ece8e1;
--text-muted: #a39e96;
--border: rgba(255, 255, 255, 0.1);
--card-media-1: #2a2620;
--card-media-2: #1f1c18;
--card-media-3: #3d3528;
--card-shadow: rgba(0, 0, 0, 0.35);
--search-btn-text: #1a1a1a;
}
body {
margin: 0;
min-height: 100vh;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
background: var(--surface);
color: var(--text);
}
.page-main {
max-width: 72rem;
margin: 0 auto;
padding: 1rem max(1rem, env(safe-area-inset-left)) 2.5rem max(1rem, env(safe-area-inset-right));
}
@media (min-width: 640px) {
.page-main {
padding-top: 1.5rem;
}
}
.home-toolbar {
display: flex;
align-items: stretch;
gap: 0.625rem;
margin-bottom: 0.75rem;
}
.home-action-button {
flex-shrink: 0;
min-height: 3rem;
padding: 0 0.875rem 0 0.625rem;
border: 1px solid rgba(232, 165, 75, 0.32);
border-radius: 12px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
background: var(--card-bg);
color: var(--text);
font-size: 0.9375rem;
font-weight: 800;
text-decoration: none;
box-sizing: border-box;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
white-space: nowrap;
-webkit-tap-highlight-color: transparent;
}
.home-action-button:hover {
border-color: rgba(232, 165, 75, 0.62);
box-shadow: 0 6px 16px var(--card-shadow);
}
.home-action-button:active {
transform: scale(0.98);
}
.home-action-button__icon {
width: 1.75rem;
height: 1.75rem;
border-radius: 8px;
display: inline-flex;
align-items: center;
justify-content: center;
background: var(--accent);
color: #1a1a1a;
flex-shrink: 0;
}
.home-action-button__icon svg {
width: 1.125rem;
height: 1.125rem;
}
@media (max-width: 760px) {
.home-toolbar {
flex-direction: column;
}
.home-action-button {
width: 100%;
}
}
/* 검색 */
.search-section {
width: min(100%, 48rem);
margin: 0 auto 1.25rem;
}
.search-form {
flex: 1;
min-width: 0;
display: flex;
gap: 0.5rem;
align-items: stretch;
}
.search-form__field {
flex: 1;
min-width: 0;
}
.search-form__label {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
.search-form__input {
width: 100%;
box-sizing: border-box;
height: 3rem;
padding: 0 1rem 0 2.75rem;
font-size: 1rem;
border: 1px solid var(--border);
border-radius: 12px;
color: var(--text);
background-color: var(--card-bg);
background-repeat: no-repeat;
background-position: 0.875rem 50%;
background-size: 1.125rem;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5'/%3E%3Cpath d='M12 12l5 5'/%3E%3C/svg%3E");
}
html[data-theme="dark"] .search-form__input {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5'/%3E%3Cpath d='M12 12l5 5'/%3E%3C/svg%3E");
}
.search-form__input::placeholder {
color: var(--text-muted);
}
.search-form__input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(232, 165, 75, 0.25);
}
.search-form__submit {
flex-shrink: 0;
min-width: 4.5rem;
height: 3rem;
padding: 0 1rem;
font-size: 0.9375rem;
font-weight: 600;
color: var(--search-btn-text);
background: var(--accent);
border: none;
border-radius: 12px;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.search-form__submit:active {
transform: scale(0.98);
}
.search-history {
margin-top: 0.75rem;
}
.search-history[hidden] {
display: none !important;
}
.search-history__head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
margin-bottom: 0.5rem;
}
.search-history__label {
font-size: 0.75rem;
font-weight: 600;
color: var(--text-muted);
letter-spacing: 0.02em;
}
.search-history__clear {
padding: 0.25rem 0.5rem;
font-size: 0.6875rem;
font-weight: 500;
color: var(--text-muted);
background: transparent;
border: none;
border-radius: 6px;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.search-history__clear:hover {
color: var(--accent);
background: rgba(232, 165, 75, 0.12);
}
.search-history__chips {
display: flex;
flex-wrap: wrap;
gap: 0.375rem;
}
.search-history__chip {
display: inline-flex;
align-items: center;
gap: 0.15rem;
max-width: 100%;
padding: 0.2rem 0.35rem 0.2rem 0.65rem;
font-size: 0.8125rem;
color: var(--text);
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: 999px;
-webkit-tap-highlight-color: transparent;
}
.search-history__chip-text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 12rem;
margin: 0;
padding: 0.15rem 0;
font: inherit;
color: inherit;
text-align: left;
background: none;
border: none;
border-radius: 4px;
cursor: pointer;
}
.search-history__chip-text:hover {
color: var(--accent);
}
.search-history__chip-remove {
flex-shrink: 0;
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.25rem;
height: 1.25rem;
padding: 0;
font-size: 1rem;
line-height: 1;
color: var(--text-muted);
background: transparent;
border: none;
border-radius: 50%;
cursor: pointer;
}
.search-history__chip-remove:hover {
color: var(--text);
background: rgba(0, 0, 0, 0.06);
}
html[data-theme="dark"] .search-history__chip-remove:hover {
background: rgba(255, 255, 255, 0.08);
}
/* 카드 그리드: 모바일 2열 → 태블릿 3열 → 데스크톱 4~5열 */
.card-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.625rem;
}
@media (min-width: 480px) {
.card-grid {
gap: 0.75rem;
}
}
@media (min-width: 640px) {
.card-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 1rem;
}
}
@media (min-width: 900px) {
.card-grid {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}
@media (min-width: 1200px) {
.card-grid {
grid-template-columns: repeat(5, minmax(0, 1fr));
}
}
a.card {
display: flex;
flex-direction: column;
border-radius: 12px;
overflow: hidden;
background: var(--card-bg);
border: 1px solid var(--border);
box-shadow: 0 2px 8px var(--card-shadow);
text-decoration: none;
color: inherit;
cursor: pointer;
transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
a.card:hover {
box-shadow: 0 6px 16px var(--card-shadow);
transform: translateY(-2px);
border-color: rgba(232, 165, 75, 0.35);
}
a.card:focus {
outline: none;
}
a.card:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
/* 가로:세로 = 4:5 (포스터/썸네일에 흔한 비율, 3:5보다 덜 길쭉해 모바일 그리드에 균형 있음) */
.card__media {
position: relative;
width: 100%;
aspect-ratio: 4 / 5;
background: var(--card-media-2);
}
.card__index {
position: absolute;
top: 0.45rem;
left: 0.45rem;
z-index: 2;
padding: 0.25rem 0.5rem;
font-size: 0.6875rem;
font-weight: 800;
letter-spacing: -0.02em;
color: #1a1a1a;
background: rgba(255, 255, 255, 0.93);
border-radius: 6px;
line-height: 1;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
html[data-theme="dark"] .card__index {
background: rgba(30, 30, 30, 0.93);
color: #ece8e1;
}
.card__img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
}
/* 이미지 없음: 로고만 중앙 */
.card__media-empty {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
padding: 14%;
background: linear-gradient(160deg, var(--card-media-1) 0%, var(--card-media-2) 45%, var(--card-media-3) 100%);
}
.card__logo-fallback {
width: min(52%, 7.5rem);
height: auto;
max-height: 42%;
object-fit: contain;
opacity: 0.88;
filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
}
html[data-theme="dark"] .card__logo-fallback {
opacity: 0.92;
filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}
.card__body {
padding: 0.5rem 0.625rem 0.625rem;
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
gap: 0.2rem;
}
.card__game-name {
margin: 0;
font-size: 0.8125rem;
font-weight: 600;
line-height: 1.35;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
color: var(--text);
}
.card__creator {
margin: 0;
font-size: 0.6875rem;
color: var(--text-muted);
line-height: 1.35;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
}
.card__likes {
margin: 0.15rem 0 0;
font-size: 0.6875rem;
font-weight: 600;
color: var(--text);
letter-spacing: -0.01em;
font-variant-numeric: tabular-nums;
}
.home-empty {
grid-column: 1 / -1;
min-height: 11rem;
padding: 2rem 1rem;
border: 1px dashed var(--border);
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-muted);
background: var(--card-bg);
text-align: center;
line-height: 1.6;
}
</style>
</head>
<body>
<style>
/* 기본(라이트) 헤더 — data-theme 없을 때도 동일 톤 */
.site-header {
--header-bg: #ffffff;
--header-text: #1a1a1a;
--header-muted: rgba(26, 26, 26, 0.55);
--header-border: rgba(0, 0, 0, 0.08);
--header-btn-hover: rgba(0, 0, 0, 0.06);
box-shadow: 0 1px 0 var(--header-border), 0 4px 16px rgba(0, 0, 0, 0.06);
}
html[data-theme="dark"] .site-header {
--header-bg: #1a1a1a;
--header-text: #f5f0e8;
--header-muted: rgba(245, 240, 232, 0.65);
--header-border: rgba(255, 255, 255, 0.06);
--header-btn-hover: rgba(255, 255, 255, 0.08);
box-shadow: 0 1px 0 var(--header-border), 0 8px 24px rgba(0, 0, 0, 0.35);
}
.site-header {
--accent: #e8a54b;
--header-h: 4rem;
background: var(--header-bg);
color: var(--header-text);
position: sticky;
top: 0;
z-index: 100;
}
.site-header__inner {
max-width: 72rem;
margin: 0 auto;
padding: 0 max(1rem, env(safe-area-inset-left)) 0 max(1rem, env(safe-area-inset-right));
height: var(--header-h);
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}
.site-header__brand {
display: flex;
align-items: center;
gap: 0.75rem;
text-decoration: none;
color: inherit;
font-weight: 600;
letter-spacing: -0.02em;
font-size: 1.125rem;
min-width: 0;
}
.site-header__brand:hover {
color: var(--accent);
}
.site-header__nav {
display: flex;
align-items: center;
gap: 0.35rem;
margin-left: auto;
}
.site-header__nav-link {
min-height: 2.25rem;
padding: 0 0.75rem;
border-radius: 10px;
display: inline-flex;
align-items: center;
color: var(--header-text);
font-size: 0.875rem;
font-weight: 800;
text-decoration: none;
white-space: nowrap;
}
.site-header__nav-link:hover {
background: var(--header-btn-hover);
color: var(--accent);
}
.site-header__logo {
height: 2.25rem;
width: auto;
display: block;
border-radius: 6px;
object-fit: contain;
flex-shrink: 0;
}
.site-header__actions {
display: flex;
align-items: center;
gap: 0.375rem;
flex-shrink: 0;
}
.site-header__icon-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 2.75rem;
height: 2.75rem;
padding: 0;
border: none;
border-radius: 10px;
background: transparent;
color: inherit;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
transition: background 0.15s ease;
}
.site-header__icon-btn:hover {
background: var(--header-btn-hover);
}
.site-header__icon-btn:active {
transform: scale(0.96);
}
.site-header__icon-btn svg {
width: 1.375rem;
height: 1.375rem;
}
.site-header__icon-btn .icon-sun {
display: none;
}
.site-header__icon-btn .icon-moon {
display: block;
}
html[data-theme="dark"] .site-header__icon-btn .icon-moon {
display: none;
}
html[data-theme="dark"] .site-header__icon-btn .icon-sun {
display: block;
}
.site-header__profile {
display: inline-flex;
align-items: center;
justify-content: center;
width: 2.75rem;
height: 2.75rem;
border-radius: 50%;
background: var(--header-btn-hover);
color: var(--header-text);
text-decoration: none;
transition: background 0.15s ease, transform 0.15s ease;
-webkit-tap-highlight-color: transparent;
}
.site-header__profile:hover {
background: var(--accent);
color: #1a1a1a;
}
.site-header__profile--login {
width: auto;
min-width: 4.25rem;
border-radius: 10px;
padding: 0 0.875rem;
background: transparent;
font-size: 0.875rem;
font-weight: 800;
}
.site-header__profile--avatar {
overflow: hidden;
background: var(--header-btn-hover);
border: 1px solid var(--header-border);
}
.site-header__profile:active {
transform: scale(0.96);
}
.site-header__profile-img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
}
.site-header__profile svg {
width: 1.35rem;
height: 1.35rem;
}
@media (max-width: 520px) {
.site-header__inner {
gap: 0.5rem;
}
.site-header__brand span {
display: none;
}
.site-header__nav-link {
padding: 0 0.55rem;
font-size: 0.8125rem;
}
}
</style>
<header class="site-header" role="banner">
<div class="site-header__inner">
<a class="site-header__brand" href="/">
<img class="site-header__logo" src="/images/logo.png" alt="" width="120" height="36" />
<span>bibimbap</span>
</a>
<nav class="site-header__nav" aria-label="주요 메뉴">
<a class="site-header__nav-link" href="/recruit">팀원 모집</a>
</nav>
<div class="site-header__actions">
<button type="button" class="site-header__icon-btn" id="theme-toggle" aria-label="다크 모드로 전환" title="테마 전환">
<svg class="icon-moon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
</svg>
<svg class="icon-sun" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4"/>
<path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"/>
</svg>
</button>
<a class="site-header__profile site-header__profile--login" href="/login" aria-label="로그인" title="로그인">
<span>로그인</span>
</a>
</div>
</div>
</header>
<style>
.site-modal {
position: fixed;
inset: 0;
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
background: rgba(0, 0, 0, 0.48);
}
.site-modal[hidden] {
display: none !important;
}
.site-modal__panel {
width: min(100%, 24rem);
box-sizing: border-box;
padding: 1.5rem;
border: 1px solid var(--modal-border, rgba(0, 0, 0, 0.08));
border-radius: 12px;
background: var(--modal-bg, #fff);
color: var(--modal-text, #1a1a1a);
box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}
html[data-theme="dark"] .site-modal__panel {
--modal-bg: #1e1e1e;
--modal-text: #ece8e1;
--modal-muted: #a39e96;
--modal-border: rgba(255, 255, 255, 0.1);
box-shadow: 0 18px 56px rgba(0, 0, 0, 0.55);
}
html:not([data-theme="dark"]) .site-modal__panel {
--modal-muted: #5c5c5c;
}
.site-modal__title {
margin: 0;
font-size: 1.25rem;
line-height: 1.3;
letter-spacing: 0;
color: var(--modal-text, #1a1a1a);
}
.site-modal__message {
margin: 0.75rem 0 0;
font-size: 0.9375rem;
line-height: 1.6;
color: var(--modal-muted, #5c5c5c);
}
.site-modal__field {
display: grid;
gap: 0.5rem;
margin-top: 1rem;
}
.site-modal__field[hidden] {
display: none !important;
}
.site-modal__field-label {
font-size: 0.8125rem;
font-weight: 800;
color: var(--modal-text, #1a1a1a);
}
.site-modal__input {
width: 100%;
height: 2.875rem;
box-sizing: border-box;
border: 1px solid var(--modal-border, rgba(0, 0, 0, 0.08));
border-radius: 10px;
padding: 0 0.875rem;
background: var(--modal-bg, #fff);
color: var(--modal-text, #1a1a1a);
font: inherit;
}
.site-modal__input:focus {
outline: none;
border-color: #e8a54b;
box-shadow: 0 0 0 3px rgba(232, 165, 75, 0.22);
}
.site-modal__actions {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
margin-top: 1.25rem;
}
.site-modal__button {
min-width: 5rem;
min-height: 2.75rem;
padding: 0 1rem;
border: 1px solid transparent;
border-radius: 10px;
background: #e8a54b;
color: #1a1a1a;
font-size: 0.9375rem;
font-weight: 800;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.site-modal__button--secondary {
border-color: var(--modal-border, rgba(0, 0, 0, 0.08));
background: transparent;
color: var(--modal-text, #1a1a1a);
}
.site-modal__button[hidden] {
display: none !important;
}
.site-modal__button:active {
transform: scale(0.98);
}
</style>
<div class="site-modal" id="site-modal" hidden role="dialog" aria-modal="true" aria-labelledby="site-modal-title" aria-describedby="site-modal-message">
<div class="site-modal__panel" role="document">
<h2 class="site-modal__title" id="site-modal-title"></h2>
<p class="site-modal__message" id="site-modal-message"></p>
<label class="site-modal__field" id="site-modal-field" hidden>
<span class="site-modal__field-label" id="site-modal-field-label"></span>
<input class="site-modal__input" type="text" id="site-modal-input" autocomplete="off" />
</label>
<div class="site-modal__actions">
<button class="site-modal__button site-modal__button--secondary" type="button" id="site-modal-cancel" hidden>취소</button>
<button class="site-modal__button" type="button" id="site-modal-confirm">확인</button>
</div>
</div>
</div>
<script>
(function () {
var root = document.getElementById('site-modal');
var titleEl = document.getElementById('site-modal-title');
var messageEl = document.getElementById('site-modal-message');
var fieldEl = document.getElementById('site-modal-field');
var fieldLabelEl = document.getElementById('site-modal-field-label');
var inputEl = document.getElementById('site-modal-input');
var cancelBtn = document.getElementById('site-modal-cancel');
var confirmBtn = document.getElementById('site-modal-confirm');
var onConfirm = null;
var onCancel = null;
var lastFocused = null;
if (!root || !titleEl || !messageEl || !fieldEl || !fieldLabelEl || !inputEl || !cancelBtn || !confirmBtn) return;
function close(confirmed) {
root.hidden = true;
document.removeEventListener('keydown', onKeyDown);
var callback = confirmed ? onConfirm : onCancel;
var inputValue = inputEl.value;
onConfirm = null;
onCancel = null;
if (lastFocused && typeof lastFocused.focus === 'function') {
lastFocused.focus();
}
if (typeof callback === 'function') {
callback(inputValue);
}
}
function onKeyDown(ev) {
if (ev.isComposing) {
return;
}
if (ev.key === 'Enter') {
ev.preventDefault();
close(true);
} else if (ev.key === 'Escape' && !cancelBtn.hidden) {
ev.preventDefault();
close(false);
}
}
confirmBtn.addEventListener('click', function () {
close(true);
});
cancelBtn.addEventListener('click', function () {
close(false);
});
window.BibimbapModal = {
alert: function (options) {
var opts = options || {};
lastFocused = document.activeElement;
titleEl.textContent = opts.title || '알림';
messageEl.textContent = opts.message || '';
fieldEl.hidden = true;
inputEl.value = '';
inputEl.removeAttribute('maxlength');
inputEl.removeAttribute('placeholder');
cancelBtn.hidden = true;
confirmBtn.textContent = opts.confirmText || '확인';
onConfirm = opts.onConfirm || null;
onCancel = null;
root.hidden = false;
document.addEventListener('keydown', onKeyDown);
confirmBtn.focus();
},
confirm: function (options) {
var opts = options || {};
lastFocused = document.activeElement;
titleEl.textContent = opts.title || '확인';
messageEl.textContent = opts.message || '';
fieldEl.hidden = true;
inputEl.value = '';
inputEl.removeAttribute('maxlength');
inputEl.removeAttribute('placeholder');
cancelBtn.hidden = false;
cancelBtn.textContent = opts.cancelText || '취소';
confirmBtn.textContent = opts.confirmText || '확인';
onConfirm = opts.onConfirm || null;
onCancel = opts.onCancel || null;
root.hidden = false;
document.addEventListener('keydown', onKeyDown);
confirmBtn.focus();
},
prompt: function (options) {
var opts = options || {};
lastFocused = document.activeElement;
titleEl.textContent = opts.title || '입력';
messageEl.textContent = opts.message || '';
fieldLabelEl.textContent = opts.label || '입력값';
inputEl.value = opts.value || '';
if (opts.placeholder) {
inputEl.setAttribute('placeholder', opts.placeholder);
} else {
inputEl.removeAttribute('placeholder');
}
if (opts.maxLength) {
inputEl.setAttribute('maxlength', opts.maxLength);
} else {
inputEl.removeAttribute('maxlength');
}
fieldEl.hidden = false;
cancelBtn.hidden = false;
cancelBtn.textContent = opts.cancelText || '취소';
confirmBtn.textContent = opts.confirmText || '변경';
onConfirm = opts.onConfirm || null;
onCancel = opts.onCancel || null;
root.hidden = false;
document.addEventListener('keydown', onKeyDown);
inputEl.focus();
inputEl.select();
}
};
})();
</script>
<script>
(function () {
var btn = document.getElementById('theme-toggle');
if (!btn) return;
function label() {
var dark = document.documentElement.getAttribute('data-theme') === 'dark';
btn.setAttribute('aria-label', dark ? '라이트 모드로 전환' : '다크 모드로 전환');
btn.setAttribute('title', dark ? '라이트 모드' : '다크 모드');
}
label();
btn.addEventListener('click', function () {
var next = document.documentElement.getAttribute('data-theme') === 'dark' ? 'light' : 'dark';
document.documentElement.setAttribute('data-theme', next);
try { localStorage.setItem('bibimbap-theme', next); } catch (e) {}
label();
});
})();
</script>
<main class="page-main">
<section class="search-section" aria-label="게임·제작자 검색">
<div class="home-toolbar">
<form class="search-form" role="search" action="/" method="get">
<div class="search-form__field">
<label class="search-form__label" for="q">게임·제작자 검색</label>
<input class="search-form__input" type="search" id="q" name="q" value="" placeholder="게임·제작자 검색" autocomplete="off" enterkeyhint="search" />
</div>
<button class="search-form__submit" type="submit">검색</button>
</form>
</div>
<div class="search-history" id="search-history" hidden>
<div class="search-history__head">
<span class="search-history__label">최근 검색</span>
<button type="button" class="search-history__clear" id="search-history-clear">전체 삭제</button>
</div>
<div class="search-history__chips" id="search-history-chips" role="list"></div>
</div>
</section>
<section class="card-grid" aria-label="추천 목록">
<div class="home-empty">아직 공개된 게임이 없습니다.<br>로그인 후 첫 게임을 등록해 주세요.</div>
</section>
</main>
<style>
.site-footer {
margin-top: auto;
border-top: 1px solid var(--footer-border, rgba(0, 0, 0, 0.08));
background: var(--footer-bg, rgba(0, 0, 0, 0.02));
color: var(--footer-text, #1a1a1a);
}
html[data-theme="dark"] .site-footer {
--footer-border: rgba(255, 255, 255, 0.08);
--footer-bg: rgba(0, 0, 0, 0.35);
--footer-text: #ece8e1;
--footer-muted: #a39e96;
}
html:not([data-theme="dark"]) .site-footer {
--footer-muted: #5c5c5c;
}
.site-footer__inner {
max-width: 72rem;
margin: 0 auto;
padding: 1.75rem max(1rem, env(safe-area-inset-left)) calc(1.75rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-right));
}
.site-footer__brand {
margin: 0 0 0.5rem;
font-size: 0.875rem;
font-weight: 700;
letter-spacing: -0.02em;
color: var(--footer-text);
}
.site-footer__note {
margin: 0 0 1rem;
font-size: 0.8125rem;
line-height: 1.55;
color: var(--footer-muted, #5c5c5c);
}
.site-footer__meta {
margin: 0 0 1.15rem;
font-size: 0.8125rem;
line-height: 1.6;
color: var(--footer-muted, #5c5c5c);
}
.site-footer__meta a {
color: #e8a54b;
text-decoration: none;
font-weight: 500;
}
.site-footer__meta a:hover {
text-decoration: underline;
}
.site-footer__links {
margin: 0;
padding: 0;
list-style: none;
display: flex;
flex-wrap: wrap;
gap: 0.5rem 1.25rem;
}
.site-footer__links a {
font-size: 0.8125rem;
font-weight: 600;
color: var(--footer-text);
text-decoration: none;
opacity: 0.9;
}
.site-footer__links a:hover {
color: #e8a54b;
opacity: 1;
}
.site-footer__sep {
display: inline-block;
width: 1px;
height: 0.75rem;
background: var(--footer-border, rgba(0, 0, 0, 0.12));
margin: 0 0.15rem;
vertical-align: middle;
}
</style>
<footer class="site-footer" role="contentinfo">
<div class="site-footer__inner">
<p class="site-footer__brand">© 2026 유니티 개발자 모임</p>
<p class="site-footer__note">본 웹사이트는 비영리 단체 퍼슈트도서관의 후원으로 운영됩니다.</p>
<p class="site-footer__meta">
문의: <a href="mailto:admin@pandoli365.com">admin@pandoli365.com</a>
<span class="site-footer__sep" aria-hidden="true"></span>
제작: 김판돌
</p>
<ul class="site-footer__links">
<li><a href="/terms">이용약관</a></li>
<li><a href="/operation-policy">운영정책</a></li>
<li><a href="https://x.com/Fursuit_Library" target="_blank" rel="noopener noreferrer">X</a></li>
<li><a href="https://furlib.pandoli365.com" target="_blank" rel="noopener noreferrer">퍼슈트도서관</a></li>
<li><a href="https://gitea.pandoli365.com/pandoli365/bibimbap" target="_blank" rel="noopener noreferrer">소스 코드</a></li>
</ul>
</div>
</footer>
<script>
(function () {
var STORAGE_KEY = 'bibimbap-search-history';
var MAX_ITEMS = 10;
function loadHistory() {
try {
var raw = localStorage.getItem(STORAGE_KEY);
if (!raw) return [];
var parsed = JSON.parse(raw);
var list = Array.isArray(parsed) ? parsed.filter(function (s) { return typeof s === 'string' && s.trim(); }) : [];
if (list.length > MAX_ITEMS) {
list = list.slice(0, MAX_ITEMS);
saveHistory(list);
}
return list;
} catch (e) {
return [];
}
}
function saveHistory(items) {
try {
localStorage.setItem(STORAGE_KEY, JSON.stringify(items));
} catch (e) {
/* 용량 초과·비공개 모드 등 */
}
}
/** 검색어 추가: 앞에 넣고, 동일 문구(대소문자 무시)는 제거 후 최대 개수 유지 */
function addSearchQuery(query) {
var q = (query || '').trim();
if (!q) return;
var list = loadHistory();
var lower = q.toLowerCase();
list = list.filter(function (item) { return item.toLowerCase() !== lower; });
list.unshift(q);
if (list.length > MAX_ITEMS) list = list.slice(0, MAX_ITEMS);
saveHistory(list);
}
function removeSearchQuery(query) {
var lower = (query || '').toLowerCase();
var list = loadHistory().filter(function (item) { return item.toLowerCase() !== lower; });
saveHistory(list);
}
function clearHistory() {
try {
localStorage.removeItem(STORAGE_KEY);
} catch (e) {}
}
var form = document.querySelector('.search-form');
var input = document.getElementById('q');
var historyEl = document.getElementById('search-history');
var chipsEl = document.getElementById('search-history-chips');
var clearBtn = document.getElementById('search-history-clear');
function renderChips() {
var list = loadHistory();
chipsEl.innerHTML = '';
if (!list.length) {
historyEl.hidden = true;
return;
}
historyEl.hidden = false;
list.forEach(function (term) {
var chip = document.createElement('div');
chip.className = 'search-history__chip';
chip.setAttribute('role', 'listitem');
var textBtn = document.createElement('button');
textBtn.type = 'button';
textBtn.className = 'search-history__chip-text';
textBtn.textContent = term;
textBtn.title = term;
textBtn.addEventListener('click', function () {
input.value = term;
form.submit();
});
var removeBtn = document.createElement('button');
removeBtn.type = 'button';
removeBtn.className = 'search-history__chip-remove';
removeBtn.setAttribute('aria-label', '삭제: ' + term);
removeBtn.textContent = '\u00D7';
removeBtn.addEventListener('click', function (ev) {
ev.stopPropagation();
removeSearchQuery(term);
renderChips();
});
chip.appendChild(textBtn);
chip.appendChild(removeBtn);
chipsEl.appendChild(chip);
});
}
if (form && input) {
form.addEventListener('submit', function (ev) {
var q = input.value.trim();
input.value = q;
addSearchQuery(q);
renderChips();
});
if (clearBtn) {
clearBtn.addEventListener('click', function () {
clearHistory();
renderChips();
});
}
renderChips();
}
})();
</script>
</body>
</html>