Express/SQLite API와 Docker 구성을 추가하고 로그인·덱 저장·공개 덱·관리자·프로필 화면을 구현했다. 결과 화면 저장 UX, 헤더 프로필, 애드센스용 app-shell 레이아웃(1280px) 및 문서를 반영했다. Co-authored-by: Cursor <cursoragent@cursor.com>
520 lines
8.6 KiB
CSS
520 lines
8.6 KiB
CSS
/**
|
|
* 관리자 페이지 (admin.html)
|
|
*/
|
|
|
|
.admin-page {
|
|
font-family: 'Inter', 'Noto Sans KR', sans-serif;
|
|
min-height: 100vh;
|
|
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
|
|
color: #0f172a;
|
|
}
|
|
|
|
.admin-nav {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 50;
|
|
background: rgba(255, 255, 255, 0.7);
|
|
backdrop-filter: blur(12px);
|
|
border-bottom: 1px solid #e2e8f0;
|
|
}
|
|
|
|
.admin-nav-inner {
|
|
max-width: 80rem;
|
|
margin: 0 auto;
|
|
padding: 0 1.5rem;
|
|
height: 4rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.admin-brand {
|
|
font-size: 1.25rem;
|
|
font-weight: 800;
|
|
color: #1e293b;
|
|
text-decoration: none;
|
|
letter-spacing: -0.025em;
|
|
}
|
|
|
|
.admin-brand span {
|
|
color: #2563eb;
|
|
}
|
|
|
|
.admin-main {
|
|
max-width: 80rem;
|
|
margin: 0 auto;
|
|
padding: 3rem 1.5rem 5rem;
|
|
}
|
|
|
|
@media (min-width: 640px) {
|
|
.admin-main {
|
|
padding-top: 4rem;
|
|
}
|
|
}
|
|
|
|
.admin-header {
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.admin-header h1 {
|
|
font-size: 1.75rem;
|
|
font-weight: 900;
|
|
margin: 0 0 0.5rem;
|
|
letter-spacing: -0.02em;
|
|
}
|
|
|
|
.admin-header p {
|
|
margin: 0;
|
|
font-size: 0.875rem;
|
|
color: #64748b;
|
|
}
|
|
|
|
.admin-tabs {
|
|
display: flex;
|
|
gap: 0.25rem;
|
|
margin-bottom: 1.75rem;
|
|
border-bottom: 1px solid #e2e8f0;
|
|
}
|
|
|
|
.admin-tab {
|
|
padding: 0.75rem 1.125rem;
|
|
margin-bottom: -1px;
|
|
border: none;
|
|
border-bottom: 2px solid transparent;
|
|
background: none;
|
|
font-size: 0.875rem;
|
|
font-weight: 700;
|
|
color: #94a3b8;
|
|
cursor: pointer;
|
|
transition: color 0.2s, border-color 0.2s;
|
|
}
|
|
|
|
.admin-tab:hover {
|
|
color: #475569;
|
|
}
|
|
|
|
.admin-tab.active {
|
|
color: #2563eb;
|
|
border-bottom-color: #2563eb;
|
|
}
|
|
|
|
.admin-toolbar {
|
|
display: flex;
|
|
gap: 0.75rem;
|
|
margin-bottom: 1.25rem;
|
|
}
|
|
|
|
.admin-search {
|
|
flex: 1;
|
|
border: 1px solid #e2e8f0;
|
|
border-radius: 0.75rem;
|
|
padding: 0.625rem 1rem;
|
|
font-size: 0.875rem;
|
|
background: #fff;
|
|
outline: none;
|
|
}
|
|
|
|
.admin-search:focus {
|
|
border-color: #3b82f6;
|
|
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
|
|
}
|
|
|
|
.admin-btn {
|
|
padding: 0.625rem 1rem;
|
|
border: none;
|
|
border-radius: 0.75rem;
|
|
font-size: 0.8125rem;
|
|
font-weight: 700;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.admin-btn-primary {
|
|
background: #1e293b;
|
|
color: #fff;
|
|
}
|
|
|
|
.admin-btn-secondary {
|
|
background: #f1f5f9;
|
|
color: #475569;
|
|
}
|
|
|
|
.admin-btn-secondary:hover {
|
|
background: #e2e8f0;
|
|
}
|
|
|
|
.admin-count {
|
|
font-size: 0.75rem;
|
|
color: #94a3b8;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.admin-user-list,
|
|
.admin-deck-grid {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.admin-deck-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
gap: 1rem;
|
|
}
|
|
|
|
.admin-card {
|
|
background: #fff;
|
|
border: 1px solid #e2e8f0;
|
|
border-radius: 1rem;
|
|
padding: 1rem 1.125rem;
|
|
box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
|
|
}
|
|
|
|
.admin-card-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.admin-card-title {
|
|
font-size: 0.9375rem;
|
|
font-weight: 700;
|
|
color: #0f172a;
|
|
margin: 0 0 0.25rem;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.admin-card-meta {
|
|
font-size: 0.75rem;
|
|
color: #94a3b8;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.admin-card-badges {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.375rem;
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.admin-badge {
|
|
font-size: 0.625rem;
|
|
font-weight: 700;
|
|
padding: 0.15rem 0.45rem;
|
|
border-radius: 0.375rem;
|
|
}
|
|
|
|
.admin-badge-public {
|
|
color: #059669;
|
|
background: #ecfdf5;
|
|
}
|
|
|
|
.admin-badge-private {
|
|
color: #64748b;
|
|
background: #f1f5f9;
|
|
}
|
|
|
|
.admin-badge-type {
|
|
color: #2563eb;
|
|
background: #eff6ff;
|
|
}
|
|
|
|
.admin-card-actions {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.admin-card-btn {
|
|
padding: 0.4rem 0.75rem;
|
|
border: none;
|
|
border-radius: 0.5rem;
|
|
font-size: 0.6875rem;
|
|
font-weight: 700;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.admin-card-btn-edit {
|
|
background: #f1f5f9;
|
|
color: #475569;
|
|
}
|
|
|
|
.admin-card-btn-edit:hover {
|
|
background: #e2e8f0;
|
|
}
|
|
|
|
.admin-card-btn-delete {
|
|
background: #fef2f2;
|
|
color: #dc2626;
|
|
}
|
|
|
|
.admin-card-btn-delete:hover {
|
|
background: #fee2e2;
|
|
}
|
|
|
|
.admin-modal {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 100;
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 1rem;
|
|
background: rgba(15, 23, 42, 0.5);
|
|
}
|
|
|
|
.admin-modal.open {
|
|
display: flex;
|
|
}
|
|
|
|
.hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
/* 회원 카드 */
|
|
.admin-user-card {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.admin-user-avatar {
|
|
width: 3rem;
|
|
height: 3rem;
|
|
border-radius: 9999px;
|
|
object-fit: cover;
|
|
background: #f1f5f9;
|
|
border: 2px solid #e2e8f0;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.admin-user-body {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* 덱 카드 (썸네일) */
|
|
.admin-deck-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.admin-deck-preview {
|
|
aspect-ratio: 16 / 9;
|
|
background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
|
|
border-bottom: 1px solid #e2e8f0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.admin-deck-preview img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: contain;
|
|
background: #f8fafc;
|
|
}
|
|
|
|
.admin-deck-preview-placeholder {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100%;
|
|
font-size: 0.6875rem;
|
|
font-weight: 600;
|
|
color: #94a3b8;
|
|
}
|
|
|
|
.admin-deck-body {
|
|
padding: 1rem 1.125rem 1.125rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.375rem;
|
|
flex: 1;
|
|
}
|
|
|
|
/* 회원 모달 */
|
|
.admin-modal-box {
|
|
width: 100%;
|
|
max-width: 26rem;
|
|
background: #fff;
|
|
border-radius: 1.25rem;
|
|
padding: 0;
|
|
box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.admin-modal-header {
|
|
padding: 1.5rem 1.5rem 1rem;
|
|
background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
|
|
border-bottom: 1px solid #e2e8f0;
|
|
}
|
|
|
|
.admin-modal-profile {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.admin-modal-avatar-wrap {
|
|
position: relative;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.admin-modal-avatar {
|
|
width: 4.5rem;
|
|
height: 4.5rem;
|
|
border-radius: 9999px;
|
|
object-fit: cover;
|
|
background: #fff;
|
|
border: 3px solid #fff;
|
|
box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
|
|
}
|
|
|
|
.admin-modal-avatar-btn {
|
|
position: absolute;
|
|
right: -0.25rem;
|
|
bottom: -0.25rem;
|
|
width: 1.75rem;
|
|
height: 1.75rem;
|
|
border-radius: 9999px;
|
|
border: 2px solid #fff;
|
|
background: #2563eb;
|
|
color: #fff;
|
|
font-size: 0.75rem;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.admin-modal-avatar-remove {
|
|
margin-top: 0.5rem;
|
|
font-size: 0.6875rem;
|
|
color: #94a3b8;
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 0;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.admin-modal-title {
|
|
margin: 0;
|
|
font-size: 1.125rem;
|
|
font-weight: 800;
|
|
color: #0f172a;
|
|
}
|
|
|
|
.admin-modal-sub {
|
|
margin: 0.25rem 0 0;
|
|
font-size: 0.75rem;
|
|
color: #64748b;
|
|
}
|
|
|
|
.admin-modal-content {
|
|
padding: 1.25rem 1.5rem 1.5rem;
|
|
}
|
|
|
|
.admin-field-hint {
|
|
margin: 0.375rem 0 0;
|
|
font-size: 0.6875rem;
|
|
color: #94a3b8;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.admin-field-hint.warn {
|
|
color: #d97706;
|
|
}
|
|
|
|
.admin-input:disabled,
|
|
.admin-select:disabled {
|
|
background: #f8fafc;
|
|
color: #94a3b8;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.admin-modal-divider {
|
|
height: 1px;
|
|
background: #e2e8f0;
|
|
margin: 1rem 0;
|
|
}
|
|
|
|
.admin-modal-actions {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.admin-modal-actions-row {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.admin-modal-actions-row .admin-btn {
|
|
flex: 1;
|
|
}
|
|
|
|
.admin-btn-outline {
|
|
background: #fff;
|
|
color: #475569;
|
|
border: 1px solid #e2e8f0;
|
|
}
|
|
|
|
.admin-btn-outline:hover {
|
|
background: #f8fafc;
|
|
}
|
|
|
|
.admin-btn-danger-text {
|
|
background: none;
|
|
color: #dc2626;
|
|
border: none;
|
|
padding: 0.5rem;
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
text-align: center;
|
|
}
|
|
|
|
.admin-btn-danger-text:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.admin-field {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.admin-label {
|
|
display: block;
|
|
font-size: 0.6875rem;
|
|
font-weight: 700;
|
|
color: #94a3b8;
|
|
text-transform: uppercase;
|
|
margin-bottom: 0.375rem;
|
|
}
|
|
|
|
.admin-input,
|
|
.admin-select {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
border: 1px solid #e2e8f0;
|
|
border-radius: 0.75rem;
|
|
padding: 0.625rem 0.75rem;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.admin-error {
|
|
font-size: 0.8125rem;
|
|
color: #ef4444;
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.admin-error.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.hidden {
|
|
display: none !important;
|
|
}
|