mirror of
https://github.com/lissy93/networking-toolbox.git
synced 2026-11-25 07:04:41 +03:00
Fixes home and settings links leaving a subfolder deployment (#48)
This commit is contained in:
4 files changed
+9
-5
No files matched your search
@@ -26,6 +26,7 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { page } from '$app/stores';
|
||||
import { resolve } from '$app/paths';
|
||||
import { SUB_NAV } from '$lib/constants/nav';
|
||||
import Icon from '$lib/components/global/Icon.svelte';
|
||||
import { type NavItem, type NavGroup, footerLinks } from '$lib/constants/nav';
|
||||
@@ -216,7 +217,7 @@
|
||||
bind:this={menuContentElement}
|
||||
>
|
||||
<div class="menu-header">
|
||||
<a href="/" class="home-link" on:click={handleLinkClick} aria-label="Home">
|
||||
<a href={resolve('/')} class="home-link" on:click={handleLinkClick} aria-label="Home">
|
||||
<Icon name="networking" size="lg" />
|
||||
<h2>{site.title}</h2>
|
||||
</a>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { resolve } from '$app/paths';
|
||||
import { site } from '$lib/constants/site';
|
||||
import { SITE_ICON, SITE_DESCRIPTION, DISABLE_SETTINGS } from '$lib/config/customizable-settings';
|
||||
import Icon from '$lib/components/global/Icon.svelte';
|
||||
@@ -21,7 +22,7 @@
|
||||
<div class="header-content">
|
||||
<div class="logo">
|
||||
<div class="logo-icon">
|
||||
<a href="/" aria-label="Home">
|
||||
<a href={resolve('/')} aria-label="Home">
|
||||
{#if hasCustomLogo}
|
||||
<img src={SITE_ICON} alt={site.name} class="logo-image" />
|
||||
{:else}
|
||||
@@ -30,7 +31,7 @@
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<h1><a href="/">{site.title}</a></h1>
|
||||
<h1><a href={resolve('/')}>{site.title}</a></h1>
|
||||
<p class="subtitle">{SITE_DESCRIPTION || "The sysadmin's Swiss Army knife"}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { goto } from '$app/navigation';
|
||||
import { resolve } from '$app/paths';
|
||||
import Icon from '$lib/components/global/Icon.svelte';
|
||||
import { tooltip } from '$lib/actions/tooltip';
|
||||
import { browser } from '$app/environment';
|
||||
@@ -48,7 +49,7 @@
|
||||
|
||||
// Handle double-click to navigate to settings page
|
||||
function handleDoubleClick() {
|
||||
goto('/settings');
|
||||
goto(resolve('/settings'));
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { slide } from 'svelte/transition';
|
||||
import { resolve } from '$app/paths';
|
||||
import Icon from '$lib/components/global/Icon.svelte';
|
||||
import { accessibility, type AccessibilityOption } from '$lib/stores/accessibility';
|
||||
import { tooltip } from '$lib/actions/tooltip';
|
||||
@@ -672,7 +673,7 @@ EOF'</code
|
||||
<!-- Navigation Links (only in dropdown mode) -->
|
||||
{#if !standalone}
|
||||
<div class="settings-section settings-links">
|
||||
<a class="settings-link" href="/settings" onclick={handlers.linkClick}>
|
||||
<a class="settings-link" href={resolve('/settings')} onclick={handlers.linkClick}>
|
||||
<Icon name="settings" size="sm" />
|
||||
<span>More Settings</span>
|
||||
</a>
|
||||
|
||||
Reference in new issue
Block a user