Features: feed CRUD, per-feed ntfy target (incl. private servers), Telegram/webhook channels, keyword filters, image attachments, per-feed intervals, OPML import/export, notification history & stats, users with roles, admin alerts, RU/EN i18n, light/dark theme, notification preview, history search, activity chart. Dockerized. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,318 @@
|
||||
:root {
|
||||
--bg: #0e1117;
|
||||
--bg-soft: #161b22;
|
||||
--bg-card: #1b2230;
|
||||
--border: #2a3343;
|
||||
--text: #e6edf3;
|
||||
--muted: #8b97a8;
|
||||
--primary: #4f7cff;
|
||||
--primary-hover: #3d68ec;
|
||||
--danger: #ef4444;
|
||||
--success: #22c55e;
|
||||
--warn: #f59e0b;
|
||||
--radius: 14px;
|
||||
--shadow: 0 8px 30px rgba(0, 0, 0, .35);
|
||||
--topbar-bg: rgba(22, 27, 34, .7);
|
||||
}
|
||||
|
||||
:root[data-theme="light"] {
|
||||
--bg: #f4f6fb;
|
||||
--bg-soft: #ffffff;
|
||||
--bg-card: #ffffff;
|
||||
--border: #dde3ec;
|
||||
--text: #1b2230;
|
||||
--muted: #5d6b7e;
|
||||
--primary: #3d68ec;
|
||||
--primary-hover: #2f56d4;
|
||||
--danger: #dc2626;
|
||||
--success: #16a34a;
|
||||
--warn: #d97706;
|
||||
--shadow: 0 6px 22px rgba(40, 60, 100, .12);
|
||||
--topbar-bg: rgba(255, 255, 255, .8);
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
||||
background:
|
||||
radial-gradient(1200px 600px at 80% -10%, rgba(79, 124, 255, .14), transparent 60%),
|
||||
radial-gradient(900px 500px at -10% 10%, rgba(34, 197, 94, .08), transparent 55%),
|
||||
var(--bg);
|
||||
color: var(--text);
|
||||
min-height: 100vh;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
h1, h2, h3 { margin: 0; font-weight: 600; }
|
||||
.muted { color: var(--muted); font-weight: 400; }
|
||||
.hidden { display: none !important; }
|
||||
|
||||
/* ---------- Topbar ---------- */
|
||||
.topbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
padding: 14px 28px;
|
||||
background: var(--topbar-bg);
|
||||
backdrop-filter: blur(12px);
|
||||
border-bottom: 1px solid var(--border);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
.brand { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; }
|
||||
.logo { font-size: 22px; }
|
||||
.tabs { display: flex; gap: 6px; margin-left: 8px; }
|
||||
.tab {
|
||||
background: none; border: none; color: var(--muted);
|
||||
padding: 8px 16px; border-radius: 10px; cursor: pointer;
|
||||
font-size: 15px; font-weight: 500; font-family: inherit; transition: .15s;
|
||||
}
|
||||
.tab:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
|
||||
.tab.active { color: var(--text); background: rgba(79, 124, 255, .16); }
|
||||
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
|
||||
#whoami { font-size: 13px; }
|
||||
|
||||
/* ---------- Layout ---------- */
|
||||
.container { max-width: 960px; margin: 0 auto; padding: 32px 24px 80px; }
|
||||
.tab-panel { display: none; animation: fade .25s ease; }
|
||||
.tab-panel.active { display: block; }
|
||||
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
|
||||
|
||||
.panel-head {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
margin-bottom: 22px; flex-wrap: wrap; gap: 12px;
|
||||
}
|
||||
.panel-head h2 { font-size: 22px; }
|
||||
.panel-head-actions { display: flex; gap: 10px; }
|
||||
|
||||
/* ---------- Buttons ---------- */
|
||||
.btn {
|
||||
font-family: inherit; font-size: 14px; font-weight: 500;
|
||||
padding: 9px 16px; border-radius: 10px; border: 1px solid transparent;
|
||||
cursor: pointer; transition: .15s; text-decoration: none; display: inline-flex;
|
||||
align-items: center; gap: 6px; color: var(--text); background: var(--bg-soft);
|
||||
}
|
||||
.btn:hover { transform: translateY(-1px); }
|
||||
.btn:active { transform: none; }
|
||||
.btn.primary { background: var(--primary); color: #fff; }
|
||||
.btn.primary:hover { background: var(--primary-hover); }
|
||||
.btn.ghost { background: transparent; border-color: var(--border); }
|
||||
.btn.ghost:hover { background: rgba(255, 255, 255, .05); }
|
||||
.btn.danger { background: transparent; border-color: rgba(239, 68, 68, .4); color: #ff9a9a; }
|
||||
.btn.danger:hover { background: rgba(239, 68, 68, .12); }
|
||||
.btn.block { width: 100%; justify-content: center; }
|
||||
.btn.small { padding: 6px 12px; font-size: 13px; }
|
||||
.icon-btn {
|
||||
background: none; border: none; color: var(--muted); font-size: 18px;
|
||||
cursor: pointer; padding: 4px 8px; border-radius: 8px;
|
||||
}
|
||||
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
|
||||
|
||||
/* ---------- Cards (feeds) ---------- */
|
||||
.cards { display: grid; gap: 14px; }
|
||||
.feed-card {
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 18px 20px;
|
||||
display: flex; flex-direction: column; gap: 12px;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
.feed-card.disabled { opacity: .55; }
|
||||
.feed-top { display: flex; align-items: flex-start; gap: 12px; }
|
||||
.feed-title { font-weight: 600; font-size: 16px; word-break: break-word; }
|
||||
.feed-url { font-size: 12.5px; color: var(--muted); word-break: break-all; margin-top: 2px; }
|
||||
.feed-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
|
||||
.chip {
|
||||
font-size: 12px; padding: 3px 10px; border-radius: 999px;
|
||||
background: rgba(255, 255, 255, .06); color: var(--muted);
|
||||
display: inline-flex; align-items: center; gap: 5px;
|
||||
}
|
||||
.chip.topic { background: rgba(79, 124, 255, .16); color: #aebfff; }
|
||||
.chip.tg { background: rgba(34, 158, 217, .18); color: #7fd0f0; }
|
||||
.feed-status { font-size: 12.5px; color: var(--muted); }
|
||||
.feed-status .ok { color: var(--success); }
|
||||
.feed-status .err { color: var(--danger); }
|
||||
.feed-actions { display: flex; gap: 8px; margin-left: auto; }
|
||||
|
||||
/* badge dot */
|
||||
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
|
||||
.dot.on { background: var(--success); box-shadow: 0 0 8px rgba(34, 197, 94, .6); }
|
||||
.dot.off { background: var(--muted); }
|
||||
|
||||
/* ---------- Empty ---------- */
|
||||
.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
|
||||
.empty-icon { font-size: 52px; margin-bottom: 12px; }
|
||||
|
||||
/* ---------- Forms ---------- */
|
||||
label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 14px; }
|
||||
label small { font-weight: 400; }
|
||||
input[type=text], input[type=url], input[type=number], input[type=password], select {
|
||||
width: 100%; margin-top: 6px; padding: 10px 12px;
|
||||
background: var(--bg-soft); border: 1px solid var(--border);
|
||||
border-radius: 10px; color: var(--text); font-family: inherit; font-size: 14px;
|
||||
transition: .15s;
|
||||
}
|
||||
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 124, 255, .18); }
|
||||
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
|
||||
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
|
||||
|
||||
.settings-card {
|
||||
background: var(--bg-card); border: 1px solid var(--border);
|
||||
border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
|
||||
}
|
||||
.settings-card h3 {
|
||||
font-size: 13px; text-transform: uppercase; letter-spacing: .08em;
|
||||
color: var(--muted); margin: 22px 0 14px; padding-top: 14px;
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
.settings-card h3:first-child { margin-top: 0; padding-top: 0; border-top: none; }
|
||||
.form-actions { margin-top: 24px; display: flex; justify-content: flex-end; }
|
||||
.inline-test { display: flex; gap: 10px; margin-bottom: 8px; }
|
||||
.inline-test input { margin-top: 0; }
|
||||
.auth-fields { padding-left: 2px; }
|
||||
|
||||
/* switch */
|
||||
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
|
||||
.switch { appearance: none; width: 44px; height: 24px; border-radius: 999px;
|
||||
background: var(--border); position: relative; cursor: pointer; transition: .2s; margin: 0; flex-shrink: 0; }
|
||||
.switch::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
|
||||
background: #fff; top: 3px; left: 3px; transition: .2s; }
|
||||
.switch:checked { background: var(--primary); }
|
||||
.switch:checked::after { left: 23px; }
|
||||
|
||||
/* ---------- Modal ---------- */
|
||||
.modal-backdrop {
|
||||
position: fixed; inset: 0; background: rgba(0, 0, 0, .6);
|
||||
backdrop-filter: blur(4px); display: flex; align-items: center;
|
||||
justify-content: center; z-index: 50; padding: 20px; animation: fade .15s;
|
||||
}
|
||||
.modal {
|
||||
background: var(--bg-card); border: 1px solid var(--border);
|
||||
border-radius: 18px; width: 100%; max-width: 540px; box-shadow: var(--shadow);
|
||||
max-height: 90vh; display: flex; flex-direction: column;
|
||||
}
|
||||
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
|
||||
.modal-body { padding: 22px 24px; overflow-y: auto; }
|
||||
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border); }
|
||||
|
||||
/* ---------- Login ---------- */
|
||||
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
|
||||
.login-card {
|
||||
background: var(--bg-card); border: 1px solid var(--border);
|
||||
border-radius: 18px; padding: 38px 34px; width: 100%; max-width: 380px;
|
||||
box-shadow: var(--shadow); text-align: center;
|
||||
}
|
||||
.login-logo { font-size: 46px; margin-bottom: 10px; }
|
||||
.login-card h1 { font-size: 22px; margin-bottom: 4px; }
|
||||
.login-card p { margin: 0 0 22px; }
|
||||
.login-card label { text-align: left; }
|
||||
.login-card .btn { margin-top: 8px; }
|
||||
|
||||
/* ---------- Alerts / toast ---------- */
|
||||
.alert { padding: 10px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 16px; text-align: left; }
|
||||
.alert.error { background: rgba(239, 68, 68, .14); color: #ffb4b4; border: 1px solid rgba(239, 68, 68, .3); }
|
||||
.toast {
|
||||
position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
|
||||
background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
|
||||
padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow);
|
||||
font-size: 14px; opacity: 0; transition: .25s; z-index: 100; max-width: 90vw;
|
||||
}
|
||||
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
|
||||
.toast.ok { border-color: rgba(34, 197, 94, .5); }
|
||||
.toast.err { border-color: rgba(239, 68, 68, .5); }
|
||||
|
||||
/* ---------- Stats ---------- */
|
||||
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
|
||||
.stat {
|
||||
background: var(--bg-card); border: 1px solid var(--border);
|
||||
border-radius: 12px; padding: 12px 18px; min-width: 92px; text-align: center;
|
||||
}
|
||||
.stat b { display: block; font-size: 24px; font-weight: 700; }
|
||||
.stat span { font-size: 12px; color: var(--muted); }
|
||||
.stat.warn b { color: var(--warn); }
|
||||
|
||||
/* ---------- Details / advanced ---------- */
|
||||
details.adv {
|
||||
border: 1px solid var(--border); border-radius: 10px;
|
||||
padding: 4px 14px; margin-bottom: 14px; background: rgba(255, 255, 255, .02);
|
||||
}
|
||||
details.adv summary {
|
||||
cursor: pointer; font-size: 13.5px; font-weight: 500; padding: 8px 0;
|
||||
color: var(--muted); list-style: none;
|
||||
}
|
||||
details.adv summary::-webkit-details-marker { display: none; }
|
||||
details.adv summary::before { content: "▸ "; }
|
||||
details.adv[open] summary::before { content: "▾ "; }
|
||||
details.adv[open] { padding-bottom: 8px; }
|
||||
|
||||
.switch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; margin-top: 4px; }
|
||||
@media (max-width: 560px) { .switch-grid { grid-template-columns: 1fr; } }
|
||||
.switch-grid .switch-row { margin-bottom: 10px; }
|
||||
|
||||
/* ---------- History ---------- */
|
||||
.history { display: flex; flex-direction: column; gap: 8px; }
|
||||
.history-row {
|
||||
display: flex; align-items: flex-start; gap: 12px;
|
||||
background: var(--bg-card); border: 1px solid var(--border);
|
||||
border-left: 3px solid var(--success); border-radius: 10px; padding: 12px 16px;
|
||||
}
|
||||
.history-row.err { border-left-color: var(--danger); }
|
||||
.history-icon { font-size: 16px; }
|
||||
.history-main { flex: 1; min-width: 0; }
|
||||
.history-title { font-weight: 500; font-size: 14.5px; word-break: break-word; }
|
||||
.history-title a { color: var(--text); text-decoration: none; }
|
||||
.history-title a:hover { color: var(--primary); text-decoration: underline; }
|
||||
.history-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; }
|
||||
.history-sub .err { color: #ff9a9a; }
|
||||
.history-time { font-size: 12px; white-space: nowrap; }
|
||||
|
||||
/* ---------- Language select / topbar controls ---------- */
|
||||
.lang-select {
|
||||
width: auto; margin: 0; padding: 6px 8px; font-size: 13px;
|
||||
background: var(--bg-soft); border: 1px solid var(--border);
|
||||
border-radius: 8px; color: var(--text); cursor: pointer;
|
||||
}
|
||||
.login-controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; }
|
||||
|
||||
/* ---------- Activity chart ---------- */
|
||||
.chart-card {
|
||||
background: var(--bg-card); border: 1px solid var(--border);
|
||||
border-radius: var(--radius); padding: 16px 18px 12px; margin-bottom: 24px;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
.chart-head {
|
||||
display: flex; justify-content: space-between; align-items: center;
|
||||
font-size: 13px; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; gap: 8px;
|
||||
}
|
||||
.chart-legend { display: inline-flex; align-items: center; gap: 6px; }
|
||||
.chart-legend .lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
|
||||
.chart-legend .lg.sent { background: var(--success); }
|
||||
.chart-legend .lg.failed { background: var(--danger); margin-left: 8px; }
|
||||
#chart { width: 100%; }
|
||||
.chart-svg { width: 100%; height: 90px; display: block; }
|
||||
.chart-svg .bar-sent { fill: var(--success); }
|
||||
.chart-svg .bar-fail { fill: var(--danger); }
|
||||
.chart-svg rect { transition: opacity .15s; }
|
||||
.chart-svg g:hover rect { opacity: .75; }
|
||||
|
||||
/* ---------- History toolbar ---------- */
|
||||
.history-toolbar { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
|
||||
.history-toolbar input[type=search] { flex: 1; min-width: 200px; margin: 0; }
|
||||
.check-inline { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 13.5px; white-space: nowrap; cursor: pointer; }
|
||||
.check-inline input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
|
||||
|
||||
/* ---------- Notification preview ---------- */
|
||||
.preview-block { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
|
||||
#preview-area { margin-top: 12px; }
|
||||
.ntfy-preview {
|
||||
background: var(--bg-soft); border: 1px solid var(--border);
|
||||
border-left: 3px solid var(--primary); border-radius: 10px; padding: 12px 14px;
|
||||
}
|
||||
.np-head { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
|
||||
.np-title { font-weight: 600; font-size: 15px; margin-bottom: 6px; word-break: break-word; }
|
||||
.np-body { font-size: 13.5px; color: var(--muted); white-space: pre-wrap; word-break: break-word; }
|
||||
.ntfy-preview img { max-width: 100%; border-radius: 8px; margin-top: 10px; display: block; }
|
||||
Reference in New Issue
Block a user