atproto pds in zig
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376pub const favicon = \\<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"> \\ <rect width="64" height="64" rx="14" fill="#070807"/> \\ <path d="M14 38h13l7-12h16" fill="none" stroke="#91adff" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/> \\ <path d="M15 48h34" fill="none" stroke="#39c178" stroke-width="5" stroke-linecap="round"/> \\ <circle cx="21" cy="23" r="6" fill="#f05f8e"/> \\</svg>;
pub const og_image = @embedFile("og-image.png");
pub const css = \\:root { \\ --bg: #070807; --panel: #101210; --panel-2: #151915; --line: #273026; \\ --text: #f0f1ec; --muted: #aaa69b; --dim: #69645c; --accent: #91adff; \\ --green: #39c178; --pink: #f05f8e; --focus: #c9d7ff; --glass: rgba(255,255,255,.085); \\ --glass-a: #39c178; --glass-b: #91adff; --glass-c: #f05f8e; --glass-d: #f5d85d; \\ --accent-bg: color-mix(in srgb, var(--glass-a) 13%, var(--bg)); \\ --accent-panel: color-mix(in srgb, var(--glass-a) 9%, var(--panel)); \\ --accent-panel-2: color-mix(in srgb, var(--glass-b) 8%, var(--panel-2)); \\ color-scheme: dark; \\} \\html[data-theme="dark"] { \\ --bg: #070807; --panel: #101210; --panel-2: #151915; --line: #273026; \\ --text: #f0f1ec; --muted: #aaa69b; --dim: #69645c; --accent: #91adff; \\ --green: #39c178; --pink: #f05f8e; --focus: #c9d7ff; --glass: rgba(255,255,255,.085); \\ --glass-a: #39c178; --glass-b: #91adff; --glass-c: #f05f8e; --glass-d: #f5d85d; \\ --accent-bg: color-mix(in srgb, var(--glass-a) 13%, var(--bg)); \\ --accent-panel: color-mix(in srgb, var(--glass-a) 9%, var(--panel)); \\ --accent-panel-2: color-mix(in srgb, var(--glass-b) 8%, var(--panel-2)); \\ color-scheme: dark; \\} \\@media (prefers-color-scheme: light) { \\ :root { \\ --bg: #f6f4ed; --panel: #fffdf7; --panel-2: #ece8dd; --line: #d8d0c0; \\ --text: #161412; --muted: #625c53; --dim: #8f8679; --accent: #315dcb; \\ --green: #1b7340; --pink: #b72e5c; --focus: #163f9f; --glass: rgba(255,255,255,.72); \\ --glass-a: #1b7340; --glass-b: #315dcb; --glass-c: #b72e5c; --glass-d: #b88713; \\ --accent-bg: color-mix(in srgb, var(--glass-a) 11%, var(--bg)); \\ --accent-panel: color-mix(in srgb, var(--glass-a) 5%, var(--panel)); \\ --accent-panel-2: color-mix(in srgb, var(--glass-b) 5%, var(--panel-2)); color-scheme: light; \\ } \\} \\html[data-theme="light"] { \\ --bg: #f6f4ed; --panel: #fffdf7; --panel-2: #ece8dd; --line: #d8d0c0; \\ --text: #161412; --muted: #625c53; --dim: #8f8679; --accent: #315dcb; \\ --green: #1b7340; --pink: #b72e5c; --focus: #163f9f; --glass: rgba(255,255,255,.72); \\ --glass-a: #1b7340; --glass-b: #315dcb; --glass-c: #b72e5c; --glass-d: #b88713; \\ --accent-bg: color-mix(in srgb, var(--glass-a) 11%, var(--bg)); \\ --accent-panel: color-mix(in srgb, var(--glass-a) 5%, var(--panel)); \\ --accent-panel-2: color-mix(in srgb, var(--glass-b) 5%, var(--panel-2)); \\ color-scheme: light; \\} \\* { box-sizing: border-box; } \\html { min-height: 100%; background: var(--accent-bg); overflow-x: hidden; } \\body { \\ position: relative; margin: 0; min-height: 100vh; overflow-x: hidden; background: \\ radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--signal-a, var(--green)) 15%, transparent), transparent 35%), \\ radial-gradient(circle at 94% 18%, color-mix(in srgb, var(--signal-b, var(--accent)) 13%, transparent), transparent 32%), \\ linear-gradient(135deg, var(--accent-bg), var(--bg) 58%); \\ color: var(--text); \\ font: 15px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; \\} \\body::before, body::after { \\ content: ""; position: fixed; inset: -18vmax; z-index: 0; pointer-events: none; \\} \\body::before { \\ background: \\ linear-gradient(108deg, transparent 0 22%, rgba(255,255,255,.10) 24%, transparent 27% 52%, rgba(255,255,255,.055) 54%, transparent 58%), \\ linear-gradient(72deg, transparent 0 38%, color-mix(in srgb, var(--signal-b, var(--accent)) 11%, transparent) 44%, transparent 52%); \\ filter: blur(20px) saturate(1.15); opacity: .7; transform: translate3d(-4%, 0, 0) rotate(-4deg); \\ animation: light-drift 18s ease-in-out infinite alternate; \\} \\body::after { \\ background: \\ radial-gradient(ellipse at 22% 32%, rgba(255,255,255,.09), transparent 28%), \\ radial-gradient(ellipse at 72% 18%, color-mix(in srgb, var(--signal-a, var(--green)) 14%, transparent), transparent 31%), \\ radial-gradient(ellipse at 66% 78%, color-mix(in srgb, var(--signal-c, var(--pink)) 12%, transparent), transparent 30%); \\ filter: blur(34px); opacity: .52; animation: frost-breathe 24s ease-in-out infinite alternate; \\} \\@keyframes light-drift { \\ from { transform: translate3d(-5%, -1%, 0) rotate(-5deg) scale(1.02); } \\ to { transform: translate3d(5%, 2%, 0) rotate(4deg) scale(1.08); } \\} \\@keyframes frost-breathe { \\ from { transform: translate3d(0, -2%, 0) scale(1); opacity: .42; } \\ to { transform: translate3d(-2%, 2%, 0) scale(1.06); opacity: .64; } \\} \\a { color: inherit; } \\a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; } \\.shell { position: relative; z-index: 1; width: min(100%, 780px); margin: 0 auto; padding: 18px 16px 34px; } \\header { \\ position: relative; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px; \\ min-height: 50px; margin: 0 0 26px; padding: 8px 0; \\ background: transparent; \\ color: var(--muted); font-size: 12px; \\} \\.brand { flex: 0 0 auto; display: inline-flex; align-items: center; color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px; letter-spacing: 0; } \\.brand:hover { opacity: 0.82; } \\nav { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding: 4px; border: 1px solid color-mix(in srgb, var(--line) 58%, white 14%); border-radius: 18px; background: \\ linear-gradient(110deg, rgba(255,255,255,.16), transparent 22% 76%, rgba(255,255,255,.08)), \\ radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--signal-a, var(--green)) 12%, transparent), transparent 46%), \\ color-mix(in srgb, var(--accent-panel) 72%, transparent); \\ box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -18px 42px rgba(255,255,255,.035), 0 8px 28px rgba(0,0,0,.12); \\ backdrop-filter: blur(26px) saturate(1.26); -webkit-backdrop-filter: blur(26px) saturate(1.26); } \\nav a, .settings { color: var(--muted); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; } \\nav a:hover, .settings:hover { color: var(--text); } \\.icon-link, .settings { \\ position: relative; width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid color-mix(in srgb, var(--line) 74%, white 10%); \\ border-radius: 12px; background: \\ radial-gradient(circle at 30% 18%, rgba(255,255,255,.22), transparent 32%), \\ linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.03)), \\ color-mix(in srgb, var(--accent-panel) 74%, transparent); \\ box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -10px 24px rgba(255,255,255,.045), 0 10px 28px rgba(0,0,0,.18); \\ transition: color 0.12s, border-color 0.12s, background 0.12s, transform 0.12s; \\} \\.logo-link::after { \\ content: ""; position: absolute; inset: 5px; border-radius: 9px; \\ background: color-mix(in srgb, var(--glass) 62%, var(--accent-panel)); \\ box-shadow: inset 0 1px 0 rgba(255,255,255,.18); \\} \\.icon-link img { position: relative; z-index: 1; width: 22px; height: 22px; object-fit: contain; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); } \\.icon-link svg, .settings svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } \\.icon-link:hover, .settings:hover { border-color: color-mix(in srgb, var(--signal-a, var(--green)) 55%, var(--line)); background: color-mix(in srgb, var(--accent-panel-2) 86%, transparent); transform: translateY(-1px); } \\.settings { flex: 0 0 auto; margin-left: 2px; } \\.hero { margin: 52px 0 24px; } \\h1 { margin: 0; color: var(--text); font-size: clamp(36px, 11vw, 74px); line-height: 0.95; letter-spacing: 0; } \\.lede { margin: 14px 0 0; max-width: 47ch; color: var(--muted); font-size: 15px; } \\.lede a, .lede code { color: var(--green); } \\.entropy { width: min(100%, 330px); min-height: 76px; margin-top: 19px; display: grid; gap: 6px; } \\.entropy-label { color: var(--muted); font-size: 10px; } \\.entropy-bars { \\ position: relative; display: flex; align-items: end; gap: 4px; min-height: 43px; padding-bottom: 5px; \\ border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent); \\} \\.entropy-bars::before { \\ content: ""; position: absolute; left: 0; right: 0; bottom: 14px; height: 1px; \\ background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--line) 65%, transparent), transparent); \\ opacity: .8; \\} \\.entropy-bars i { \\ position: relative; flex: 1 1 0; min-width: 5px; height: var(--h); min-height: 6px; \\ border-radius: 999px 999px 2px 2px; background: \\ linear-gradient(180deg, var(--glass-d) 0%, var(--glass-a) 42%, var(--glass-b) 72%, var(--glass-c) 100%); \\ box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 5px 18px color-mix(in srgb, var(--glass-b) 18%, transparent); \\ transform: translateY(var(--y)); opacity: .78; \\ transition: opacity .16s ease, transform .16s ease, filter .16s ease; \\} \\.entropy-bars i:hover { opacity: 1; transform: translateY(-3px); filter: saturate(1.18) brightness(1.05); } \\.entropy-bars i:hover::after { \\ content: attr(data-label); position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 2; \\ width: max-content; max-width: min(72vw, 260px); padding: 5px 7px; border: 1px solid var(--line); \\ border-radius: 8px; background: color-mix(in srgb, var(--panel) 94%, transparent); color: var(--text); \\ font-size: 10px; line-height: 1.25; white-space: normal; transform: translateX(-50%); \\ box-shadow: 0 12px 28px rgba(0,0,0,.22); \\} \\.entropy-axis { display: flex; justify-content: space-between; color: var(--dim); font-size: 9px; } \\.signal-empty { color: var(--dim); font-size: 11px; } \\@media (prefers-reduced-motion: reduce) { \\ body::before, body::after { animation: none; } \\ .entropy-label, .entropy-bars i { transition: none; } \\} \\.pulse { \\ margin: 0 0 30px; padding: 14px; \\ position: relative; border: 1px solid color-mix(in srgb, var(--line) 60%, white 10%); border-radius: 12px; background: \\ linear-gradient(112deg, rgba(255,255,255,.105), transparent 18% 72%, rgba(255,255,255,.055)), \\ linear-gradient(135deg, color-mix(in srgb, var(--signal-a, var(--green)) 12%, transparent), transparent 46%), \\ linear-gradient(315deg, color-mix(in srgb, var(--signal-c, var(--pink)) 10%, transparent), transparent 44%), \\ color-mix(in srgb, var(--accent-panel) 72%, transparent); \\ overflow: hidden; max-width: 100%; backdrop-filter: blur(24px) saturate(1.18); -webkit-backdrop-filter: blur(24px) saturate(1.18); \\ box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 -24px 60px rgba(255,255,255,.035), 0 20px 54px rgba(0,0,0,.16); \\} \\.pulse > div { min-width: 0; } \\.pulse-kicker { color: var(--dim); font-size: 11px; text-transform: lowercase; } \\.pulse-row { display: flex; align-items: center; gap: 10px; min-width: 0; } \\.pulse-path { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); } \\.pulse-path code { color: var(--accent); } \\.pulse-link { \\ display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; \\ max-width: 100%; margin-top: 3px; color: var(--text); text-decoration: none; \\ overflow-wrap: anywhere; word-break: break-word; line-height: 1.35; \\} \\.pulse-link span { min-width: 0; } \\.pulse-link:hover code { color: var(--green); } \\.pulse-link code { color: var(--accent); } \\.pulse-link em { justify-self: end; color: var(--dim); font-size: 10px; font-style: normal; white-space: nowrap; } \\.pulse-link:hover em { color: var(--muted); } \\.pulse-cid { color: var(--dim); font-size: 11px; overflow-wrap: anywhere; word-break: break-word; line-height: 1.35; } \\.grid { display: grid; gap: 28px; } \\section { margin-top: 0; } \\.section-title { margin: 0 0 10px; color: var(--dim); font-size: 12px; font-weight: 400; text-transform: lowercase; } \\.residents { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); } \\.resident a { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 11px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; } \\.resident a:hover .handle { color: var(--accent); } \\.avatar { \\ width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); \\ border-radius: 8px; background: linear-gradient(135deg, var(--accent-panel-2), color-mix(in srgb, var(--green) 18%, var(--accent-panel))); \\ color: var(--text); text-transform: lowercase; overflow: hidden; \\} \\.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; } \\.who { min-width: 0; } \\.handle, .did { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } \\.handle { color: var(--text); font-size: 14px; } \\.did { color: var(--dim); font-size: 11px; } \\.meta { grid-column: 2; display: flex; align-items: center; gap: 9px; color: var(--dim); font-size: 11px; line-height: 1; } \\.meta span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; } \\.meta span + span::before { content: ""; width: 4px; height: 4px; border-radius: 999px; background: var(--line); } \\.collections { display: grid; gap: 7px; list-style: none; margin: 0; padding: 0; } \\.collection { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 0 10px; border-bottom: 1px solid var(--line); overflow: hidden; } \\.collection a { min-width: 0; color: var(--text); text-decoration: none; } \\.collection a:hover { color: var(--accent); } \\.collection code { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; } \\.collection span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; } \\.collection i { position: absolute; left: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--glass-c) 0%, var(--glass-b) 48%, var(--glass-a) 100%); } \\.empty { color: var(--muted); margin: 0; } \\.sheet { position: fixed; inset: 0; z-index: 20; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.42); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); } \\.sheet.open { display: flex; } \\.sheet-card { width: min(100%, 440px); border: 1px solid color-mix(in srgb, var(--line) 80%, white 8%); border-radius: 18px; background: \\ radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--green) 16%, transparent), transparent 34%), \\ linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.035)), \\ color-mix(in srgb, var(--accent-bg) 90%, transparent); \\ box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 24px 80px rgba(0, 0, 0, 0.42); overflow: hidden; backdrop-filter: blur(22px) saturate(1.16); -webkit-backdrop-filter: blur(22px) saturate(1.16); } \\.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px 12px; border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent); } \\.sheet-head h2 { margin: 0; font-size: 13px; font-weight: 600; text-transform: lowercase; } \\.close { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid color-mix(in srgb, var(--line) 76%, transparent); border-radius: 999px; background: \\ radial-gradient(circle at 28% 18%, rgba(255,255,255,.18), transparent 32%), \\ color-mix(in srgb, var(--accent-panel) 72%, transparent); color: var(--muted); cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); } \\.close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; } \\.close:hover { color: var(--text); border-color: color-mix(in srgb, var(--green) 50%, var(--line)); } \\.system-links { display: grid; gap: 9px; } \\.system-links a { display: grid; gap: 2px; padding: 11px 12px; border: 1px solid color-mix(in srgb, var(--line) 80%, white 5%); border-radius: 12px; background: color-mix(in srgb, var(--accent-panel) 72%, transparent); text-decoration: none; } \\.system-links a:hover { border-color: color-mix(in srgb, var(--signal-a, var(--green)) 56%, var(--line)); } \\.system-links strong { color: var(--text); font-size: 12px; } \\.system-links span { color: var(--dim); font-size: 11px; } \\.client-body { padding: 15px 16px 17px; } \\.hint { margin: 0 0 12px; color: var(--dim); font-size: 11px; } \\.pref-section { display: grid; gap: 10px; margin-bottom: 16px; } \\.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; } \\.pref-label { color: var(--dim); font-size: 11px; text-transform: lowercase; } \\#accent-value { color: var(--dim); font-size: 11px; } \\.hue-slider { width: 100%; margin: 0; accent-color: var(--glass-a); cursor: pointer; } \\.hue-slider::-webkit-slider-runnable-track { \\ height: 10px; border: 1px solid color-mix(in srgb, var(--line) 80%, white 8%); border-radius: 999px; \\ background: linear-gradient(90deg, hsl(0 80% 62%), hsl(60 82% 62%), hsl(120 76% 56%), hsl(180 78% 58%), hsl(240 82% 68%), hsl(300 78% 64%), hsl(360 80% 62%)); \\} \\.hue-slider::-webkit-slider-thumb { \\ appearance: none; width: 20px; height: 20px; margin-top: -6px; border: 1px solid rgba(255,255,255,.42); \\ border-radius: 999px; background: var(--glass-a); box-shadow: 0 3px 12px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.34); \\} \\.hue-slider::-moz-range-track { \\ height: 10px; border: 1px solid color-mix(in srgb, var(--line) 80%, white 8%); border-radius: 999px; \\ background: linear-gradient(90deg, hsl(0 80% 62%), hsl(60 82% 62%), hsl(120 76% 56%), hsl(180 78% 58%), hsl(240 82% 68%), hsl(300 78% 64%), hsl(360 80% 62%)); \\} \\.hue-slider::-moz-range-thumb { \\ width: 18px; height: 18px; border: 1px solid rgba(255,255,255,.42); border-radius: 999px; \\ background: var(--glass-a); box-shadow: 0 3px 12px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.34); \\} \\.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } \\.theme-option { min-height: 42px; border: 1px solid color-mix(in srgb, var(--line) 82%, white 6%); border-radius: 12px; background: color-mix(in srgb, var(--accent-panel) 72%, transparent); color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.10); } \\.theme-option:hover, .theme-option.active { color: var(--text); border-color: color-mix(in srgb, var(--signal-a, var(--green)) 62%, var(--line)); } \\.theme-option.active { background: linear-gradient(145deg, color-mix(in srgb, var(--signal-a, var(--green)) 18%, transparent), color-mix(in srgb, var(--signal-b, var(--accent)) 8%, transparent)), color-mix(in srgb, var(--accent-panel) 82%, transparent); } \\.client-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 9px; } \\.client { display: grid; justify-items: center; gap: 8px; min-height: 82px; padding: 11px 8px 10px; border: 1px solid color-mix(in srgb, var(--line) 82%, white 6%); border-radius: 13px; background: \\ radial-gradient(circle at 30% 18%, rgba(255,255,255,.14), transparent 34%), \\ linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.025)), \\ color-mix(in srgb, var(--accent-panel) 78%, transparent); \\ color: var(--muted); font: inherit; font-size: 10px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); } \\.client:hover, .client.active { color: var(--text); border-color: color-mix(in srgb, var(--green) 65%, var(--line)); } \\.client.active { background: \\ linear-gradient(145deg, color-mix(in srgb, var(--green) 20%, transparent), color-mix(in srgb, var(--accent) 8%, transparent)), \\ color-mix(in srgb, var(--accent-panel) 82%, transparent); } \\.client-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--glass) 62%, var(--accent-panel)); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 6px 18px rgba(0,0,0,.16); } \\.client img { width: 25px; height: 25px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.28)); } \\.client span:last-child { white-space: nowrap; } \\@media (min-width: 680px) { \\ .shell { padding-top: 24px; } \\ nav { gap: 8px; } \\ .pulse-link, .pulse-cid { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal; } \\ .grid { grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr); align-items: start; } \\ .resident a { grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; } \\ .meta { grid-column: auto; justify-content: flex-end; } \\} \\@media (max-width: 430px) { \\ .shell { padding-left: 14px; padding-right: 14px; } \\ header { gap: 8px; } \\ nav { gap: 4px; padding: 3px; border-radius: 16px; } \\ .icon-link, .settings { width: 32px; height: 32px; border-radius: 10px; } \\ .logo-link::after { inset: 5px; border-radius: 8px; } \\ .icon-link img { width: 20px; height: 20px; } \\ .entropy { width: min(100%, 250px); min-height: 68px; } \\ .entropy-bars { gap: 3px; min-height: 36px; } \\ .entropy-bars i:hover::after { display: none; } \\};
pub const script = \\(function() { \\ var key = 'zds.preferredClient'; \\ var themeKey = 'zds.theme'; \\ var accentKey = 'zds.accentHue'; \\ var clients = [ \\ { value: 'bsky', label: 'Bluesky', icon: 'https://web-cdn.bsky.app/static/apple-touch-icon.png', url: function(handle, did) { return 'https://bsky.app/profile/' + handle; } }, \\ { value: 'blacksky', label: 'Blacksky', icon: 'https://blacksky.community/static/apple-touch-icon.png', url: function(handle, did) { return 'https://blacksky.community/profile/' + handle; } }, \\ { value: 'witchsky', label: 'Witchsky', icon: 'https://witchsky.app/favicon.ico', url: function(handle, did) { return 'https://witchsky.app/profile/' + handle; } }, \\ { value: 'reddwarf', label: 'Red Dwarf', icon: 'https://reddwarf.app/redstar.png', url: function(handle, did) { return 'https://reddwarf.app/profile/' + handle; } }, \\ { value: 'pdsls', label: 'PDSls', icon: 'https://pdsls.dev/favicon.ico', url: function(handle, did) { return 'https://pdsls.dev/at/' + did + '/app.bsky.actor.profile/self'; } }, \\ { value: 'atme', label: '@me', icon: 'https://at-me.zzstoatzz.io/favicon.svg', url: function(handle, did) { return 'https://at-me.zzstoatzz.io/view/?handle=' + encodeURIComponent(handle); } } \\ ]; \\ function read() { try { return localStorage.getItem(key); } catch (_) { return null; } } \\ function write(value) { try { localStorage.setItem(key, value); } catch (_) {} } \\ function readTheme() { try { return localStorage.getItem(themeKey) || 'system'; } catch (_) { return 'system'; } } \\ function writeTheme(value) { try { value === 'system' ? localStorage.removeItem(themeKey) : localStorage.setItem(themeKey, value); } catch (_) {} } \\ function readAccent() { try { return localStorage.getItem(accentKey) || '154'; } catch (_) { return '154'; } } \\ function writeAccent(value) { try { localStorage.setItem(accentKey, value); } catch (_) {} } \\ function clampHue(value) { \\ var hue = Number(value); \\ if (!Number.isFinite(hue)) hue = 154; \\ return ((Math.round(hue) % 360) + 360) % 360; \\ } \\ function hsl(hue, saturation, lightness) { return 'hsl(' + clampHue(hue) + ' ' + saturation + '% ' + lightness + '%)'; } \\ function applyAccent(value) { \\ var hue = clampHue(value); \\ document.documentElement.style.setProperty('--glass-a', hsl(hue, 72, 58)); \\ document.documentElement.style.setProperty('--glass-b', hsl(hue + 76, 84, 72)); \\ document.documentElement.style.setProperty('--glass-c', hsl(hue + 144, 78, 66)); \\ document.documentElement.style.setProperty('--glass-d', hsl(hue + 214, 82, 68)); \\ document.documentElement.style.setProperty('--signal-a', hsl(hue, 72, 58)); \\ document.documentElement.style.setProperty('--signal-b', hsl(hue + 76, 84, 72)); \\ document.documentElement.style.setProperty('--signal-c', hsl(hue + 144, 78, 66)); \\ var slider = document.getElementById('accent-hue'); \\ var output = document.getElementById('accent-value'); \\ if (slider) slider.value = String(hue); \\ if (output) output.textContent = String(hue) + 'deg'; \\ } \\ function applyTheme(value) { \\ if (value === 'light' || value === 'dark') document.documentElement.dataset.theme = value; \\ else delete document.documentElement.dataset.theme; \\ document.querySelectorAll('.theme-option').forEach(function(btn) { btn.classList.toggle('active', btn.dataset.theme === value); }); \\ } \\ function preferred() { var value = read(); return clients.find(function(c) { return c.value === value; }) || clients[0]; } \\ function syncLinks() { \\ var client = preferred(); \\ document.querySelectorAll('[data-profile-handle]').forEach(function(a) { \\ a.href = client.url(a.getAttribute('data-profile-handle'), a.getAttribute('data-profile-did')); \\ a.title = 'open in ' + client.label; \\ }); \\ document.querySelectorAll('.client').forEach(function(btn) { btn.classList.toggle('active', btn.dataset.client === client.value); }); \\ } \\ var sheet = document.getElementById('client-sheet'); \\ var systemSheet = document.getElementById('system-sheet'); \\ var grid = document.getElementById('client-grid'); \\ clients.forEach(function(client) { \\ var btn = document.createElement('button'); \\ btn.type = 'button'; btn.className = 'client'; btn.dataset.client = client.value; \\ btn.innerHTML = '<span class="client-icon"><img alt="" src="' + client.icon + '"></span><span>' + client.label + '</span>'; \\ btn.addEventListener('click', function() { write(client.value); syncLinks(); }); \\ grid.appendChild(btn); \\ }); \\ document.querySelectorAll('.theme-option').forEach(function(btn) { \\ btn.addEventListener('click', function() { writeTheme(btn.dataset.theme); applyTheme(btn.dataset.theme); }); \\ }); \\ var accent = document.getElementById('accent-hue'); \\ if (accent) accent.addEventListener('input', function() { writeAccent(accent.value); applyAccent(accent.value); }); \\ document.getElementById('settings').addEventListener('click', function() { sheet.classList.add('open'); }); \\ document.getElementById('system').addEventListener('click', function() { systemSheet.classList.add('open'); }); \\ document.getElementById('close-client').addEventListener('click', function() { sheet.classList.remove('open'); }); \\ document.getElementById('close-system').addEventListener('click', function() { systemSheet.classList.remove('open'); }); \\ sheet.addEventListener('click', function(event) { if (event.target === sheet) sheet.classList.remove('open'); }); \\ systemSheet.addEventListener('click', function(event) { if (event.target === systemSheet) systemSheet.classList.remove('open'); }); \\ document.addEventListener('keydown', function(event) { if (event.key === 'Escape') { sheet.classList.remove('open'); systemSheet.classList.remove('open'); } }); \\ applyTheme(readTheme()); \\ applyAccent(readAccent()); \\ syncLinks(); \\})();;