Files
universal-crawler/static/style.css
T

182 lines
9.3 KiB
CSS

:root {
--bg: #0f1420;
--panel: #171e2e;
--panel2: #1e2740;
--border: #2a3550;
--text: #dbe4f5;
--muted: #8b97b5;
--accent: #4f8cff;
--green: #37d39a;
--red: #ff5d6c;
--yellow: #ffc857;
--purple: #a78bfa;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
background: var(--bg); color: var(--text);
font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
font-size: 14px; min-height: 100vh;
}
header {
display: flex; align-items: center; justify-content: space-between;
padding: 14px 24px; background: var(--panel);
border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10;
}
.logo { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.version { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.header-right { display: flex; align-items: center; gap: 10px; }
.status-pill {
background: var(--panel2); border: 1px solid var(--border);
padding: 5px 12px; border-radius: 20px; font-size: 12px; color: var(--muted);
}
.status-pill.active { color: var(--green); border-color: var(--green); }
main { padding: 20px 24px; max-width: 1500px; margin: 0 auto; }
/* ---------- buttons ---------- */
.btn {
background: var(--panel2); color: var(--text); border: 1px solid var(--border);
padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 13px;
transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: #fff; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; }
.btn.danger:hover { border-color: var(--red); color: var(--red); }
.btn.sm { padding: 3px 8px; font-size: 12px; border-radius: 6px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
/* ---------- task grid ---------- */
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.card {
background: var(--panel); border: 1px solid var(--border);
border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px;
transition: .15s;
}
.card:hover { border-color: #3a4a75; transform: translateY(-1px); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badge {
font-size: 11px; padding: 2px 8px; border-radius: 10px;
background: var(--panel2); border: 1px solid var(--border); color: var(--muted);
}
.badge.batch { color: #7cc4ff; border-color: #7cc4ff55; }
.badge.scheduled { color: var(--purple); border-color: var(--purple); }
.badge.auto { color: var(--yellow); border-color: var(--yellow); }
.badge.running { color: var(--green); border-color: var(--green); animation: pulse 1.6s infinite; }
.badge.paused { color: var(--yellow); border-color: var(--yellow); }
.badge.completed { color: var(--green); border-color: var(--green); }
.badge.failed { color: var(--red); border-color: var(--red); }
.badge.stopped { color: var(--muted); border-color: var(--border); }
.badge.scheduled-wait { color: var(--purple); border-color: var(--purple); }
@keyframes pulse { 50% { opacity: .5; } }
.card-line { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-line b { color: var(--text); font-weight: 500; }
.progress { height: 6px; background: var(--panel2); border-radius: 4px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--green)); transition: width .5s; }
.progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.stats { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.stats .ok { color: var(--green); } .stats .fail { color: var(--red); } .stats .img { color: var(--yellow); }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
/* ---------- empty ---------- */
.empty { text-align: center; padding: 80px 0; color: var(--muted); }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty button { margin-top: 14px; }
/* ---------- modal ---------- */
.modal-overlay {
position: fixed; inset: 0; background: rgba(5, 8, 15, .7);
display: flex; align-items: center; justify-content: center; z-index: 100;
backdrop-filter: blur(3px);
}
.modal {
background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
width: 640px; max-width: 95vw; max-height: 92vh; display: flex; flex-direction: column;
box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.modal.wide { width: 1080px; }
.modal.tall { width: 1000px; height: 88vh; }
.modal-head {
display: flex; justify-content: space-between; align-items: center;
padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 600;
}
.modal-foot {
display: flex; justify-content: flex-end; gap: 10px; align-items: center;
padding: 12px 18px; border-top: 1px solid var(--border);
}
.hint { color: var(--yellow); font-size: 12px; margin-right: auto; }
.tabs { display: flex; gap: 6px; padding: 12px 18px 0; }
.tab {
padding: 8px 16px; background: transparent; border: 1px solid var(--border);
border-bottom: none; border-radius: 10px 10px 0 0; color: var(--muted);
cursor: pointer; font-size: 13px;
}
.tab.active { background: var(--panel2); color: #fff; border-color: var(--accent); }
.tab:disabled { opacity: .4; cursor: not-allowed; }
.form-body { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.field label { font-size: 12px; color: var(--muted); }
.field.check { flex-direction: row; align-items: center; gap: 8px; padding-top: 22px; }
.field.check label { color: var(--text); font-size: 13px; display: flex; align-items: center; gap: 7px; cursor: pointer; }
input, select, textarea {
background: var(--panel2); border: 1px solid var(--border); color: var(--text);
border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }
input[type="checkbox"] { width: auto; accent-color: var(--accent); }
.row2 { display: flex; gap: 12px; }
.box { border: 1px dashed var(--border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: #141b2b; }
.hidden { display: none !important; }
/* ---------- detail ---------- */
.detail-wrap { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.detail-meta b { color: var(--text); font-weight: 500; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.runs-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.run-chip {
padding: 5px 12px; border-radius: 8px; border: 1px solid var(--border);
background: var(--panel2); cursor: pointer; font-size: 12px; color: var(--muted);
}
.run-chip.active { border-color: var(--accent); color: #fff; }
.run-panel { border: 1px solid var(--border); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--panel2); }
.run-stats { display: flex; gap: 16px; font-size: 12px; flex-wrap: wrap; }
.table-wrap { overflow: auto; max-height: 320px; border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { position: sticky; top: 0; background: var(--panel2); color: var(--muted); font-weight: 500; z-index: 1; }
td.url-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
td.title-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.t-ok { color: var(--green); } .t-fail { color: var(--red); }
.file-link { color: var(--accent); cursor: pointer; text-decoration: underline; }
.file-link:hover { color: #9ec0ff; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; }
.logs {
background: #0b0f1a; border: 1px solid var(--border); border-radius: 8px;
padding: 10px; font-family: ui-monospace, Consolas, monospace; font-size: 12px;
max-height: 220px; overflow-y: auto; line-height: 1.7;
}
.logs .info { color: var(--text); } .logs .warn { color: var(--yellow); } .logs .error { color: var(--red); }
/* ---------- preview ---------- */
#previewFrame { flex: 1; border: none; background: #fff; border-radius: 0 0 14px 14px; }
/* ---------- misc ---------- */
.toast {
position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
background: var(--panel2); border: 1px solid var(--accent); color: #fff;
padding: 10px 20px; border-radius: 10px; z-index: 300; font-size: 13px;
box-shadow: 0 8px 30px rgba(0,0,0,.4); animation: fadein .2s;
}
.toast.error { border-color: var(--red); }
@keyframes fadein { from { opacity: 0; transform: translate(-50%, -8px); } }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2a3550; border-radius: 4px; }