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
8 changes: 7 additions & 1 deletion apps/web/src/lib/components/marketing/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
import ThemeSwitcher from "$lib/components/marketing/ThemeSwitcher.svelte";
import * as jsonLinks from "$lib/data/links.json";
import osIcons from "$lib/data/os-icons.json";
import { env } from "$env/dynamic/public";

interface Props {
showDownloadLinks?: boolean;
}

const { showDownloadLinks = true }: Props = $props();

const showJobsLink = env.PUBLIC_SHOW_JOBS_LINK === "true";
const resources = Object.values(jsonLinks.resources).filter(
(resource) => resource.id !== "jobs" || showJobsLink,
);
</script>

<footer class="footer">
Expand Down Expand Up @@ -109,7 +115,7 @@
<hr class="links-divider" />

<ul class="links-list">
{#each Object.values(jsonLinks.resources) as resource}
{#each resources as resource}
<li class="text-16 link">
<a href={resource.url}>
<span>{resource.label}</span>
Expand Down
14 changes: 10 additions & 4 deletions apps/web/src/lib/components/marketing/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
import HeaderAuthSection from "$lib/components/HeaderAuthSection.svelte";
import * as jsonLinks from "$lib/data/links.json";
import { Icon, type IconName } from "@gitbutler/ui-svelte";
import { env } from "$env/dynamic/public";

interface Props {
disableLogoLink?: boolean;
}

const { disableLogoLink }: Props = $props();

// Hidden unless explicitly turned on, so the link only shows while we're hiring.
const showJobsLink = env.PUBLIC_SHOW_JOBS_LINK === "true";
</script>

<!-- Link snippet for reusable navigation links -->
Expand Down Expand Up @@ -51,10 +55,12 @@
href: jsonLinks.resources.downloads.url,
label: jsonLinks.resources.downloads.label,
})}
{@render link({
href: jsonLinks.resources.jobs.url,
label: jsonLinks.resources.jobs.label,
})}
{#if showJobsLink}
{@render link({
href: jsonLinks.resources.jobs.url,
label: jsonLinks.resources.jobs.label,
})}
{/if}
{@render link({
href: jsonLinks.resources.blog.url,
label: jsonLinks.resources.blog.label,
Expand Down
17 changes: 11 additions & 6 deletions apps/web/src/routes/(home)/components/MobileMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
import HeaderAuthSection from "$lib/components/HeaderAuthSection.svelte";
import linkJson from "$lib/data/links.json";
import { scale } from "svelte/transition";
import { env } from "$env/dynamic/public";

const showJobsLink = env.PUBLIC_SHOW_JOBS_LINK === "true";

let isMenuOpen = $state(false);

Expand Down Expand Up @@ -65,12 +68,14 @@
rel="noopener noreferrer"
class="mobile-link">Blog</a
>
<a
href={linkJson.resources.jobs.url}
target="_blank"
rel="noopener noreferrer"
class="mobile-link">{linkJson.resources.jobs.label}</a
>
{#if showJobsLink}
<a
href={linkJson.resources.jobs.url}
target="_blank"
rel="noopener noreferrer"
class="mobile-link">{linkJson.resources.jobs.label}</a
>
{/if}
</nav>

<HeaderAuthSection />
Expand Down
Loading