Make the metaphor structural: a thing gets visual heat only if it increases exposure; contained things stay silent. - Badge diet: private repos render unmarked (an unmarked row is the "contained" statement); only Public/Archived/Empty earn a badge. Public wears the ember "live ember" badge (a public repo is a fire starter); fork/mirror demote to muted mono provenance beside the name. - Containment status grammar in empty/warning states (STATUS · CONTAINED — 0 EXPOSED); firebreak-rule dividers under page headings; remove the settings sidebar (one section doesn't earn a rail) in favor of a single column; reuse .notice-rail for the success notice. - Sweep the ad-hoc text-foreground/NN gray ladder to text-muted-foreground, fixing sub-AA helper text. Includes the landing hero (index.html) legibility pass so hero copy stays cream after the foreground token flipped to charcoal. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
149 lines
6.6 KiB
HTML
149 lines
6.6 KiB
HTML
<section class="table-panel">
|
|
<div class="flex flex-col gap-1 border-b border-border px-4 py-3.5 sm:px-5 sm:py-4">
|
|
<h2 class="flex items-center gap-2 text-base font-semibold text-foreground">
|
|
<svg class="status-icon text-muted-foreground"
|
|
viewBox="0 0 24 24"
|
|
fill="none"
|
|
stroke="currentColor"
|
|
stroke-width="2"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
aria-hidden="true">
|
|
<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" />
|
|
</svg>
|
|
Repositories
|
|
{% if repositories %}
|
|
<span class="text-sm font-normal text-muted-foreground">{{ repositories|length }}</span>
|
|
{% endif %}
|
|
</h2>
|
|
<p class="text-sm leading-6 text-muted-foreground">
|
|
Your Forgejo repositories. Create a share link to grant temporary read-only access.
|
|
</p>
|
|
</div>
|
|
{% if repo_error %}
|
|
<div class="table-placeholder text-warning-foreground">
|
|
{{ repo_error }}
|
|
<button type="button"
|
|
class="btn btn-sm btn-secondary"
|
|
hx-get="/dashboard/repositories"
|
|
hx-target="#repositories-region"
|
|
hx-swap="innerHTML">Retry</button>
|
|
</div>
|
|
{% elif repositories %}
|
|
<div class="table-shell">
|
|
<table class="data-table">
|
|
<caption class="sr-only">Your Forgejo repositories</caption>
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Repository</th>
|
|
<th scope="col">Type</th>
|
|
<th scope="col">Branch</th>
|
|
<th scope="col" class="hidden lg:table-cell">Language</th>
|
|
<th scope="col" class="hidden md:table-cell">Last Updated</th>
|
|
<th scope="col" class="text-center">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for repo in repositories %}
|
|
<tr>
|
|
<td>
|
|
{# Owner muted, name bright — eyes land on the repo, not the prefix #}
|
|
{% set owner, slash, name = repo.full_name.partition('/') %}
|
|
{% if repo.html_url %}
|
|
<a href="{{ repo.html_url }}"
|
|
target="_blank"
|
|
rel="noopener"
|
|
class="group inline-flex items-center gap-1 font-medium text-foreground hover:text-ember">
|
|
{% if slash %}
|
|
<span class="font-normal text-muted-foreground">{{ owner }}/</span>{{ name }}
|
|
{% else %}
|
|
{{ repo.full_name }}
|
|
{% endif %}
|
|
<svg class="size-3 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-ember"
|
|
viewBox="0 0 24 24"
|
|
fill="none"
|
|
stroke="currentColor"
|
|
stroke-width="2"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
aria-hidden="true">
|
|
<path d="M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
|
|
</svg>
|
|
<span class="sr-only">(opens in Forgejo in a new tab)</span>
|
|
</a>
|
|
{% else %}
|
|
<span class="font-medium text-foreground">
|
|
{% if slash %}
|
|
<span class="font-normal text-muted-foreground">{{ owner }}/</span>{{ name }}
|
|
{% else %}
|
|
{{ repo.full_name }}
|
|
{% endif %}
|
|
</span>
|
|
{% endif %}
|
|
{# Provenance is metadata, not risk — muted mono, never a badge #}
|
|
{% set provenance = (['fork'] if repo.fork else []) + (['mirror'] if repo.mirror else []) %}
|
|
{% if provenance %}
|
|
<span class="font-mono text-xs text-muted-foreground">· {{ provenance | join(' · ') }}</span>
|
|
{% endif %}
|
|
{% if repo.description %}
|
|
<p class="mt-0.5 max-w-[16rem] truncate text-xs text-muted-foreground sm:max-w-md">
|
|
{{ repo.description }}
|
|
</p>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{# Heat = exposure: only exception states earn a badge.
|
|
Private is the ground state — an unmarked row is contained. #}
|
|
<div class="flex flex-wrap items-center gap-1.5">
|
|
{% if not repo.private %}
|
|
<span class="badge badge-ember">Public</span>
|
|
{% endif %}
|
|
{% if repo.archived %}<span class="badge badge-expired">Archived</span>{% endif %}
|
|
{% if repo.empty %}<span class="badge badge-danger">Empty</span>{% endif %}
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<span class="mono-chip inline-flex items-center gap-1">
|
|
<svg class="size-3 shrink-0"
|
|
viewBox="0 0 24 24"
|
|
fill="none"
|
|
stroke="currentColor"
|
|
stroke-width="2"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
aria-hidden="true">
|
|
<path d="M15 6a9 9 0 0 0-9 9V3" />
|
|
<circle cx="18" cy="6" r="3" />
|
|
<circle cx="6" cy="18" r="3" />
|
|
</svg>
|
|
{{ repo.default_branch }}
|
|
</span>
|
|
</td>
|
|
<td class="hidden whitespace-nowrap text-muted-foreground lg:table-cell">
|
|
{% if repo.language %}
|
|
{{ repo.language }}
|
|
{% else %}
|
|
<span class="text-muted-foreground">—</span>
|
|
{% endif %}
|
|
</td>
|
|
<td class="hidden whitespace-nowrap text-muted-foreground md:table-cell">
|
|
<time datetime="{{ repo.updated_at }}" data-relative-date>{{ repo.updated_at }}</time>
|
|
</td>
|
|
<td class="text-center">
|
|
{% if repo.empty %}
|
|
<span class="btn btn-sm btn-disabled" aria-disabled="true">Create Link</span>
|
|
{% else %}
|
|
<a href="/links/create"
|
|
class="btn btn-sm btn-primary"
|
|
aria-label="Create link for {{ repo.full_name }}">Create Link</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<div class="table-placeholder">No repositories found in your Forgejo account.</div>
|
|
{% endif %}
|
|
</section>
|