Compare commits

..

1 Commits

Author SHA1 Message Date
151d519805
super mega layout improvements 2024-12-31 19:35:23 -08:00
5 changed files with 8 additions and 8 deletions

View File

@ -1,7 +1,5 @@
import type { LayoutServerLoad } from './$types'; import type { LayoutServerLoad } from './$types';
export const trailingSlash = 'always';
export const load: LayoutServerLoad = async (event) => { export const load: LayoutServerLoad = async (event) => {
const { user } = event.locals; const { user } = event.locals;
@ -9,3 +7,5 @@ export const load: LayoutServerLoad = async (event) => {
user, user,
}; };
}; };
export const trailingSlash = 'always';

View File

@ -20,9 +20,9 @@
<ul class="flex items-center gap-6 overflow-x-auto text-sm"> <ul class="flex items-center gap-6 overflow-x-auto text-sm">
<li><a href="/" class={getNavClass(/^\/$/)}>Home</a></li> <li><a href="/" class={getNavClass(/^\/$/)}>Home</a></li>
{#if user} {#if user}
<li><a href="/user/" class={getNavClass(/^\/user\/$/)}>Profile</a></li> <li><a href="/user" class={getNavClass(/^\/user$/)}>Profile</a></li>
<li><a href="/connections/" class={getNavClass(/^\/connections\/$/)}>Connections</a></li> <li><a href="/connections" class={getNavClass(/^\/connections$/)}>Connections</a></li>
<li><a href="/clients/" class={getNavClass(/^\/clients(\/\d+)?\/$/)}>Clients</a></li> <li><a href="/clients" class={getNavClass(/^\/clients(\/\d+)?$/)}>Clients</a></li>
{/if} {/if}
</ul> </ul>
</nav> </nav>

View File

@ -21,7 +21,7 @@
<section id="get-started" class="border-l-2 pl-6"> <section id="get-started" class="border-l-2 pl-6">
<p> <p>
To get started, To get started,
<Button class="ml-2" href="/clients/?add=New+Client">Create a New Client</Button> <Button class="ml-2" href="/clients?add=New+Client">Create a New Client</Button>
</p> </p>
</section> </section>
<!-- <section id="using-wireguard">--> <!-- <section id="using-wireguard">-->

View File

@ -15,7 +15,7 @@ export const actions = {
switch (res._tag) { switch (res._tag) {
case 'ok': { case 'ok': {
return redirect(303, `/clients/${res.value}/`); return redirect(303, `/clients/${res.value}`);
} }
case 'err': { case 'err': {
const [status, message] = res.error; const [status, message] = res.error;

View File

@ -41,7 +41,7 @@
<Table.Row class="group hover:bg-background hover:bg-opacity-40"> <Table.Row class="group hover:bg-background hover:bg-opacity-40">
<Table.Head scope="row"> <Table.Head scope="row">
<a <a
href={`./${client.id}/`} href={`./${client.id}`}
class="flex size-full items-center group-hover:underline" class="flex size-full items-center group-hover:underline"
> >
{client.name} {client.name}