agnes-the-ai-analyst/app/web/templates/home_onboarded.html
Vojtech 00f8bceebc
fix(web): readable /home install-hero <code> chips (amber on navy) (#358)
Inline `<code>` chips inside the blue install-hero (claude --version,
~/Agnes, /agnes-private, ~/.claude/settings.local.json, ...) used to
render as a rgba(255,255,255,0.12) faint-white pill on the
#0073D1→#0056A3 hero gradient with inherited near-white text — ≈2:1
contrast (fails WCAG AA), and the pill silhouette merged into the
hero. Visual perception was a muddy bluish blob; user reported the
text as "dark blue/black" because the white edges were lost.

New rule lands at ≈9:1 contrast and matches the .install-cmd
copy-button-box palette (amber #FBBF24 on rgba(15,23,42,0.75) dark
navy, with a subtle amber border so the chip reads as an affordance
even with the transparent navy bg). Applies in both home templates
— .install-hero code on the not-onboarded view, .hero code on the
onboarded welcome card.

Two inline `style="background: rgba(255,255,255,0.12);..."` overrides
on `<code>` elements in the lead paragraphs (home_not_onboarded.html
and home_onboarded.html) dropped so the CSS rule actually wins —
styling now lives in one place per hero scope.
2026-05-19 16:54:07 +00:00

165 lines
5 KiB
HTML

{% extends "base.html" %}
{% block title %}Home — {{ instance_name or "AI Data Analyst" }}{% endblock %}
{% block content %}
{% include "_page_chrome.html" %}
<style>
.home-mock {
--hp-primary: #0073D1;
--hp-primary-dark: #0056A3;
--hp-primary-light: #E6F3FC;
--hp-border: #E5E7EB;
--hp-border-light: #F3F4F6;
--hp-text-primary: #111827;
--hp-text-secondary: #6B7280;
color: var(--hp-text-primary);
font-size: 14px;
line-height: 1.5;
}
.home-mock * { box-sizing: border-box; }
.home-mock .hero {
background: linear-gradient(135deg, #0073D1 0%, #0056A3 100%);
color: white;
border-radius: 16px;
padding: 38px 40px;
margin-bottom: 22px;
box-shadow: 0 8px 24px rgba(0, 86, 163, 0.18);
}
.home-mock .hero .eyebrow {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.8px;
opacity: 0.85;
margin-bottom: 10px;
}
.home-mock .hero h1 {
font-size: 30px;
font-weight: 600;
letter-spacing: -0.4px;
margin-bottom: 12px;
line-height: 1.2;
color: white;
}
.home-mock .hero p {
font-size: 15px;
opacity: 0.94;
max-width: 680px;
line-height: 1.6;
}
/* Inline `<code>` chips inside the blue welcome hero — mirror the
.install-hero rule on the not-onboarded view (amber-on-dark-navy,
≈9:1 contrast). Previous inline `style="background: rgba(255,255,
255,0.12)..."` rendered as a near-invisible faint-white pill on the
blue gradient, with inherited white text on top — low contrast +
the chip silhouette merged into the hero. */
.home-mock .hero code {
background: rgba(15, 23, 42, 0.75);
color: #FBBF24;
border: 1px solid rgba(251, 191, 36, 0.30);
padding: 1px 6px;
border-radius: 4px;
font-family: ui-monospace, 'SF Mono', Consolas, monospace;
font-size: 12.5px;
}
.home-mock .section-label {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.6px;
color: var(--hp-text-secondary);
margin: 30px 0 12px;
}
.home-mock .quick-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
gap: 18px;
margin-bottom: 18px;
}
.home-mock .quick-card {
background: white;
border: 1px solid var(--hp-border);
border-radius: 12px;
padding: 22px;
text-decoration: none;
color: inherit;
display: flex;
flex-direction: column;
gap: 4px;
transition: border-color .15s, box-shadow .15s;
}
.home-mock .quick-card:hover {
border-color: var(--hp-primary);
box-shadow: 0 4px 12px rgba(0, 115, 209, 0.10);
}
.home-mock .quick-card .ico {
font-size: 22px;
margin-bottom: 8px;
}
.home-mock .quick-card .ttl {
font-size: 15px;
font-weight: 600;
color: var(--hp-text-primary);
}
.home-mock .quick-card .desc {
font-size: 13px;
color: var(--hp-text-secondary);
line-height: 1.55;
}
</style>
<div class="home-mock">
{% set display_name = (user.name or (user.email or "").split("@")[0] or "back") %}
<div class="hero">
<div class="eyebrow">Welcome back, {{ display_name }}</div>
<h1>You're all set up</h1>
<p>
Open Claude Code in any project under <code>~/{{ workspace_dir }}/Projects/</code>
and start a session — your data and plugins are already synced. Use the cards below to jump into the parts of {{ instance_brand }} you need.
</p>
</div>
<div class="section-label">Quick links</div>
<div class="quick-grid">
<a class="quick-card" href="/dashboard">
<span class="ico">&#x1F4CA;</span>
<div class="ttl">Dashboard</div>
<div class="desc">Sync state, table inventory, recent activity.</div>
</a>
<a class="quick-card" href="/catalog">
<span class="ico">&#x1F4DA;</span>
<div class="ttl">Catalog</div>
<div class="desc">Browse tables, schema, and metric definitions.</div>
</a>
{# Curated Memory is user-facing — the /corporate-memory route runs
on get_current_user, so the card shows for everyone, matching
its primary-nav placement next to Data Packages. #}
<a class="quick-card" href="/corporate-memory">
<span class="ico">&#x1F9E0;</span>
<div class="ttl">Curated Memory</div>
<div class="desc">Shared analyst knowledge and prior solutions.</div>
</a>
{# Activity Center admin-only — parity with the top-nav gating. #}
{% if is_admin %}
<a class="quick-card" href="/activity-center">
<span class="ico">&#x1F4C8;</span>
<div class="ttl">Activity Center</div>
<div class="desc">Per-user analytics on {{ instance_brand }} adoption.</div>
</a>
{% endif %}
{% if is_admin %}
<a class="quick-card" href="/admin/server-config">
<span class="ico">&#x2699;&#xFE0F;</span>
<div class="ttl">Admin</div>
<div class="desc">Server configuration, RBAC, marketplaces.</div>
</a>
{% endif %}
</div>
</div>
{% endblock %}