Files
zeekay 6bc8094492 feat(oss): redesign oss.hanzo.ai into an educational, discoverable OSS explorer + one-click launcher
Replaces the old lorem-ipsum e-commerce demo with a best-in-class human gallery over the
REAL 1,030-app catalog (meta.json), sharing templates.hanzo.ai's machine-readable contract
(meta.json + blueprints/ UNTOUCHED — only the human UI changed).

- Educational: hero + live app count + a 'How it works' Pick→Deploy→Manage strip + a
  'Why Hanzo' (managed / scalable / pay-as-you-go / your own org) section.
- Discoverable: fast debounced client-side search (name/desc/id/tags) + 16 data-driven
  category chips + Load-more, with #q=&tag= URL sync for shareable views + keyboard (/ , Esc).
- Quick-launcher: each card's Deploy CTA deep-links the REAL PaaS deploy flow
  platform.hanzo.ai/templates?deploy=<id> (verified against platform source + a live 200).
- Removed the public 'earn 20% compute revenue' claims; fixed a latent CSP bug (inline
  onerror → DOM-attached). 100% self-contained/CSP-safe (inline SVG icons, data-URI favicon,
  NO external CDN/font/style), theme-aware (light/dark), responsive (390 mobile → 1680 desktop,
  no horizontal scroll). Purged the old demo cruft (18 CSS + 11 JS + 30 img + fonts + stubs).

Verified headless under the exact prod CSP: cards render (0 violations/0 JS errors), search/
filter/load-more/96-of-96-logos/theme-toggle all work, 390px no-h-scroll. Catalog contract
untouched (UI only READS meta.json/blueprints).
2026-07-24 17:18:29 -07:00

295 lines
13 KiB
CSS

/* Hanzo OSS explorer — oss.hanzo.ai
Theme-aware (light/dark), responsive (390 / 768 / 1280 / 1680), CSP-strict:
no external fonts, no external CSS, no inline scripts. Reads the same
/meta.json + /blueprints/<id>/ data the templates.hanzo.ai PaaS loader uses. */
/* ---- design tokens: light default, dark via OS + [data-theme] override ---- */
:root {
--bg: #ffffff;
--panel: #ffffff;
--panel-2: #f7f7f8;
--line: #e7e7ea;
--line-2: #d7d7dc;
--fg: #0a0a0b;
--muted: #62626a;
--muted-2: #9a9aa2;
--btn-bg: #0a0a0b;
--btn-fg: #ffffff;
--btn-bg-hover: #262629;
--logo-bg: #ffffff;
--logo-ring: #ececef;
--ring: rgba(10, 10, 11, 0.14);
--shadow: 0 1px 2px rgba(10, 10, 11, 0.05), 0 8px 24px rgba(10, 10, 11, 0.04);
--shadow-hover: 0 2px 6px rgba(10, 10, 11, 0.08), 0 14px 40px rgba(10, 10, 11, 0.08);
--bar-bg: rgba(255, 255, 255, 0.72);
color-scheme: light;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #000000;
--panel: #0d0d0f;
--panel-2: #08080a;
--line: #1d1d21;
--line-2: #2c2c31;
--fg: #f6f6f7;
--muted: #8c8c93;
--muted-2: #5b5b62;
--btn-bg: #f6f6f7;
--btn-fg: #0a0a0b;
--btn-bg-hover: #d6d6d8;
--logo-bg: #ffffff;
--logo-ring: #26262b;
--ring: rgba(246, 246, 247, 0.16);
--shadow: none;
--shadow-hover: 0 0 0 1px var(--line-2);
--bar-bg: rgba(0, 0, 0, 0.72);
color-scheme: dark;
}
}
/* explicit toggle wins over the OS setting, both directions */
:root[data-theme="light"] {
--bg: #ffffff; --panel: #ffffff; --panel-2: #f7f7f8;
--line: #e7e7ea; --line-2: #d7d7dc; --fg: #0a0a0b;
--muted: #62626a; --muted-2: #9a9aa2;
--btn-bg: #0a0a0b; --btn-fg: #ffffff; --btn-bg-hover: #262629;
--logo-bg: #ffffff; --logo-ring: #ececef; --ring: rgba(10, 10, 11, 0.14);
--shadow: 0 1px 2px rgba(10, 10, 11, 0.05), 0 8px 24px rgba(10, 10, 11, 0.04);
--shadow-hover: 0 2px 6px rgba(10, 10, 11, 0.08), 0 14px 40px rgba(10, 10, 11, 0.08);
--bar-bg: rgba(255, 255, 255, 0.72); color-scheme: light;
}
:root[data-theme="dark"] {
--bg: #000000; --panel: #0d0d0f; --panel-2: #08080a;
--line: #1d1d21; --line-2: #2c2c31; --fg: #f6f6f7;
--muted: #8c8c93; --muted-2: #5b5b62;
--btn-bg: #f6f6f7; --btn-fg: #0a0a0b; --btn-bg-hover: #d6d6d8;
--logo-bg: #ffffff; --logo-ring: #26262b; --ring: rgba(246, 246, 247, 0.16);
--shadow: none; --shadow-hover: 0 0 0 1px var(--line-2);
--bar-bg: rgba(0, 0, 0, 0.72); color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
background: var(--bg);
color: var(--fg);
font: 15px/1.55 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 6px; }
/* ---------------------------------------------------------- header / nav ---- */
.top {
display: flex; align-items: center; justify-content: space-between; gap: 1rem;
padding: 0.85rem 1.25rem;
border-bottom: 1px solid var(--line);
position: sticky; top: 0; z-index: 20;
background: var(--bar-bg);
backdrop-filter: saturate(1.6) blur(12px);
-webkit-backdrop-filter: saturate(1.6) blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 600; letter-spacing: -0.02em; }
.brand .mark { width: 26px; height: 26px; display: block; border-radius: 7px; }
.brand .sub { color: var(--muted); font-weight: 500; }
.topnav { display: flex; align-items: center; gap: 0.35rem; }
.topnav a {
color: var(--muted); font-size: 0.9rem; padding: 0.4rem 0.7rem; border-radius: 8px;
transition: color 0.12s, background 0.12s;
}
.topnav a:hover { color: var(--fg); background: var(--panel-2); }
.topnav .cta {
color: var(--btn-fg); background: var(--btn-bg); font-weight: 500;
}
.topnav .cta:hover { color: var(--btn-fg); background: var(--btn-bg-hover); }
.icon-btn {
display: inline-grid; place-items: center; width: 34px; height: 34px;
border: 1px solid var(--line); border-radius: 8px; background: transparent;
color: var(--muted); cursor: pointer; transition: color 0.12s, border-color 0.12s;
}
.icon-btn:hover { color: var(--fg); border-color: var(--line-2); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .moon { display: none; }
:root[data-theme="dark"] .icon-btn .sun,
:root:not([data-theme="light"]) .icon-btn .sun { display: block; }
:root[data-theme="dark"] .icon-btn .moon { display: block; }
:root[data-theme="dark"] .icon-btn .sun { display: none; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .icon-btn .sun { display: none; }
:root:not([data-theme="light"]) .icon-btn .moon { display: block; }
}
:root[data-theme="light"] .icon-btn .sun { display: block; }
:root[data-theme="light"] .icon-btn .moon { display: none; }
/* --------------------------------------------------------------- hero ------- */
.hero { max-width: 60rem; margin: 0 auto; padding: 3.5rem 1.25rem 0.5rem; text-align: center; }
.eyebrow {
display: inline-block; font-size: 0.78rem; letter-spacing: 0.02em; color: var(--muted);
border: 1px solid var(--line); background: var(--panel-2);
padding: 0.3rem 0.8rem; border-radius: 999px; margin-bottom: 1.25rem;
}
.hero h1 {
font-size: clamp(2.1rem, 5.4vw, 3.4rem); line-height: 1.04; letter-spacing: -0.032em;
margin: 0 0 0.75rem; font-weight: 650;
}
.lead { font-size: clamp(1rem, 2.2vw, 1.18rem); color: var(--muted); margin: 0 auto 1.75rem; max-width: 42rem; }
.lead strong { color: var(--fg); font-weight: 600; }
/* search */
.search-wrap { position: relative; max-width: 40rem; margin: 0 auto; }
.search-wrap .glass {
position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
width: 18px; height: 18px; color: var(--muted-2); pointer-events: none;
}
.search {
width: 100%; display: block;
background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px;
color: var(--fg); font-size: 1rem; padding: 0.9rem 2.9rem 0.9rem 2.85rem; outline: none;
box-shadow: var(--shadow); transition: border-color 0.12s, box-shadow 0.12s;
}
.search:focus { border-color: var(--fg); box-shadow: 0 0 0 4px var(--ring); }
.search::placeholder { color: var(--muted-2); }
.kbd {
position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
font-size: 0.72rem; color: var(--muted-2); border: 1px solid var(--line);
border-radius: 6px; padding: 0.1rem 0.4rem; background: var(--panel-2);
}
.result-count { color: var(--muted-2); font-size: 0.82rem; margin: 0.9rem 0 0; min-height: 1.1em; }
/* category tags */
.tags {
display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center;
margin: 1rem auto 0; max-width: 52rem;
}
.tag {
font-size: 0.8rem; color: var(--muted); background: var(--panel);
border: 1px solid var(--line); border-radius: 999px; padding: 0.32rem 0.85rem;
cursor: pointer; transition: color 0.12s, border-color 0.12s, background 0.12s;
white-space: nowrap;
}
.tag:hover { color: var(--fg); border-color: var(--line-2); }
.tag.on { color: var(--btn-fg); background: var(--btn-bg); border-color: var(--btn-bg); }
/* --------------------------------------------------- how it works strip ----- */
.how { max-width: 66rem; margin: 2.75rem auto 0; padding: 0 1.25rem; }
.how-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(3, 1fr); }
.step {
display: flex; gap: 0.8rem; align-items: flex-start;
background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem;
}
.step .n {
flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center;
border-radius: 9px; background: var(--panel); border: 1px solid var(--line); color: var(--fg);
}
.step .n svg { width: 17px; height: 17px; }
.step h3 { margin: 0.1rem 0 0.2rem; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; }
.step p { margin: 0; font-size: 0.83rem; color: var(--muted); line-height: 1.5; }
/* ---------------------------------------------------------------- grid ------ */
main { max-width: 84rem; margin: 0 auto; padding: 2.25rem 1.25rem 1rem; }
.grid {
display: grid; gap: 0.8rem;
grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
}
.card {
content-visibility: auto; contain-intrinsic-size: 0 116px;
display: flex; gap: 0.9rem; align-items: flex-start;
background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
padding: 1rem; box-shadow: var(--shadow);
transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.logo {
flex: 0 0 42px; width: 42px; height: 42px; border-radius: 10px;
background: var(--logo-bg); box-shadow: inset 0 0 0 1px var(--logo-ring);
object-fit: contain; padding: 6px; display: grid; place-items: center; overflow: hidden;
}
.logo.mono {
background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line);
color: var(--fg); font-weight: 650; font-size: 1.15rem;
}
.body { min-width: 0; flex: 1; }
.name-row { display: flex; align-items: baseline; gap: 0.5rem; }
.name { font-weight: 600; letter-spacing: -0.01em; margin: 0; font-size: 0.98rem; }
.cat {
font-size: 0.68rem; color: var(--muted); border: 1px solid var(--line);
border-radius: 999px; padding: 0.05rem 0.5rem; white-space: nowrap; text-transform: capitalize;
}
.desc {
color: var(--muted); font-size: 0.83rem; margin: 0.28rem 0 0.7rem; line-height: 1.5;
display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.deploy {
display: inline-flex; align-items: center; gap: 0.35rem;
font-size: 0.82rem; font-weight: 550; color: var(--btn-fg); background: var(--btn-bg);
border-radius: 8px; padding: 0.36rem 0.75rem; transition: background 0.12s;
}
.deploy svg { width: 13px; height: 13px; }
.deploy:hover { background: var(--btn-bg-hover); color: var(--btn-fg); }
.link { font-size: 0.8rem; color: var(--muted); padding: 0.36rem 0.4rem; transition: color 0.12s; }
.link:hover { color: var(--fg); }
.more {
display: block; margin: 2rem auto 0; background: var(--panel); color: var(--fg);
border: 1px solid var(--line-2); border-radius: 10px; padding: 0.72rem 1.6rem;
cursor: pointer; font-size: 0.9rem; transition: border-color 0.12s, background 0.12s;
}
.more:hover { border-color: var(--fg); background: var(--panel-2); }
.empty { text-align: center; color: var(--muted); padding: 3.5rem 1rem; font-size: 0.95rem; }
/* --------------------------------------------------------- why hanzo -------- */
.why { max-width: 84rem; margin: 2.5rem auto 0; padding: 2.5rem 1.25rem; border-top: 1px solid var(--line); }
.why h2 { text-align: center; font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -0.02em; margin: 0 0 0.4rem; font-weight: 640; }
.why .sub { text-align: center; color: var(--muted); margin: 0 auto 2rem; max-width: 40rem; }
.why-grid { display: grid; gap: 0.8rem; grid-template-columns: repeat(4, 1fr); }
.val { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; }
.val .vi {
width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px;
background: var(--panel-2); border: 1px solid var(--line); color: var(--fg); margin-bottom: 0.75rem;
}
.val .vi svg { width: 17px; height: 17px; }
.val h3 { margin: 0 0 0.3rem; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; }
.val p { margin: 0; font-size: 0.83rem; color: var(--muted); line-height: 1.5; }
/* --------------------------------------------------------------- footer ----- */
.foot {
max-width: 84rem; margin: 0 auto; padding: 2rem 1.25rem 3rem; border-top: 1px solid var(--line);
display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
color: var(--muted-2); font-size: 0.8rem; align-items: center;
}
.foot a { color: var(--muted); border-bottom: 1px solid transparent; }
.foot a:hover { color: var(--fg); border-bottom-color: var(--line-2); }
.foot .links { display: flex; gap: 1.1rem; flex-wrap: wrap; }
/* -------------------------------------------------------- responsiveness ---- */
@media (max-width: 900px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
.how-grid { grid-template-columns: 1fr; }
.hero { padding-top: 2.5rem; }
.topnav .hide-sm { display: none; }
main { padding-top: 1.75rem; }
}
@media (max-width: 460px) {
.why-grid { grid-template-columns: 1fr; }
.brand .sub { display: none; }
.kbd { display: none; }
.grid { grid-template-columns: 1fr; }
}
@media (min-width: 1600px) {
main, .why, .foot { max-width: 90rem; }
.grid { grid-template-columns: repeat(auto-fill, minmax(18.5rem, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
* { transition: none !important; }
.card:hover { transform: none; }
}