Skip to content

Commit d86b8be

Browse files
kevincodex1claude
andcommitted
Rebrand to gitlawb logo and polish the repo detail page
Branding: the official gitlawb mark (extracted as a 4KB currentColor SVG from the platform brand asset) replaces the text-only header branding — now [logo] explorer — and the purple-bolt favicon, which becomes the mark on a black tile. Title and footer read "gitlawb explorer". Detail page: - Owner DID middle-truncates via new truncateDid() (did:key:z6Mkn…xXxYk), full DID on hover and in the copy button; footer node DID reuses it. - Right stats column widens 380px → 440px with rebalanced cells so the commit hash and created date sit on one line. - README render and file markdown preview drop the 72ch cap; the code viewer drops its 1100px cap — both now fill the content width. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 67aa8f6 commit d86b8be

12 files changed

Lines changed: 77 additions & 17 deletions

File tree

‎index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>gitlawb node explorer</title>
7+
<title>gitlawb explorer</title>
88
<link rel="preconnect" href="https://fonts.googleapis.com" />
99
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1010
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700;800&display=swap" rel="stylesheet" />

‎public/favicon.svg‎

Lines changed: 1 addition & 1 deletion
Loading

‎src/components/layout/Footer.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { CopyButton } from '../ui/CopyButton';
2+
import { truncateDid } from '../../lib/api';
23
import { useNodeStatus } from '../../hooks/useNodeStatus';
34

45
export default function Footer() {
@@ -9,15 +10,15 @@ export default function Footer() {
910
<footer className="border-t border-border mt-auto">
1011
<div className="mx-auto flex max-w-[1280px] flex-wrap items-center justify-between gap-x-6 gap-y-2 px-4 sm:px-8 lg:px-12 py-5 text-[11px] text-muted-foreground">
1112
<span className="whitespace-nowrap">
12-
gitlawb node explorer
13+
gitlawb explorer
1314
{version && <span className="text-dim">&ensp;v{version}</span>}
1415
{node?.network && <span className="text-dim">&ensp;{node.network}</span>}
1516
</span>
1617

1718
{node?.did && (
1819
<span className="flex items-center gap-2 min-w-0">
19-
<span className="truncate max-w-[220px] sm:max-w-[420px] lg:max-w-none text-dim">
20-
{node.did}
20+
<span title={node.did} className="text-dim whitespace-nowrap">
21+
{truncateDid(node.did)}
2122
</span>
2223
<CopyButton value={node.did} label="did" />
2324
</span>

‎src/components/layout/TopBar.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Link } from 'react-router-dom';
22
import { ThemeToggle } from '../ui/ThemeToggle';
33
import { Pill } from '../ui/Pill';
4+
import { Logo } from '../ui/Logo';
45
import { useNodeStatus } from '../../hooks/useNodeStatus';
56

67
export default function TopBar() {
@@ -13,11 +14,12 @@ export default function TopBar() {
1314
{/* Left: branding */}
1415
<Link
1516
to="/repos"
16-
className="flex items-center gap-3 shrink-0 min-w-0
17+
className="flex items-center gap-2.5 shrink-0 min-w-0
1718
focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-warm"
1819
>
20+
<Logo className="h-5 w-auto shrink-0 text-foreground" />
1921
<span className="text-[13px] font-bold text-foreground whitespace-nowrap">
20-
gitlawb node explorer
22+
explorer
2123
</span>
2224
</Link>
2325
{node?.network && <Pill className="max-sm:hidden">{node.network}</Pill>}

‎src/components/repo-detail/DetailHeader.tsx‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Repository } from '../../types/repo';
2-
import { shortDid } from '../../lib/api';
2+
import { shortDid, truncateDid } from '../../lib/api';
33
import { CopyButton } from '../ui/CopyButton';
44
import { Pill } from '../ui/Pill';
55
import { MicroLabel } from '../ui/MicroLabel';
@@ -11,6 +11,8 @@ interface DetailHeaderProps {
1111
export function DetailHeader({ repo }: DetailHeaderProps) {
1212
// repo.owner is already the full DID (did:key:z6Mk…)
1313
const fullDid = repo.owner;
14+
const truncatedDid = truncateDid(fullDid);
15+
const didSplitAt = truncatedDid.lastIndexOf(':') + 1;
1416

1517
return (
1618
<div className="min-w-0">
@@ -37,11 +39,12 @@ export function DetailHeader({ repo }: DetailHeaderProps) {
3739

3840
{/* Owner/dates panel */}
3941
<div className="border border-border">
40-
{/* Owner row */}
42+
{/* Owner row — middle-truncated for display, copy yields the full DID */}
4143
<div className="flex items-center gap-3 sm:gap-4 px-4 sm:px-6 py-3 sm:py-4 border-b border-border-inner">
4244
<MicroLabel className="w-[64px] flex-shrink-0">owner</MicroLabel>
43-
<span className="text-[11px] sm:text-[12.5px] flex-1 truncate min-w-0 text-foreground">
44-
{fullDid}
45+
<span title={fullDid} className="text-[11px] sm:text-[12.5px] flex-1 truncate min-w-0 text-foreground">
46+
<span className="text-dim">{truncatedDid.slice(0, didSplitAt)}</span>
47+
{truncatedDid.slice(didSplitAt)}
4548
</span>
4649
<CopyButton value={fullDid} label="copy" />
4750
</div>

‎src/components/repo-detail/FileViewer.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function MarkdownPreview({ owner, name, path, content }: {
9999
}
100100
return (
101101
<div className="flex gap-8 p-4 sm:p-6">
102-
<MarkdownView html={html} className="min-w-0 flex-1 max-w-[72ch]" />
102+
<MarkdownView html={html} className="min-w-0 flex-1" />
103103
{headings.length >= 3 && <TocRail headings={headings} />}
104104
</div>
105105
);
@@ -137,7 +137,7 @@ export function FileViewer({
137137
});
138138

139139
return (
140-
<div className="overflow-hidden border border-border max-w-[1100px]">
140+
<div className="overflow-hidden border border-border">
141141
{/* Header */}
142142
<div className="flex items-center gap-2 sm:gap-3 px-4 sm:px-6 min-h-10 py-1.5 border-b border-border bg-surface flex-wrap">
143143
<button

‎src/components/repo-detail/ReadmePanel.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export function ReadmePanel({ owner, name, dirPath, entries }: ReadmePanelProps)
7171
</div>
7272
) : (
7373
<div className="flex gap-8 p-4 sm:p-6">
74-
<MarkdownView html={state.html ?? ''} className="min-w-0 flex-1 max-w-[72ch]" />
74+
<MarkdownView html={state.html ?? ''} className="min-w-0 flex-1" />
7575
{headings.length >= 3 && <TocRail headings={headings} />}
7676
</div>
7777
)}

‎src/components/repo-detail/StatsPanel.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ function Cell({ label, children, sub, className = '' }: {
2626

2727
export function StatsPanel({ stars, latestCommit, created }: StatsPanelProps) {
2828
return (
29-
<div className="grid grid-cols-3 border border-border">
29+
<div className="grid grid-cols-[0.9fr_1.05fr_1.05fr] border border-border">
3030
<Cell label="stars" sub="social proof">
3131
{stars}
3232
</Cell>
3333
<Cell label="latest" sub={latestCommit ? latestCommit.time : 'no commits'} className="border-l border-border">
3434
<span className="text-warm">{latestCommit ? latestCommit.shortHash : '—'}</span>
3535
</Cell>
3636
<Cell label="created" sub="first seen" className="border-l border-border">
37-
<span className="text-[15px] sm:text-[16px]">{created}</span>
37+
<span className="text-[15px] sm:text-[16px] whitespace-nowrap">{created}</span>
3838
</Cell>
3939
</div>
4040
);

0 commit comments

Comments
 (0)