/** * ───────────────────────────────────────────── * SPB Git — Personal Git Platform * ───────────────────────────────────────────── * Author : Simon-Pierre Boucher * Contact : contact@spboucher.ai * File : src/web/assets/css/app.css * Purpose : Application styles — layout, nav, cards, tables, diffs * License : MIT © Simon-Pierre Boucher * ───────────────────────────────────────────── */ *, *::before, *::after { box-sizing: border-box; } html { -webkit-text-size-adjust: 100%; } body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 15px; line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; } a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; } code, pre, kbd { font-family: var(--font-mono); } button { font-family: inherit; } .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; } main.container { flex: 1; padding-top: 24px; padding-bottom: 48px; } .sr-only, .skip-link { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .skip-link:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; background: var(--surface); border: 1px solid var(--accent); padding: 8px 12px; border-radius: var(--radius); z-index: 100; } .muted { color: var(--muted); } /* ── Top nav ─────────────────────────────── */ .topnav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); } .topnav-inner { display: flex; align-items: center; gap: 16px; height: 56px; } .brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; } .brand:hover { text-decoration: none; } .brand-mark { flex: none; } .global-search { flex: 1; max-width: 420px; } .global-search input, .repo-filters input, .search-page-form input { width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 12px; font-size: 14px; outline: none; } .global-search input:focus, .repo-filters input:focus, .search-page-form input:focus { border-color: var(--accent); } .topnav-links { margin-left: auto; display: flex; align-items: center; gap: 12px; } .topnav-ext { color: var(--muted); font-size: 14px; } .icon-btn { background: var(--surface); color: var(--muted); border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 9px; cursor: pointer; line-height: 0; } .icon-btn:hover { border-color: var(--border-strong); color: var(--text); } html[data-theme='dark'] .icon-moon { display: none; } html[data-theme='light'] .icon-sun { display: none; } /* ── Buttons & chips ─────────────────────── */ .btn { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 14px; font-size: 14px; cursor: pointer; } .btn:hover { border-color: var(--border-strong); text-decoration: none; } .btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn-primary:hover { filter: brightness(1.08); } .btn-sm { padding: 4px 10px; font-size: 13px; } .copy-btn.copied { border-color: var(--accent-2); color: var(--accent-2); } .chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 1px 10px; font-size: 12px; background: var(--chip-bg); color: var(--accent); border: 1px solid transparent; } .chip-topic:hover { border-color: var(--accent); text-decoration: none; } .chip-public { color: var(--muted); background: transparent; border-color: var(--border-strong); } .chip-license { color: var(--accent-2); background: rgba(34, 211, 170, 0.1); } .chip-default { color: var(--accent-2); background: rgba(34, 211, 170, 0.1); } .chip-pin { color: var(--accent-2); background: transparent; } .chip-row { display: flex; flex-wrap: wrap; gap: 6px; } .count { background: var(--surface-2); border-radius: 999px; padding: 0 8px; font-size: 12px; color: var(--muted); } /* ── Hero ────────────────────────────────── */ .hero { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 28px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 28px; } .hero-id { display: flex; align-items: center; gap: 18px; } .hero-avatar { width: 64px; height: 64px; border-radius: 18px; background: var(--accent); color: #fff; font-weight: 700; font-size: 20px; display: flex; align-items: center; justify-content: center; flex: none; } .hero-name { margin: 0; font-size: 24px; } .hero-tagline { margin: 2px 0 0; color: var(--muted); } .hero-badges { display: flex; gap: 10px; flex-wrap: wrap; } .badge-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 14px; font-size: 14px; color: var(--muted); } .badge-stat strong { color: var(--text); margin-right: 4px; } .section-title { font-size: 17px; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; } /* ── Repo cards / home ───────────────────── */ .pinned-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 32px; } .home-columns { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; } .repo-list { display: flex; flex-direction: column; gap: 12px; } .repo-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; transition: border-color 0.15s ease; } .repo-card:hover { border-color: var(--border-strong); } .repo-card-name { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; gap: 8px; } .repo-card-desc { margin: 0 0 10px; color: var(--muted); font-size: 14px; } .repo-card .chip-row { margin-bottom: 10px; } .repo-card-meta { display: flex; gap: 16px; color: var(--muted); font-size: 13px; flex-wrap: wrap; } .lang-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; } .lang-dot-label { display: inline-flex; align-items: center; gap: 6px; } .repo-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; } .repo-filters { display: flex; gap: 8px; flex-wrap: wrap; } .repo-filters input { max-width: 200px; } .repo-filters select, .ref-select { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 10px; font-size: 14px; } .empty-state { text-align: center; padding: 40px 0; color: var(--muted); } /* ── Activity feed ───────────────────────── */ .activity-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; } .activity-feed li { display: flex; gap: 10px; align-items: baseline; } .activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); flex: none; position: relative; top: -1px; } .ref-inline { font-size: 12px; color: var(--muted); } /* ── Heatmap ─────────────────────────────── */ .heatmap-section { margin-top: 40px; } .heatmap-scroll { overflow-x: auto; padding-bottom: 6px; } .heatmap-label { fill: var(--muted); font-size: 9px; font-family: var(--font-ui); } .heatmap-cell[data-level='0'] { fill: var(--heat-0); } .heatmap-cell[data-level='1'] { fill: var(--heat-1); } .heatmap-cell[data-level='2'] { fill: var(--heat-2); } .heatmap-cell[data-level='3'] { fill: var(--heat-3); } .heatmap-cell[data-level='4'] { fill: var(--heat-4); } .heatmap-legend { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; margin-top: 6px; } .heatmap-cell-demo { width: 11px; height: 11px; border-radius: 2px; display: inline-block; } .heatmap-cell-demo[data-level='0'] { background: var(--heat-0); } .heatmap-cell-demo[data-level='1'] { background: var(--heat-1); } .heatmap-cell-demo[data-level='2'] { background: var(--heat-2); } .heatmap-cell-demo[data-level='3'] { background: var(--heat-3); } .heatmap-cell-demo[data-level='4'] { background: var(--heat-4); } /* ── Repo header ─────────────────────────── */ .repo-header { padding-bottom: 0; margin-bottom: 20px; border-bottom: 1px solid var(--border); } .repo-title { font-size: 20px; margin: 4px 0 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 500; } .repo-owner { color: var(--muted); } .repo-sep { color: var(--muted); } .repo-name { font-weight: 700; } .repo-desc { margin: 0 0 8px; color: var(--muted); max-width: 780px; } .repo-meta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 10px; } .repo-homepage { font-size: 14px; } .lang-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-2); margin: 6px 0; } .lang-bar-seg { display: block; height: 100%; min-width: 2px; } .lang-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; margin-bottom: 12px; } .repo-tabs { display: flex; gap: 4px; align-items: center; margin-top: 8px; overflow-x: auto; } .repo-tab { color: var(--muted); padding: 8px 14px; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 2px solid transparent; display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; font-size: 14px; } .repo-tab:hover { color: var(--text); text-decoration: none; } .repo-tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; } .repo-tab-meta { margin-left: auto; font-size: 13px; white-space: nowrap; } /* ── Repo toolbar / clone box ────────────── */ .repo-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; } .clone-box { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .clone-url { background: var(--surface); border: 1px solid var(--border); color: var(--muted); border-radius: var(--radius); padding: 6px 10px; font-family: var(--font-mono); font-size: 13px; width: 300px; max-width: 60vw; } .clone-snippet { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; font-size: 13px; overflow-x: auto; display: inline-block; text-align: left; } .path-breadcrumb { font-family: var(--font-mono); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; } .crumb-sep { color: var(--muted); } /* ── File table ──────────────────────────── */ .file-table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); font-size: 14px; margin-bottom: 24px; } .file-table td { padding: 8px 14px; border-top: 1px solid var(--border); } .file-table tr:first-child td { border-top: 0; } .file-row:hover { background: var(--surface-2); } .file-name { white-space: nowrap; width: 32%; } .file-name a { color: var(--text); } .file-name a:hover { color: var(--accent); } .file-icon { vertical-align: -3px; margin-right: 7px; color: var(--muted); } .icon-dir { color: var(--accent); } .file-commit { overflow: hidden; text-overflow: ellipsis; max-width: 400px; white-space: nowrap; } .file-commit a:hover { color: var(--accent); } .file-date { text-align: right; white-space: nowrap; font-size: 13px; } /* ── README / markdown section ───────────── */ .readme-section { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 32px; } .readme-header { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 13px; position: sticky; top: 56px; background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; } .readme-section .markdown-body { padding: 24px 32px 32px; } .empty-repo { text-align: center; padding: 48px 20px; } .notice { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius); padding: 8px 14px; font-size: 13px; margin: 12px; } /* ── Blob view ───────────────────────────── */ .blob-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; } .blob-header { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 56px; background: var(--surface); z-index: 10; } .blob-meta { display: flex; gap: 8px; align-items: center; font-size: 13px; } .blob-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; } .blob-image { text-align: center; padding: 32px; } .blob-image img { max-width: 100%; border-radius: var(--radius); } .blob-binary { text-align: center; padding: 48px 20px; color: var(--muted); } .blob-markdown { padding: 24px 32px 32px; } .code-view { overflow-x: auto; } .code-view pre.shiki { margin: 0; padding: 12px 0; background: transparent !important; font-size: 13px; line-height: 1.6; min-width: max-content; } .code-view .line { display: block; padding: 0 16px 0 0; min-height: 1.6em; } .code-view .line:target { background: var(--accent-soft); } .code-view .line.range-hl { background: var(--accent-soft); } .code-view .ln { display: inline-block; width: 52px; padding-right: 16px; text-align: right; color: var(--muted); user-select: none; font-size: 12px; text-decoration: none; position: sticky; left: 0; background: var(--surface); } .code-view .ln:hover { color: var(--accent); } .plain-readme { padding: 20px; overflow-x: auto; font-size: 13px; } /* ── Commits ─────────────────────────────── */ .commit-list { list-style: none; margin: 0 0 20px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); } .commit-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--border); } .commit-row:first-child { border-top: 0; } .commit-avatar { flex: none; border-radius: 6px; overflow: hidden; background: var(--surface-2); line-height: 0; padding: 2px; border: 1px solid var(--border); } .commit-main { flex: 1; min-width: 0; } .commit-subject { font-weight: 600; display: flex; gap: 8px; align-items: baseline; } .commit-subject a { color: var(--text); } .commit-subject a:hover { color: var(--accent); } .commit-body-toggle summary { cursor: pointer; color: var(--muted); background: var(--surface-2); border-radius: 4px; padding: 0 8px; display: inline-block; } .commit-body { font-size: 13px; color: var(--muted); white-space: pre-wrap; margin: 8px 0 0; } .commit-meta { font-size: 13px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 6px; } .sha-chip { font-family: var(--font-mono); font-size: 12px; background: var(--surface-2); color: var(--accent); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; cursor: pointer; flex: none; } .sha-chip:hover { border-color: var(--accent); } .pagination { display: flex; gap: 10px; justify-content: center; margin: 20px 0; } /* ── Commit detail / diffs ───────────────── */ .commit-detail-header { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 16px 20px; margin-bottom: 18px; } .commit-detail-subject { margin: 0 0 8px; font-size: 18px; } .commit-detail-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 14px; } .commit-stats { margin: 12px 0 0; font-size: 14px; color: var(--muted); } .diff-add { color: var(--add-text); font-weight: 600; } .diff-del { color: var(--del-text); font-weight: 600; } .diff-file { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 16px; overflow: hidden; } .diff-file-header { display: flex; gap: 10px; align-items: center; padding: 9px 14px; cursor: pointer; background: var(--surface-2); font-size: 13px; list-style: none; position: sticky; top: 56px; z-index: 5; } .diff-file-header::-webkit-details-marker { display: none; } .diff-file-header::before { content: '▾'; color: var(--muted); } .diff-file:not([open]) .diff-file-header::before { content: '▸'; } .diff-path { font-size: 13px; word-break: break-all; } .diff-counts { margin-left: auto; white-space: nowrap; } .diff-status { border-radius: 4px; padding: 1px 7px; font-size: 11px; text-transform: uppercase; font-weight: 700; } .diff-status-added { background: var(--add-bg); color: var(--add-text); } .diff-status-deleted { background: var(--del-bg); color: var(--del-text); } .diff-status-modified { background: var(--accent-soft); color: var(--accent); } .diff-status-renamed { background: var(--chip-bg); color: var(--accent-2); } .diff-table-wrap { overflow-x: auto; } .diff-table { border-collapse: collapse; width: 100%; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55; } .diff-gutter { width: 44px; min-width: 44px; text-align: right; padding: 0 8px; color: var(--muted); user-select: none; border-right: 1px solid var(--border); font-size: 11.5px; vertical-align: top; } .diff-code { padding: 0 10px; white-space: pre; } .diff-sign { display: inline-block; width: 14px; user-select: none; color: var(--muted); } .diff-line-add { background: var(--add-bg); } .diff-line-add .diff-sign { color: var(--add-text); } .diff-line-del { background: var(--del-bg); } .diff-line-del .diff-sign { color: var(--del-text); } .diff-hunk-header td { background: var(--hunk-bg); color: var(--muted); padding: 3px 10px; font-size: 12px; } .diff-binary { padding: 16px; } /* ── Blame ───────────────────────────────── */ .blame-table { border-collapse: collapse; width: 100%; font-size: 13px; } .blame-commit { border-top: 1px solid var(--border); border-right: 1px solid var(--border); padding: 4px 10px; width: 320px; min-width: 240px; vertical-align: top; background: var(--surface-2); } .blame-commit-inner { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .blame-date { font-size: 12px; width: 100%; padding-left: 30px; } .blame-ln { width: 44px; text-align: right; color: var(--muted); padding: 0 8px; user-select: none; font-family: var(--font-mono); font-size: 12px; } .blame-code pre { margin: 0; font-size: 12.5px; line-height: 1.55; white-space: pre; } .blame-line[data-age='0'] .blame-commit { box-shadow: inset 3px 0 0 var(--accent); } .blame-line[data-age='1'] .blame-commit { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 85%, transparent); } .blame-line[data-age='2'] .blame-commit { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } .blame-line[data-age='3'] .blame-commit { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 58%, transparent); } .blame-line[data-age='4'] .blame-commit { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 47%, transparent); } .blame-line[data-age='5'] .blame-commit { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 38%, transparent); } .blame-line[data-age='6'] .blame-commit { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 30%, transparent); } .blame-line[data-age='7'] .blame-commit { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 22%, transparent); } .blame-line[data-age='8'] .blame-commit { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 15%, transparent); } .blame-line[data-age='9'] .blame-commit { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 8%, transparent); } /* ── Branch/tag tables ───────────────────── */ .ref-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 14px; } .ref-table th { text-align: left; padding: 10px 14px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--border); } .ref-table td { padding: 10px 14px; border-top: 1px solid var(--border); } .ref-name { font-family: var(--font-mono); font-size: 13px; } .ahead-behind { display: inline-flex; gap: 10px; font-family: var(--font-mono); font-size: 13px; } .archive-links { display: flex; gap: 6px; } /* ── Search page ─────────────────────────── */ .search-page-form { display: flex; gap: 8px; margin-bottom: 28px; max-width: 560px; } .search-results { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-direction: column; gap: 16px; } .search-results li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; } .search-hit-name { font-weight: 600; font-size: 15px; } .search-snippet { color: var(--muted); font-size: 13px; margin: 6px 0 0; } /* ── Error pages ─────────────────────────── */ .error-page { text-align: center; padding: 72px 20px; } .error-code { font-size: 96px; font-weight: 700; color: var(--accent); font-family: var(--font-mono); line-height: 1; } .error-message { font-size: 18px; color: var(--muted); margin: 16px 0 8px; } .error-art { display: inline-block; text-align: left; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; font-size: 13px; margin: 16px 0 24px; } /* ── Mermaid blocks ──────────────────────── */ .mermaid-block { margin: 16px 0; } .mermaid-src { display: none; } .mermaid-block[data-rendered='0'] .mermaid-src { display: block; } .mermaid-target svg { max-width: 100%; } /* ── Footer ──────────────────────────────── */ .footer { border-top: 1px solid var(--border); color: var(--muted); padding: 20px 0; font-size: 13px; text-align: center; } /* ── Responsive ──────────────────────────── */ @media (max-width: 960px) { .home-columns { grid-template-columns: 1fr; } .file-commit { display: none; } .blame-commit { width: 200px; min-width: 150px; } } @media (max-width: 640px) { .global-search { display: none; } .hero { flex-direction: column; align-items: flex-start; } .pinned-grid { grid-template-columns: 1fr; } .clone-url { width: 100%; max-width: none; } .repo-toolbar { flex-direction: column; align-items: stretch; } .file-date { display: none; } .readme-section .markdown-body, .blob-markdown { padding: 16px; } } /* ── Releases ────────────────────────────── */ .release-list { display: flex; flex-direction: column; gap: 16px; } .release-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; } .release-header { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; } .release-tag { margin: 0; font-size: 17px; font-family: var(--font-mono); } .release-subject { color: var(--muted); } .release-assets { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; } .release-assets li { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 14px; font-size: 14px; } .release-assets li svg { color: var(--accent-2); flex: none; }