- новая категория fail2ban: jail.local, jail.d (в т.ч. 3x-ipl.local), IP-лимит 3x-ui (filter.d/action.d/3x-ipl.conf), свои *.local; при восстановлении создаются логи 3xipl*.log, без которых jail не поднимается - xui: свои *.dat из /usr/local/x-ui/bin (ipcheck, discord-*) — на них ссылается роутинг; штатные geo-файлы релиза не бэкапятся - recipe 3x-ui больше не очищает /usr/local/x-ui и не стирает восстановленные файлы - маски (*, ?) в paths и keep_binaries каталога - provision ставит nftables вместе с fail2ban - .gitattributes: LF во всех файлах Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
83832fc734
commit
cbd3cde01d
8 files changed
+503
-400
No files matched your search
@@ -155,7 +155,7 @@ func (c *collector) collectSpec(s catalog.Spec) (*manifest.Category, error) {
|
||||
RestoreAfter: s.RestoreAfter,
|
||||
}
|
||||
skip := archive.NewMatcher(c.cat.Exclude, s.Exclude)
|
||||
for _, p := range s.Paths {
|
||||
for _, p := range expandPaths(s.Paths) {
|
||||
if !sysx.Exists(p) {
|
||||
continue
|
||||
}
|
||||
@@ -177,7 +177,7 @@ func (c *collector) collectSpec(s catalog.Spec) (*manifest.Category, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
for _, b := range s.KeepBinaries {
|
||||
for _, b := range expandPaths(s.KeepBinaries) {
|
||||
if sysx.Exists(b) {
|
||||
mc.Binaries = append(mc.Binaries, b)
|
||||
c.add(manifest.MainPart, binItem(s.Name, b))
|
||||
@@ -236,6 +236,20 @@ func (c *collector) cmdDump(cat string, d catalog.CmdDump, mc *manifest.Category
|
||||
return nil
|
||||
}
|
||||
|
||||
// expandPaths раскрывает маски (*, ?, [...]) в путях категории; пути без масок — как есть.
|
||||
func expandPaths(paths []string) []string {
|
||||
var out []string
|
||||
for _, p := range paths {
|
||||
if !strings.ContainsAny(p, "*?[") {
|
||||
out = append(out, p)
|
||||
continue
|
||||
}
|
||||
m, _ := filepath.Glob(p)
|
||||
out = append(out, m...)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func anyExists(paths []string) bool {
|
||||
for _, p := range paths {
|
||||
if sysx.Exists(p) {
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package agent
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"testing"
|
||||
|
||||
"gitea.hsrv.site/mrleo1nid/backup-master/internal/archive"
|
||||
"gitea.hsrv.site/mrleo1nid/backup-master/internal/catalog"
|
||||
)
|
||||
|
||||
func TestExpandPaths(t *testing.T) {
|
||||
dir := t.TempDir()
|
||||
for _, n := range []string{"ipcheck.dat", "geoip.dat", "x.txt"} {
|
||||
if err := os.WriteFile(filepath.Join(dir, n), nil, 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
got := expandPaths([]string{filepath.Join(dir, "*.dat"), "/etc/x-ui", filepath.Join(dir, "*.none")})
|
||||
want := []string{filepath.Join(dir, "geoip.dat"), filepath.Join(dir, "ipcheck.dat"), "/etc/x-ui"}
|
||||
if !slices.Equal(got, want) {
|
||||
t.Fatalf("expandPaths = %v, want %v", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
// Свои geo-файлы попадают в бэкап, штатные из релиза 3x-ui — нет.
|
||||
func TestXUIGeoExcludes(t *testing.T) {
|
||||
cat, err := catalog.Default()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
s := cat.Find("xui")
|
||||
skip := archive.NewMatcher(cat.Exclude, s.Exclude)
|
||||
cases := map[string]bool{
|
||||
"/usr/local/x-ui/bin/ipcheck.dat": false,
|
||||
"/usr/local/x-ui/bin/discord-geosite.dat": false,
|
||||
"/usr/local/x-ui/bin/geoip.dat": true,
|
||||
"/usr/local/x-ui/bin/geosite_RU.dat": true,
|
||||
"/usr/local/x-ui/bin/geoip_IR.dat": true,
|
||||
"/usr/local/x-ui/bin/ipcheck.dat.bak": true,
|
||||
"/etc/x-ui/x-ui.db": true,
|
||||
}
|
||||
for p, want := range cases {
|
||||
if got := skip.Match(p); got != want {
|
||||
t.Errorf("exclude(%s) = %v, want %v", p, got, want)
|
||||
}
|
||||
}
|
||||
f2b := cat.Find("fail2ban")
|
||||
if f2b == nil || !slices.Contains(f2b.Paths, "/etc/fail2ban/jail.d") || !slices.Contains(f2b.Paths, "/etc/fail2ban/filter.d/3x-ipl.conf") {
|
||||
t.Fatalf("категория fail2ban: %+v", f2b)
|
||||
}
|
||||
}
|
||||
@@ -23,13 +23,44 @@ categories:
|
||||
- name: xui
|
||||
type: xui
|
||||
detect: [/usr/local/x-ui/x-ui]
|
||||
paths: [/etc/x-ui, /root/cert]
|
||||
exclude: ["/etc/x-ui/x-ui.db*"]
|
||||
paths:
|
||||
- /etc/x-ui
|
||||
- /root/cert
|
||||
# свои geo-файлы (ipcheck.dat, discord-*.dat и т.п.): на них ссылается роутинг,
|
||||
# без них Xray не стартует; штатные geo*.dat приходят с релизом 3x-ui
|
||||
- /usr/local/x-ui/bin/*.dat
|
||||
exclude:
|
||||
- "/etc/x-ui/x-ui.db*"
|
||||
- "/usr/local/x-ui/bin/geoip.dat"
|
||||
- "/usr/local/x-ui/bin/geosite.dat"
|
||||
- "/usr/local/x-ui/bin/geo*_IR.dat"
|
||||
- "/usr/local/x-ui/bin/geo*_RU.dat"
|
||||
- "*.bak"
|
||||
service: x-ui
|
||||
version_cmd: [/usr/local/x-ui/x-ui, -v]
|
||||
install: xui
|
||||
keep_binaries: [/usr/local/x-ui, /usr/bin/x-ui, /etc/systemd/system/x-ui.service]
|
||||
|
||||
# fail2ban: свои jail'ы (jail.local, jail.d/*.local) и IP-лимит 3x-ui (3x-ipl).
|
||||
# Штатные filter.d/action.d ставит пакет — берём только файлы 3x-ui и свои *.local.
|
||||
- name: fail2ban
|
||||
type: systemd
|
||||
detect: [/etc/fail2ban]
|
||||
paths:
|
||||
- /etc/fail2ban/jail.local
|
||||
- /etc/fail2ban/jail.d
|
||||
- /etc/fail2ban/fail2ban.local
|
||||
- /etc/fail2ban/fail2ban.conf # 3x-ui включает в нём allowipv6
|
||||
- /etc/fail2ban/filter.d/3x-ipl.conf
|
||||
- /etc/fail2ban/action.d/3x-ipl.conf
|
||||
- /etc/fail2ban/filter.d/*.local
|
||||
- /etc/fail2ban/action.d/*.local
|
||||
service: fail2ban
|
||||
restore_after: [system, xui]
|
||||
post_restore:
|
||||
# jail 3x-ipl читает лог x-ui: без файла fail2ban не поднимет jail
|
||||
- "if ls /etc/fail2ban/jail.d/3x-ipl* >/dev/null 2>&1; then mkdir -p /var/log/x-ui && touch /var/log/x-ui/3xipl.log /var/log/x-ui/3xipl-banned.log; fi"
|
||||
|
||||
- name: nebula
|
||||
type: systemd
|
||||
detect: [/etc/nebula]
|
||||
|
||||
@@ -189,7 +189,8 @@ ok "$(iptables --version)"
|
||||
|
||||
# ---------- 5. Fail2ban ----------
|
||||
step "5. Fail2ban"
|
||||
apt_install fail2ban python3-systemd
|
||||
# nftables: штатный banaction fail2ban в Ubuntu 24.04 — nftables, без nft jail sshd не банит
|
||||
apt_install fail2ban python3-systemd nftables
|
||||
IGNORE_IP="127.0.0.1/8 ::1 192.168.0.0/16 10.0.0.0/8"
|
||||
if [[ -n $CLIENT_IP ]]; then
|
||||
IGNORE_IP+=" $CLIENT_IP"
|
||||
|
||||
@@ -44,7 +44,8 @@ func installXUI(ctx context.Context, version, arch string) error {
|
||||
v = "v" + v
|
||||
}
|
||||
url := fmt.Sprintf("https://github.com/MHSanaei/3x-ui/releases/download/%s/x-ui-linux-%s.tar.gz", v, arch)
|
||||
_ = os.RemoveAll("/usr/local/x-ui")
|
||||
// каталог не очищаем: в нём уже лежат восстановленные свои geo-файлы (ipcheck.dat и т.п.),
|
||||
// архив релиза перезапишет только свои файлы
|
||||
if err := fetchTarGz(ctx, url, func(name string) (string, bool) {
|
||||
name = strings.TrimPrefix(name, "./")
|
||||
if !strings.HasPrefix(name, "x-ui/") && name != "x-ui" {
|
||||
|
||||
+159
-159
@@ -1,159 +1,159 @@
|
||||
:root {
|
||||
--bg: #f6f7f9;
|
||||
--panel: #ffffff;
|
||||
--text: #1c2128;
|
||||
--muted: #6b7280;
|
||||
--border: #dfe3e8;
|
||||
--accent: #2f6fde;
|
||||
--accent-text: #ffffff;
|
||||
--ok: #1f8a4c;
|
||||
--ok-bg: #e3f4ea;
|
||||
--warn: #9a6400;
|
||||
--warn-bg: #fdf1d8;
|
||||
--fail: #c0362c;
|
||||
--fail-bg: #fbe5e3;
|
||||
--code-bg: #eef1f5;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--bg: #14171c;
|
||||
--panel: #1c2027;
|
||||
--text: #e4e7eb;
|
||||
--muted: #9aa3ae;
|
||||
--border: #2e343d;
|
||||
--accent: #5b8ff0;
|
||||
--ok: #4cc27f;
|
||||
--ok-bg: #18342a;
|
||||
--warn: #e0ad4a;
|
||||
--warn-bg: #3a2f17;
|
||||
--fail: #f07167;
|
||||
--fail-bg: #3d1f1d;
|
||||
--code-bg: #232831;
|
||||
}
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
||||
}
|
||||
a { color: var(--accent); text-decoration: none; }
|
||||
a:hover { text-decoration: underline; }
|
||||
code, pre { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
|
||||
code { background: var(--code-bg); padding: 1px 5px; border-radius: 4px; }
|
||||
|
||||
.top { background: var(--panel); border-bottom: 1px solid var(--border); }
|
||||
/* шапка выровнена по той же колонке, что и контент */
|
||||
.top .wrap {
|
||||
max-width: 1200px; margin: 0 auto; padding: 10px 24px;
|
||||
display: flex; align-items: center; justify-content: space-between; gap: 16px;
|
||||
}
|
||||
.brand { font-weight: 600; color: var(--text); }
|
||||
.top nav { display: flex; align-items: center; gap: 18px; }
|
||||
.top nav a { color: var(--muted); }
|
||||
.top nav a.active { color: var(--text); font-weight: 500; }
|
||||
|
||||
main { max-width: 1200px; margin: 0 auto; padding: 24px; }
|
||||
h1 { font-size: 24px; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
|
||||
h2 { font-size: 18px; margin: 32px 0 12px; }
|
||||
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
|
||||
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
|
||||
.muted { color: var(--muted); }
|
||||
.small { font-size: 13px; }
|
||||
.right { text-align: right; }
|
||||
.empty { color: var(--muted); padding: 24px 0; }
|
||||
.hint { color: var(--muted); font-size: 13px; margin: 4px 0 12px; }
|
||||
|
||||
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
|
||||
table { width: 100%; border-collapse: collapse; }
|
||||
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
|
||||
th { font-size: 13px; font-weight: 500; color: var(--muted); }
|
||||
tr:last-child td { border-bottom: none; }
|
||||
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
||||
|
||||
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 500; white-space: nowrap; }
|
||||
.badge.ok { background: var(--ok-bg); color: var(--ok); }
|
||||
.badge.stale, .badge.never { background: var(--warn-bg); color: var(--warn); }
|
||||
.badge.fail { background: var(--fail-bg); color: var(--fail); }
|
||||
.badge.off { background: var(--code-bg); color: var(--muted); }
|
||||
.ok-text { color: var(--ok); }
|
||||
.fail-text { color: var(--fail); }
|
||||
ul.results { list-style: none; padding: 0; margin: 0 0 16px; }
|
||||
|
||||
.facts { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 16px 0; }
|
||||
.facts dt { font-size: 12px; color: var(--muted); }
|
||||
.facts dd { margin: 0; }
|
||||
|
||||
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 20px; }
|
||||
.card.narrow, .login { max-width: 520px; }
|
||||
.card h2:first-of-type { margin-top: 0; }
|
||||
label { display: block; margin-bottom: 12px; font-size: 14px; }
|
||||
label.check { display: flex; align-items: center; gap: 8px; }
|
||||
input, textarea {
|
||||
display: block; width: 100%; margin-top: 4px; padding: 7px 10px;
|
||||
background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; font: inherit;
|
||||
}
|
||||
input[type=checkbox] { display: inline; width: auto; margin: 0; }
|
||||
textarea { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
|
||||
.settings { display: flex; flex-direction: column; gap: 16px; }
|
||||
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
|
||||
.cards .card { height: 100%; }
|
||||
|
||||
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
|
||||
.toolbar input[type=search] { flex: 1 1 260px; width: auto; margin: 0; }
|
||||
.toolbar select { margin: 0; }
|
||||
select {
|
||||
padding: 7px 10px; background: var(--bg); color: var(--text);
|
||||
border: 1px solid var(--border); border-radius: 6px; font: inherit;
|
||||
}
|
||||
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
.chip {
|
||||
display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 14px;
|
||||
border: 1px solid var(--border); color: var(--muted); font-size: 13px; white-space: nowrap;
|
||||
}
|
||||
.chip:hover { text-decoration: none; color: var(--text); }
|
||||
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
|
||||
.chip .count { opacity: 0.75; font-variant-numeric: tabular-nums; }
|
||||
th a { color: inherit; }
|
||||
th a.sorted { color: var(--text); }
|
||||
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; color: var(--muted); font-size: 13px; }
|
||||
.pager .pages { display: flex; gap: 4px; flex-wrap: wrap; }
|
||||
.pager .pages a, .pager .pages span { min-width: 32px; text-align: center; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border); }
|
||||
.pager .pages span.current { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
|
||||
.pager .pages span.gap { border: none; }
|
||||
|
||||
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 16px; }
|
||||
|
||||
button, .button {
|
||||
display: inline-block; padding: 7px 14px; border-radius: 6px; border: 1px solid var(--border);
|
||||
background: var(--panel); color: var(--text); font: inherit; cursor: pointer;
|
||||
}
|
||||
button:hover, .button:hover { text-decoration: none; filter: brightness(0.97); }
|
||||
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
|
||||
button:disabled { opacity: 0.5; cursor: not-allowed; }
|
||||
button.link { background: none; border: none; padding: 0; color: var(--muted); }
|
||||
button.danger { background: var(--fail-bg); border-color: var(--fail-bg); color: var(--fail); }
|
||||
button.link.danger { background: none; }
|
||||
form.inline { display: inline; }
|
||||
|
||||
.error { background: var(--fail-bg); color: var(--fail); padding: 10px 14px; border-radius: 6px; }
|
||||
.warnings { background: var(--warn-bg); color: var(--warn); padding: 10px 14px; border-radius: 6px; margin: 12px 0; }
|
||||
.warnings ul { margin: 8px 0 0; padding-left: 20px; font-size: 13px; }
|
||||
.danger-zone { margin-top: 32px; color: var(--muted); }
|
||||
.danger-zone form { margin-top: 12px; max-width: 420px; }
|
||||
.danger-zone input { margin-bottom: 8px; }
|
||||
|
||||
.cmd { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0; }
|
||||
.cmd pre { flex: 1; margin: 0; padding: 12px; background: var(--code-bg); border-radius: 6px; white-space: pre-wrap; word-break: break-all; }
|
||||
pre.json { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 16px; overflow-x: auto; }
|
||||
|
||||
.login { margin: 10vh auto; }
|
||||
.login form { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 20px; }
|
||||
|
||||
@media (max-width: 640px) {
|
||||
main { padding: 16px; }
|
||||
.top .wrap { padding: 10px 16px; }
|
||||
.cards { grid-template-columns: 1fr; }
|
||||
.cmd { flex-direction: column; }
|
||||
}
|
||||
:root {
|
||||
--bg: #f6f7f9;
|
||||
--panel: #ffffff;
|
||||
--text: #1c2128;
|
||||
--muted: #6b7280;
|
||||
--border: #dfe3e8;
|
||||
--accent: #2f6fde;
|
||||
--accent-text: #ffffff;
|
||||
--ok: #1f8a4c;
|
||||
--ok-bg: #e3f4ea;
|
||||
--warn: #9a6400;
|
||||
--warn-bg: #fdf1d8;
|
||||
--fail: #c0362c;
|
||||
--fail-bg: #fbe5e3;
|
||||
--code-bg: #eef1f5;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--bg: #14171c;
|
||||
--panel: #1c2027;
|
||||
--text: #e4e7eb;
|
||||
--muted: #9aa3ae;
|
||||
--border: #2e343d;
|
||||
--accent: #5b8ff0;
|
||||
--ok: #4cc27f;
|
||||
--ok-bg: #18342a;
|
||||
--warn: #e0ad4a;
|
||||
--warn-bg: #3a2f17;
|
||||
--fail: #f07167;
|
||||
--fail-bg: #3d1f1d;
|
||||
--code-bg: #232831;
|
||||
}
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
||||
}
|
||||
a { color: var(--accent); text-decoration: none; }
|
||||
a:hover { text-decoration: underline; }
|
||||
code, pre { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
|
||||
code { background: var(--code-bg); padding: 1px 5px; border-radius: 4px; }
|
||||
|
||||
.top { background: var(--panel); border-bottom: 1px solid var(--border); }
|
||||
/* шапка выровнена по той же колонке, что и контент */
|
||||
.top .wrap {
|
||||
max-width: 1200px; margin: 0 auto; padding: 10px 24px;
|
||||
display: flex; align-items: center; justify-content: space-between; gap: 16px;
|
||||
}
|
||||
.brand { font-weight: 600; color: var(--text); }
|
||||
.top nav { display: flex; align-items: center; gap: 18px; }
|
||||
.top nav a { color: var(--muted); }
|
||||
.top nav a.active { color: var(--text); font-weight: 500; }
|
||||
|
||||
main { max-width: 1200px; margin: 0 auto; padding: 24px; }
|
||||
h1 { font-size: 24px; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
|
||||
h2 { font-size: 18px; margin: 32px 0 12px; }
|
||||
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
|
||||
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
|
||||
.muted { color: var(--muted); }
|
||||
.small { font-size: 13px; }
|
||||
.right { text-align: right; }
|
||||
.empty { color: var(--muted); padding: 24px 0; }
|
||||
.hint { color: var(--muted); font-size: 13px; margin: 4px 0 12px; }
|
||||
|
||||
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
|
||||
table { width: 100%; border-collapse: collapse; }
|
||||
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
|
||||
th { font-size: 13px; font-weight: 500; color: var(--muted); }
|
||||
tr:last-child td { border-bottom: none; }
|
||||
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
||||
|
||||
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 500; white-space: nowrap; }
|
||||
.badge.ok { background: var(--ok-bg); color: var(--ok); }
|
||||
.badge.stale, .badge.never { background: var(--warn-bg); color: var(--warn); }
|
||||
.badge.fail { background: var(--fail-bg); color: var(--fail); }
|
||||
.badge.off { background: var(--code-bg); color: var(--muted); }
|
||||
.ok-text { color: var(--ok); }
|
||||
.fail-text { color: var(--fail); }
|
||||
ul.results { list-style: none; padding: 0; margin: 0 0 16px; }
|
||||
|
||||
.facts { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 16px 0; }
|
||||
.facts dt { font-size: 12px; color: var(--muted); }
|
||||
.facts dd { margin: 0; }
|
||||
|
||||
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 20px; }
|
||||
.card.narrow, .login { max-width: 520px; }
|
||||
.card h2:first-of-type { margin-top: 0; }
|
||||
label { display: block; margin-bottom: 12px; font-size: 14px; }
|
||||
label.check { display: flex; align-items: center; gap: 8px; }
|
||||
input, textarea {
|
||||
display: block; width: 100%; margin-top: 4px; padding: 7px 10px;
|
||||
background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; font: inherit;
|
||||
}
|
||||
input[type=checkbox] { display: inline; width: auto; margin: 0; }
|
||||
textarea { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
|
||||
.settings { display: flex; flex-direction: column; gap: 16px; }
|
||||
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
|
||||
.cards .card { height: 100%; }
|
||||
|
||||
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
|
||||
.toolbar input[type=search] { flex: 1 1 260px; width: auto; margin: 0; }
|
||||
.toolbar select { margin: 0; }
|
||||
select {
|
||||
padding: 7px 10px; background: var(--bg); color: var(--text);
|
||||
border: 1px solid var(--border); border-radius: 6px; font: inherit;
|
||||
}
|
||||
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
.chip {
|
||||
display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 14px;
|
||||
border: 1px solid var(--border); color: var(--muted); font-size: 13px; white-space: nowrap;
|
||||
}
|
||||
.chip:hover { text-decoration: none; color: var(--text); }
|
||||
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
|
||||
.chip .count { opacity: 0.75; font-variant-numeric: tabular-nums; }
|
||||
th a { color: inherit; }
|
||||
th a.sorted { color: var(--text); }
|
||||
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; color: var(--muted); font-size: 13px; }
|
||||
.pager .pages { display: flex; gap: 4px; flex-wrap: wrap; }
|
||||
.pager .pages a, .pager .pages span { min-width: 32px; text-align: center; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border); }
|
||||
.pager .pages span.current { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
|
||||
.pager .pages span.gap { border: none; }
|
||||
|
||||
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 16px; }
|
||||
|
||||
button, .button {
|
||||
display: inline-block; padding: 7px 14px; border-radius: 6px; border: 1px solid var(--border);
|
||||
background: var(--panel); color: var(--text); font: inherit; cursor: pointer;
|
||||
}
|
||||
button:hover, .button:hover { text-decoration: none; filter: brightness(0.97); }
|
||||
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
|
||||
button:disabled { opacity: 0.5; cursor: not-allowed; }
|
||||
button.link { background: none; border: none; padding: 0; color: var(--muted); }
|
||||
button.danger { background: var(--fail-bg); border-color: var(--fail-bg); color: var(--fail); }
|
||||
button.link.danger { background: none; }
|
||||
form.inline { display: inline; }
|
||||
|
||||
.error { background: var(--fail-bg); color: var(--fail); padding: 10px 14px; border-radius: 6px; }
|
||||
.warnings { background: var(--warn-bg); color: var(--warn); padding: 10px 14px; border-radius: 6px; margin: 12px 0; }
|
||||
.warnings ul { margin: 8px 0 0; padding-left: 20px; font-size: 13px; }
|
||||
.danger-zone { margin-top: 32px; color: var(--muted); }
|
||||
.danger-zone form { margin-top: 12px; max-width: 420px; }
|
||||
.danger-zone input { margin-bottom: 8px; }
|
||||
|
||||
.cmd { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0; }
|
||||
.cmd pre { flex: 1; margin: 0; padding: 12px; background: var(--code-bg); border-radius: 6px; white-space: pre-wrap; word-break: break-all; }
|
||||
pre.json { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 16px; overflow-x: auto; }
|
||||
|
||||
.login { margin: 10vh auto; }
|
||||
.login form { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 20px; }
|
||||
|
||||
@media (max-width: 640px) {
|
||||
main { padding: 16px; }
|
||||
.top .wrap { padding: 10px 16px; }
|
||||
.cards { grid-template-columns: 1fr; }
|
||||
.cmd { flex-direction: column; }
|
||||
}
|
||||
Reference in new issue
Block a user