Skip to content

Commit ac951d3

Browse files
committed
link to org
1 parent a744e77 commit ac951d3

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

packages/site-kit/src/lib/nav/MobileMenu.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script lang="ts">
22
import { afterNavigate } from '$app/navigation';
3-
import { page } from '$app/state';
43
import { trap } from '../actions';
54
import { reduced_motion } from '../stores';
65
import { tick } from 'svelte';
@@ -10,7 +9,6 @@
109
import MobileSubMenu from './MobileSubMenu.svelte';
1110
import type { NavigationLink } from '../types';
1211
import ModalOverlay from '../components/ModalOverlay.svelte';
13-
import { github_link } from './Nav.svelte';
1412
1513
interface Props {
1614
links: NavigationLink[];
@@ -150,7 +148,7 @@
150148
<li><a href="/chat">Discord</a></li>
151149
<li><a href="https://bsky.app/profile/svelte.dev">Bluesky</a></li>
152150
<li>
153-
<a href={github_link(page)}>GitHub</a>
151+
<a href="https://github.com/sveltejs">GitHub</a>
154152
</li>
155153
</ul>
156154
</div>

packages/site-kit/src/lib/nav/Nav.svelte

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,6 @@
22
Top navigation bar for the application. It provides a slot for the left side, the right side, and the center.
33
-->
44

5-
<script lang="ts" module>
6-
import type { Page } from '@sveltejs/kit';
7-
export function github_link(page: Page) {
8-
if (page.url.pathname.startsWith('/tutorial')) {
9-
return `https://github.com/sveltejs/${page.params.slug!.split('/')[0]}`;
10-
}
11-
if (page.url.pathname.startsWith('/docs')) {
12-
return `https://github.com/sveltejs/${page.params.topic!}`;
13-
}
14-
return 'https://github.com/sveltejs/svelte';
15-
}
16-
</script>
17-
185
<script lang="ts">
196
import { overlay_open, on_this_page_open } from '../stores';
207
import { search } from '../state/search.svelte';
@@ -146,7 +133,7 @@ Top navigation bar for the application. It provides a slot for the left side, th
146133
<span data-icon="bluesky"></span>
147134
</a>
148135

149-
<a href={github_link(page)} aria-label="GitHub Repo">
136+
<a href="https://github.com/sveltejs" aria-label="GitHub Organization">
150137
<span data-icon="github"></span>
151138
</a>
152139
</div>

0 commit comments

Comments
 (0)