Skip to content

Commit bc25536

Browse files
Add GitHub link to profile and render in footer (#2723)
1 parent 022ca60 commit bc25536

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

src/lib/layout/footer.svelte

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,23 @@
3939
<Divider vertical />
4040
</span>
4141
<Layout.Stack direction="row" gap="xxs" inline>
42-
<!-- TODO: hide on studio mode. -->
43-
<Button.Anchor
44-
icon
45-
size="xs"
46-
variant="ghost"
47-
href="https://github.com/appwrite/appwrite"
48-
target="_blank"
49-
rel="noreferrer"
50-
aria-label="{resolvedProfile.platform} on Github">
51-
<Icon size="s" icon={IconGithub} />
52-
</Button.Anchor>
42+
{#if resolvedProfile.links.github}
43+
<Button.Anchor
44+
icon
45+
size="xs"
46+
variant="ghost"
47+
href={resolvedProfile.links.github}
48+
target="_blank"
49+
rel="noreferrer"
50+
aria-label="{resolvedProfile.platform} on Github">
51+
<Icon size="s" icon={IconGithub} />
52+
</Button.Anchor>
53+
{/if}
5354
<Button.Anchor
5455
icon
5556
size="xs"
5657
variant="ghost"
57-
href="https://appwrite.io/discord"
58+
href={resolvedProfile.links.discord}
5859
target="_blank"
5960
rel="noreferrer"
6061
aria-label="{resolvedProfile.platform} on Discord">

src/lib/profiles/index.svelte.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export type Profile = {
7070
privacy: string;
7171
cookies: string;
7272
pricing: string;
73+
github?: string;
7374
};
7475
support: {
7576
technical: string[];
@@ -133,7 +134,8 @@ export const base: Profile = {
133134
discord: 'https://appwrite.io/discord',
134135
cookies: 'https://appwrite.io/cookies',
135136
privacy: 'https://appwrite.io/privacy',
136-
pricing: 'https://appwrite.io/pricing'
137+
pricing: 'https://appwrite.io/pricing',
138+
github: 'https://github.com/appwrite/appwrite'
137139
},
138140
support: {
139141
technical: [

0 commit comments

Comments
 (0)