Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ Most GitHub stat badges are **flat**. Flat bars, flat text, flat colors. They bl

**CommitPulse is different.**

We render your contribution data as a **3D Isometric City** — a grid of glowing towers where each column's height is directly proportional to your commit count that day. The more you grind, the taller your skyline grows. This is not decoration. This is a **live, animated data visualization** that makes your dedication impossible to ignore.
We render your contribution data as a **3D Isometric City** — a grid of glowing towers where each column's height is directly proportional to your commit count that day. The more you grind, the taller your skyline grows.

**Ghost City Architecture:** In this mode, zero-contribution days aren't just empty space. They are rendered as thin, wireframe-style **blueprint foundations** (4px high). This gives your commit landscape a structured, architectural "work-in-progress" look even during rest days, maintaining the premium 3D aesthetic across the entire calendar.

This is not decoration. This is a **live, animated data visualization** that makes your dedication impossible to ignore.

### Why Isometric > Flat

Expand Down
47 changes: 47 additions & 0 deletions lib/svg/generator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,51 @@ describe('generateSVG', () => {
expect(svg).toContain('prefers-reduced-motion');
});
});

// Ghost City Placeholder Mode tests
describe('Ghost City Mode', () => {
const emptyCalendar: ContributionCalendar = {
totalContributions: 0,
weeks: [
{
contributionDays: [
{ contributionCount: 0, date: '2024-06-10' },
{ contributionCount: 0, date: '2024-06-11' },
],
},
],
};

const activeCalendar: ContributionCalendar = {
totalContributions: 5,
weeks: [
{
contributionDays: [
{ contributionCount: 0, date: '2024-06-10' },
{ contributionCount: 5, date: '2024-06-11' },
],
},
],
};

it('renders Ghost City blueprint when user has 0 total contributions', () => {
const svg = generateSVG(mockStats, { user: 'avi' } as unknown as BadgeParams, emptyCalendar);

// Should contain wireframe strokes
expect(svg).toContain('stroke-width="0.5"');
expect(svg).toContain('stroke-opacity="0.3"');
// Should use the GHOST_HEIGHT_PX which is 4 (10 + 4 = 14)
expect(svg).toContain('L0 14 L-16 4 L-16 0 Z');
});

it('does not render Ghost City when user has active contributions', () => {
const svg = generateSVG(mockStats, { user: 'avi' } as unknown as BadgeParams, activeCalendar);

// Should NOT contain wireframe strokes
expect(svg).not.toContain('stroke-width="0.5"');
expect(svg).not.toContain('stroke-opacity="0.3"');
// Active mode empty days should have h=0 (10 + 0 = 10)
expect(svg).toContain('L0 10 L-16 0 L-16 0 Z');
});
});
});
Loading
Loading