This commit is contained in:
parent
885f3f6a74
commit
a61d95cba3
6 changed files with 25 additions and 17 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<script lang="ts">
|
||||
import { goto } from '$app/navigation';
|
||||
import { resolve } from '$app/paths';
|
||||
import { navigating, page } from '$app/state';
|
||||
import Navbar from '$lib/components/Navbar.svelte';
|
||||
import '../app.css';
|
||||
|
|
@ -14,11 +15,11 @@
|
|||
}
|
||||
|
||||
const pages = [
|
||||
{ slug: '/', name: 'About Me' },
|
||||
{ slug: '/resume', name: 'Resume' },
|
||||
{ slug: '/blog', name: 'Blog' },
|
||||
{ slug: '/projects', name: 'Projects' },
|
||||
{ slug: '/contact', name: 'Contact' }
|
||||
{ slug: resolve('/'), name: 'About Me' },
|
||||
{ slug: resolve('/resume'), name: 'Resume' },
|
||||
{ slug: resolve('/blog'), name: 'Blog' },
|
||||
{ slug: resolve('/projects'), name: 'Projects' },
|
||||
{ slug: resolve('/contact'), name: 'Contact' }
|
||||
];
|
||||
|
||||
const socialLinks = [
|
||||
|
|
@ -55,6 +56,7 @@
|
|||
{#each socialLinks as link (link.href)}
|
||||
<a
|
||||
href={link.href}
|
||||
rel="external"
|
||||
target="_blank"
|
||||
class="hover:text-base-content text-slate-600 transition-colors">{link.name}</a
|
||||
>
|
||||
|
|
@ -75,6 +77,7 @@
|
|||
<button
|
||||
class="btn btn-primary btn-outline btn-lg"
|
||||
onclick={() => {
|
||||
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
||||
goto(page.slug);
|
||||
drawerOpen = false;
|
||||
}}>{page.name}</button
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export const load: PageLoad = async ({ params }) => {
|
|||
content: post.default,
|
||||
meta: post.metadata
|
||||
};
|
||||
} catch (e) {
|
||||
} catch {
|
||||
error(404, `Could not find ${params.slug}`);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue