Skip to content

Commit 26314b2

Browse files
committed
Remove views counter from all templates
- Removed views prop from all template components - Removed views display from Sidebar, TemplateGitHub, TemplateBento, and TemplateMinimal - Contribution graph and external contributions are already displayed in templates
1 parent cf64a7b commit 26314b2

File tree

4 files changed

+5
-32
lines changed

4 files changed

+5
-32
lines changed

src/lib/components/portfolio/Sidebar.svelte

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
interface Props {
88
profile: GitHubProfile;
99
class?: string;
10-
views?: number;
1110
}
1211
13-
let { profile, class: className = '', views = 0 }: Props = $props();
12+
let { profile, class: className = '' }: Props = $props();
1413
1514
const tags = $derived(generateProfileTags(profile));
1615
const joinDate = $derived(formatJoinDate(profile.user.createdAt));
@@ -180,13 +179,4 @@
180179
<span><span class="font-semibold text-text-primary">{profile.stats.following}</span> following</span>
181180
</a>
182181
</div>
183-
184-
<!-- Profile Views -->
185-
<div class="flex items-center justify-center lg:justify-start gap-2 text-sm text-text-secondary">
186-
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
187-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
188-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />
189-
</svg>
190-
<span><span class="font-semibold text-text-primary">{views.toLocaleString()}</span> views</span>
191-
</div>
192182
</aside>

src/lib/components/templates/TemplateBento.svelte

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@
1111
interface Props {
1212
profile: GitHubProfile;
1313
class?: string;
14-
views?: number;
1514
}
1615
17-
let { profile, class: className = '', views = 0 }: Props = $props();
16+
let { profile, class: className = '' }: Props = $props();
1817
1918
const totalContributions = $derived(getTotalContributions(profile));
2019
const streak = $derived(getContributionStreak(profile));
@@ -83,13 +82,6 @@
8382
{#if profile.user.company}
8483
<span>{profile.user.company.replace('@', '')}</span>
8584
{/if}
86-
<div class="flex items-center gap-1 text-[var(--color-text-secondary)]">
87-
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
88-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
89-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />
90-
</svg>
91-
<span class="font-semibold text-[var(--color-text-primary)]">{views.toLocaleString()}</span>
92-
</div>
9385
</div>
9486
</div>
9587
</Card>

src/lib/components/templates/TemplateGitHub.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313
interface Props {
1414
profile: GitHubProfile;
1515
class?: string;
16-
views?: number;
1716
}
1817
19-
let { profile, class: className = '', views = 0 }: Props = $props();
18+
let { profile, class: className = '' }: Props = $props();
2019
2120
let sortBy = $state('stars');
2221
const sortOptions = [
@@ -35,7 +34,7 @@
3534
<div class="flex flex-col gap-8 lg:flex-row">
3635
<!-- Sidebar -->
3736
<div class="w-full lg:w-[296px] lg:flex-shrink-0">
38-
<Sidebar {profile} {views} />
37+
<Sidebar {profile} />
3938
</div>
4039

4140
<!-- Main Content -->

src/lib/components/templates/TemplateMinimal.svelte

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
interface Props {
99
profile: GitHubProfile;
1010
class?: string;
11-
views?: number;
1211
}
1312
14-
let { profile, class: className = '', views = 0 }: Props = $props();
13+
let { profile, class: className = '' }: Props = $props();
1514
1615
const totalContributions = $derived(getTotalContributions(profile));
1716
const joinDate = $derived(formatJoinDate(profile.user.createdAt));
@@ -195,12 +194,5 @@
195194
View on GitHub →
196195
</a>
197196
</p>
198-
<p class="mt-4 flex items-center justify-center gap-2 text-text-secondary">
199-
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
200-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
201-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />
202-
</svg>
203-
<span><span class="font-semibold text-text-primary">{views.toLocaleString()}</span> viewers</span>
204-
</p>
205197
</footer>
206198
</div>

0 commit comments

Comments
 (0)