diff --git a/src/http/landing/assets.zig b/src/http/landing/assets.zig index 720c8ac..a880fdc 100644 --- a/src/http/landing/assets.zig +++ b/src/http/landing/assets.zig @@ -43,13 +43,22 @@ pub const css = \\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 { - \\ width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid var(--line); - \\ border-radius: 6px; background: color-mix(in srgb, var(--panel) 72%, transparent); - \\ transition: color 0.12s, border-color 0.12s, background 0.12s; + \\ position: relative; width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid color-mix(in srgb, var(--line) 78%, white 8%); + \\ border-radius: 9px; background: + \\ linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.025)), + \\ color-mix(in srgb, var(--panel) 68%, transparent); + \\ box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 8px 22px rgba(0,0,0,.16); + \\ transition: color 0.12s, border-color 0.12s, background 0.12s, transform 0.12s; \\} - \\.icon-link img { width: 18px; height: 18px; object-fit: contain; display: block; } + \\.icon-link::before { + \\ content: ""; position: absolute; inset: 5px; border-radius: 6px; + \\ background: color-mix(in srgb, white 18%, var(--bg) 8%); + \\ box-shadow: inset 0 1px 0 rgba(255,255,255,.22); + \\ opacity: .72; + \\} + \\.icon-link img { position: relative; z-index: 1; width: 18px; height: 18px; object-fit: contain; display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.32)); } \\.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: var(--muted); background: color-mix(in srgb, var(--panel-2) 86%, transparent); } + \\.icon-link:hover, .settings:hover { border-color: color-mix(in srgb, var(--green) 55%, var(--line)); background: color-mix(in srgb, var(--panel-2) 86%, transparent); transform: translateY(-1px); } \\.settings { \\ flex: 0 0 auto; \\} @@ -108,18 +117,29 @@ pub const css = \\.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(--green), var(--accent), var(--pink)); } \\.empty { color: var(--muted); margin: 0; } - \\.sheet { position: fixed; inset: 0; z-index: 20; display: none; align-items: flex-end; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.55); } + \\.sheet { position: fixed; inset: 0; z-index: 20; display: none; align-items: flex-end; 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%, 420px); border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32); overflow: hidden; } - \\.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); } + \\.sheet-card { width: min(100%, 440px); border: 1px solid color-mix(in srgb, var(--line) 80%, white 8%); border-radius: 18px; background: + \\ linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.035)), + \\ color-mix(in srgb, var(--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 { min-width: 36px; min-height: 36px; border: 0; background: transparent; color: var(--muted); font: inherit; cursor: pointer; } - \\.client-body { padding: 14px; } + \\.close { min-width: 34px; min-height: 34px; border: 1px solid color-mix(in srgb, var(--line) 76%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--panel) 72%, transparent); color: var(--muted); font: inherit; cursor: pointer; } + \\.close:hover { color: var(--text); border-color: color-mix(in srgb, var(--green) 50%, var(--line)); } + \\.client-body { padding: 15px 16px 17px; } \\.hint { margin: 0 0 12px; color: var(--dim); font-size: 11px; } - \\.client-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 8px; } - \\.client { display: grid; justify-items: center; gap: 7px; min-height: 72px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--muted); font: inherit; font-size: 10px; cursor: pointer; } - \\.client:hover, .client.active { color: var(--text); border-color: var(--green); } - \\.client img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; } + \\.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: + \\ linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.025)), + \\ color-mix(in srgb, var(--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(--panel) 82%, transparent); } + \\.client-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: color-mix(in srgb, white 82%, var(--panel) 18%); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 18px rgba(0,0,0,.16); } + \\.client img { width: 24px; height: 24px; border-radius: 6px; object-fit: contain; } \\@media (min-width: 680px) { \\ .shell { padding-top: 24px; } \\ header { margin-top: -24px; } @@ -140,7 +160,8 @@ pub const script = \\ { 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: '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 (_) {} } @@ -158,7 +179,7 @@ pub const script = \\ clients.forEach(function(client) { \\ var btn = document.createElement('button'); \\ btn.type = 'button'; btn.className = 'client'; btn.dataset.client = client.value; - \\ btn.innerHTML = '' + client.label + ''; + \\ btn.innerHTML = '' + client.label + ''; \\ btn.addEventListener('click', function() { write(client.value); syncLinks(); }); \\ grid.appendChild(btn); \\ });