282 lines
9.7 KiB
CSS
282 lines
9.7 KiB
CSS
:root {
|
|
--bg: #121016;
|
|
--panel: #1c1922;
|
|
--panel-2: #26222e;
|
|
--line: #3a3448;
|
|
--text: #f5f3fa;
|
|
--muted: #b9b3c9;
|
|
--accent: #f0a43a;
|
|
--accent-ink: #1e1a24;
|
|
--error: #ff7a7a;
|
|
--radius: 12px;
|
|
color-scheme: dark;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
[hidden] { display: none !important; }
|
|
|
|
html, body { margin: 0; height: 100%; }
|
|
body {
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font: 16px/1.6 system-ui, -apple-system, "Segoe UI", "Noto Sans TC", "Noto Sans JP", "Noto Sans KR",
|
|
"Microsoft JhengHei", "PingFang TC", sans-serif;
|
|
}
|
|
a { color: var(--accent); }
|
|
|
|
.layout { display: flex; min-height: 100vh; }
|
|
|
|
/* ---------- 側邊欄 ---------- */
|
|
#sidebar {
|
|
width: 280px;
|
|
flex-shrink: 0;
|
|
background: var(--panel);
|
|
border-right: 1px solid var(--line);
|
|
padding: 20px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 20px;
|
|
}
|
|
.brand { display: flex; align-items: center; justify-content: space-between; }
|
|
.brand a { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
|
|
font-weight: 800; font-size: 20px; }
|
|
.brand .logo { border-radius: 8px; object-fit: cover; }
|
|
#sidebar-body { display: flex; flex-direction: column; gap: 24px; flex: 1; }
|
|
#sidebar h2 { font-size: 18px; margin: 0 0 4px; }
|
|
|
|
form { display: flex; flex-direction: column; gap: 12px; }
|
|
label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
|
|
input, textarea, select {
|
|
font: inherit;
|
|
color: var(--text);
|
|
background: var(--panel-2);
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
padding: 10px 12px;
|
|
width: 100%;
|
|
}
|
|
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; }
|
|
#code { letter-spacing: .4em; font-size: 20px; text-align: center; }
|
|
textarea { resize: vertical; min-height: 120px; }
|
|
|
|
button, .button {
|
|
font: inherit;
|
|
cursor: pointer;
|
|
border: 1px solid var(--line);
|
|
background: var(--panel-2);
|
|
color: var(--text);
|
|
border-radius: 999px;
|
|
padding: 9px 20px;
|
|
text-decoration: none;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
button:disabled { opacity: .5; cursor: default; }
|
|
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
|
|
button.link { background: none; border: none; padding: 0; color: var(--accent); border-radius: 0; }
|
|
button.link:disabled { color: var(--muted); }
|
|
.icon-btn { padding: 4px 10px; border-radius: 8px; font-size: 20px; }
|
|
|
|
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
|
|
.spacer { flex: 1; }
|
|
.hint { font-size: 13px; color: var(--muted); margin: 0; }
|
|
.muted { color: var(--muted); }
|
|
.error { color: var(--error); font-size: 14px; margin: 0; }
|
|
|
|
#me-box { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
|
|
.me-name { font-size: 20px; font-weight: 700; word-break: break-word; }
|
|
.me-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; }
|
|
.me-nav a { text-decoration: none; }
|
|
|
|
.avatar { border-radius: 50%; object-fit: cover; background: var(--panel-2); width: 96px; height: 96px; }
|
|
.avatar.large { width: 160px; height: 160px; }
|
|
|
|
.beta { font-size: 12px; font-weight: 600; color: var(--muted); }
|
|
|
|
/* UID:特殊序號用背景色標示(和小卡的 server/app/titles.py TIER_COLORS 一致) */
|
|
.uid { color: var(--muted); font-variant-numeric: tabular-nums; }
|
|
.uid.tier-admin, .uid.tier-1919810, .uid.tier-114514 {
|
|
display: inline-block;
|
|
font-weight: 700;
|
|
padding: 2px 10px;
|
|
border-radius: 8px;
|
|
margin-top: 2px;
|
|
}
|
|
.uid.tier-admin { background: #f5c518; color: #1e1a24; }
|
|
.uid.tier-1919810 { background: #f07c2a; color: #1e1a24; }
|
|
.uid.tier-114514 { background: #2f7beb; color: #fff; }
|
|
|
|
.lang { margin-top: auto; }
|
|
|
|
/* ---------- 主畫面 ---------- */
|
|
#main { flex: 1; padding: 40px 24px; display: flex; justify-content: center; }
|
|
#view-checkin, #view-user, #view-upload, #view-review { width: 100%; max-width: 560px; }
|
|
#view-upload h1, #view-review h1 { font-size: 24px; margin: 0 0 8px; }
|
|
#view-upload h2 { font-size: 18px; margin: 28px 0 12px; }
|
|
.center { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
|
|
.center-text { text-align: center; }
|
|
|
|
.big-mark { font-size: 72px; font-weight: 900; letter-spacing: .1em; color: var(--accent); margin-top: 10vh; }
|
|
|
|
/* 簽到按鈕:圓角方形,平常是 checkin-0,按下去換成 checkin-1 + 音效 + 粒子 */
|
|
.checkin-btn {
|
|
position: relative;
|
|
width: 220px;
|
|
height: 220px;
|
|
margin-top: 8vh;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
border-radius: 28%;
|
|
border: 3px solid var(--accent);
|
|
background: var(--panel-2);
|
|
box-shadow: 0 16px 48px #f0a43a44;
|
|
transition: transform .15s;
|
|
}
|
|
.checkin-btn img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; }
|
|
.checkin-label {
|
|
position: absolute;
|
|
left: 0; right: 0; bottom: 0;
|
|
padding: 6px 0 8px;
|
|
background: linear-gradient(transparent, #000c 70%);
|
|
color: #fff;
|
|
font-size: 22px;
|
|
font-weight: 900;
|
|
letter-spacing: .1em;
|
|
}
|
|
.checkin-btn:hover:not(:disabled) { transform: scale(1.04); }
|
|
.checkin-btn:active:not(:disabled) { transform: scale(.97); }
|
|
.checkin-btn:disabled { opacity: 1; }
|
|
.checkin-btn.pressed { animation: press-pop .45s ease-out; }
|
|
@keyframes press-pop {
|
|
0% { transform: scale(.92); }
|
|
45% { transform: scale(1.1) rotate(-2deg); }
|
|
100% { transform: scale(1); }
|
|
}
|
|
|
|
/* 粒子:位置、方向、距離、顏色由 app.js 用 CSS 變數指定 */
|
|
.particle {
|
|
position: fixed;
|
|
left: var(--x);
|
|
top: var(--y);
|
|
width: var(--s);
|
|
height: var(--s);
|
|
border-radius: 50%;
|
|
background: var(--c);
|
|
pointer-events: none;
|
|
z-index: 20;
|
|
animation: burst var(--d, .9s) cubic-bezier(.12, .75, .3, 1) forwards;
|
|
}
|
|
.particle.digit {
|
|
width: auto;
|
|
height: auto;
|
|
background: none;
|
|
color: var(--c);
|
|
font-size: var(--s);
|
|
font-weight: 900;
|
|
line-height: 1;
|
|
text-shadow: 0 2px 6px #0008;
|
|
}
|
|
@keyframes burst {
|
|
from { transform: translate(-50%, -50%) scale(1); opacity: 1; }
|
|
70% { opacity: 1; }
|
|
to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.3) rotate(var(--r)); opacity: 0; }
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.particle { display: none; }
|
|
.checkin-btn.pressed { animation: none; }
|
|
}
|
|
|
|
.checkin-msg { font-size: 22px; font-weight: 700; margin: 0; }
|
|
.card-img { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 12px 40px #0008; background: var(--panel); }
|
|
.stats { color: var(--muted); margin: 0; font-size: 15px; }
|
|
.actions { justify-content: center; }
|
|
|
|
/* ---------- 投稿 / 審核 ---------- */
|
|
.upload-bar { margin-top: 16px; }
|
|
.upload-bar label.button { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 700; }
|
|
.upload-bar label.button.busy { opacity: .5; pointer-events: none; }
|
|
.sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
|
|
.sub-item { position: relative; border-radius: 10px; overflow: hidden; background: var(--panel-2); aspect-ratio: 1; }
|
|
.sub-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
|
.sub-status {
|
|
position: absolute;
|
|
left: 6px; bottom: 6px;
|
|
font-size: 12px;
|
|
font-weight: 700;
|
|
padding: 1px 8px;
|
|
border-radius: 999px;
|
|
background: #000b;
|
|
color: var(--text);
|
|
}
|
|
.sub-status.approved { background: #2f9e5a; color: #fff; }
|
|
.sub-status.rejected { background: #6b3a3a; color: #fff; }
|
|
.review-img { max-width: 100%; max-height: 60vh; border-radius: 12px; background: var(--panel); box-shadow: 0 12px 40px #0008; }
|
|
.review-meta { margin: 0; line-height: 1.9; }
|
|
#review-name { font-weight: 700; text-decoration: none; }
|
|
|
|
.profile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
|
|
.profile h1 { margin: 12px 0 0; font-size: 28px; word-break: break-word; }
|
|
|
|
.bio {
|
|
width: 100%;
|
|
text-align: left;
|
|
background: var(--panel);
|
|
border: 1px solid var(--line);
|
|
border-radius: var(--radius);
|
|
padding: 4px 20px;
|
|
margin-top: 16px;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
.bio pre { overflow-x: auto; background: var(--panel-2); padding: 12px; border-radius: 8px; }
|
|
.bio code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
|
|
.bio pre code { padding: 0; }
|
|
.bio blockquote { margin: 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
|
|
.bio table { border-collapse: collapse; }
|
|
.bio th, .bio td { border: 1px solid var(--line); padding: 4px 8px; }
|
|
.bio.empty { color: var(--muted); padding: 16px 20px; }
|
|
|
|
/* ---------- 編輯個人資料 ---------- */
|
|
dialog {
|
|
width: min(560px, calc(100vw - 32px));
|
|
background: var(--panel);
|
|
color: var(--text);
|
|
border: 1px solid var(--line);
|
|
border-radius: 16px;
|
|
padding: 24px;
|
|
}
|
|
dialog::backdrop { background: #000a; }
|
|
dialog h2 { margin: 0 0 4px; }
|
|
.avatar-edit { display: flex; gap: 16px; align-items: center; }
|
|
.avatar-edit .button { margin-bottom: 6px; }
|
|
.preview { margin-top: 0; max-height: 300px; overflow-y: auto; }
|
|
.dialog-actions { margin-top: 8px; }
|
|
|
|
#toast {
|
|
position: fixed;
|
|
left: 50%;
|
|
bottom: 32px;
|
|
transform: translateX(-50%);
|
|
background: var(--panel-2);
|
|
border: 1px solid var(--line);
|
|
padding: 10px 20px;
|
|
border-radius: 999px;
|
|
box-shadow: 0 8px 24px #0008;
|
|
z-index: 10;
|
|
}
|
|
|
|
.only-mobile { display: none; }
|
|
|
|
/* ---------- 手機:側欄收到上方 ---------- */
|
|
@media (max-width: 760px) {
|
|
.layout { flex-direction: column; }
|
|
#sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--line); padding: 12px 16px; gap: 12px; }
|
|
.only-mobile { display: inline-flex; }
|
|
#sidebar:not(.open) #sidebar-body { display: none; }
|
|
#sidebar-body { padding-bottom: 8px; }
|
|
#main { padding: 24px 16px; }
|
|
.checkin-btn { width: 180px; height: 180px; margin-top: 6vh; }
|
|
.checkin-label { font-size: 18px; }
|
|
.big-mark { font-size: 56px; margin-top: 6vh; }
|
|
}
|