mirror of
https://github.com/BradNut/personal-website-sveltekit
synced 2025-09-08 23:20:18 +00:00
commit
4350f1648a
17 changed files with 779 additions and 454 deletions
37
package.json
37
package.json
|
|
@ -15,51 +15,52 @@
|
|||
"test:unit": "vitest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-icons/material-symbols": "^1.2.56",
|
||||
"@iconify-icons/mdi": "^1.2.47",
|
||||
"@iconify-icons/material-symbols": "^1.2.58",
|
||||
"@iconify-icons/mdi": "^1.2.48",
|
||||
"@iconify-icons/radix-icons": "^1.2.9",
|
||||
"@iconify-icons/simple-icons": "^1.2.70",
|
||||
"@iconify-icons/simple-icons": "^1.2.74",
|
||||
"@melt-ui/pp": "^0.1.2",
|
||||
"@playwright/test": "^1.28.1",
|
||||
"@playwright/test": "^1.39.0",
|
||||
"@sveltejs/adapter-static": "^2.0.3",
|
||||
"@sveltejs/adapter-vercel": "^1.0.6",
|
||||
"@sveltejs/kit": "^1.25.1",
|
||||
"@sveltejs/kit": "^1.27.3",
|
||||
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
||||
"@typescript-eslint/parser": "^5.62.0",
|
||||
"@zerodevx/svelte-img": "^2.1.0",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"eslint": "^8.45.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-svelte": "^2.32.2",
|
||||
"eslint": "^8.53.0",
|
||||
"eslint-config-prettier": "^8.10.0",
|
||||
"eslint-plugin-svelte": "^2.35.0",
|
||||
"iconify-icon": "^1.0.8",
|
||||
"just-intersect": "^4.3.0",
|
||||
"mdsvex": "^0.10.6",
|
||||
"mdsvex-relative-images": "^1.0.3",
|
||||
"postcss": "^8.4.30",
|
||||
"postcss": "^8.4.31",
|
||||
"postcss-import": "^15.1.0",
|
||||
"postcss-load-config": "^4.0.1",
|
||||
"postcss-preset-env": "^8.5.1",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier-plugin-svelte": "^2.10.1",
|
||||
"sass": "^1.65.1",
|
||||
"scrape-it": "^6.0.1",
|
||||
"sass": "^1.69.5",
|
||||
"scrape-it": "^6.1.0",
|
||||
"sharp": "^0.32.6",
|
||||
"svelte": "^4.2.1",
|
||||
"svelte-check": "^3.4.6",
|
||||
"svelte": "^4.2.2",
|
||||
"svelte-check": "^3.5.2",
|
||||
"svelte-lazy-loader": "^1.0.0",
|
||||
"svelte-meta-tags": "^3.0.4",
|
||||
"svelte-preprocess": "^5.0.4",
|
||||
"svelte-sequential-preprocessor": "^2.0.1",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.2.2",
|
||||
"vanilla-lazyload": "^17.8.4",
|
||||
"vite": "^4.4.9",
|
||||
"vite-imagetools": "^5.0.8",
|
||||
"vanilla-lazyload": "^17.8.5",
|
||||
"vite": "^4.5.0",
|
||||
"vite-imagetools": "^5.1.2",
|
||||
"vitest": "^0.32.2"
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@melt-ui/svelte": "^0.50.0",
|
||||
"@types/nprogress": "^0.2.1",
|
||||
"@melt-ui/svelte": "^0.50.1",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"ioredis": "^5.3.2",
|
||||
"nprogress": "^0.2.0"
|
||||
}
|
||||
|
|
|
|||
885
pnpm-lock.yaml
885
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
|
@ -2,10 +2,6 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta
|
||||
name="description"
|
||||
content="My name is Bradley Shellnut and I'm a Full Stack Software Engineer."
|
||||
/>
|
||||
<link rel="icon" href="%sveltekit.assets%/b_shell_nut_favicon.gif" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -1,21 +1,24 @@
|
|||
<script lang="ts">
|
||||
import { browser } from "$app/environment";
|
||||
import { navigating } from "$app/stores";
|
||||
import "nprogress/nprogress.css";
|
||||
import { MetaTags } from 'svelte-meta-tags';
|
||||
import NProgress from "nprogress";
|
||||
import 'iconify-icon';
|
||||
import { browser } from "$app/environment";
|
||||
import { navigating, page } from "$app/stores";
|
||||
import { PUBLIC_SITE_URL } from '$env/static/public';
|
||||
import "nprogress/nprogress.css";
|
||||
import '$root/styles/styles.pcss';
|
||||
import Header from '$lib/components/header/index.svelte';
|
||||
import Footer from '$lib/components/footer/index.svelte';
|
||||
import '$root/styles/styles.pcss';
|
||||
import Analytics from '$lib/components/analytics/index.svelte';
|
||||
import SEO from '$lib/components/SEO.svelte';
|
||||
// import SEO from '$lib/components/SEO.svelte';
|
||||
|
||||
NProgress.configure({
|
||||
NProgress.configure({
|
||||
// Full list: https://github.com/rstacruz/nprogress#configuration
|
||||
minimum: 0.16,
|
||||
});
|
||||
|
||||
const dev = process.env.NODE_ENV !== 'production';
|
||||
const siteUrl = PUBLIC_SITE_URL || 'https://bradleyshellnut.com/';
|
||||
|
||||
$: {
|
||||
if (browser && $navigating) {
|
||||
|
|
@ -24,13 +27,26 @@
|
|||
NProgress.done();
|
||||
}
|
||||
}
|
||||
|
||||
$: metaTags = {
|
||||
titleTemplate: '%s | Bradley Shellnut',
|
||||
additionalMetaTags: [
|
||||
{
|
||||
property: 'theme-color',
|
||||
content: '#272727'
|
||||
}
|
||||
],
|
||||
...$page.data.metaTagsChild
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if !dev}
|
||||
<Analytics />
|
||||
{/if}
|
||||
|
||||
<SEO />
|
||||
<MetaTags {...metaTags} />
|
||||
|
||||
<!-- <SEO /> -->
|
||||
|
||||
<div class="wrapper">
|
||||
<Header />
|
||||
|
|
|
|||
|
|
@ -1,7 +1,41 @@
|
|||
import type { PageServerLoad } from './lib/$types';
|
||||
import { fetchBandcampAlbums } from '$root/lib/util/fetchBandcampAlbums';
|
||||
import type { MetaTagsProps } from 'svelte-meta-tags';
|
||||
import { PUBLIC_SITE_URL } from '$env/static/public';
|
||||
import type { PageServerLoad } from './$types';
|
||||
import { fetchBandcampAlbums } from '$lib/util/fetchBandcampAlbums';
|
||||
|
||||
export const load: PageServerLoad = async ({ fetch, setHeaders, url }) => {
|
||||
const baseUrl = new URL(url.origin).href || PUBLIC_SITE_URL || 'https://bradleyshellnut.com';
|
||||
const currentPageUrl = new URL(url.pathname, url.origin).href;
|
||||
|
||||
const metaTags: MetaTagsProps = Object.freeze({
|
||||
title: 'Home',
|
||||
description: "My name is Bradley Shellnut and I'm a Full Stack Software Engineer.",
|
||||
openGraph: {
|
||||
title: 'Home',
|
||||
description: "My name is Bradley Shellnut and I'm a Full Stack Software Engineer.",
|
||||
url: currentPageUrl,
|
||||
siteName: 'Bradley Shellnut Personal Website',
|
||||
type: 'website',
|
||||
locale: 'en_US',
|
||||
images: [
|
||||
{
|
||||
url: `${baseUrl}b_shell_nut_favicon.gif`,
|
||||
alt: 'Bradley Shellnut Website Logo',
|
||||
width: 512,
|
||||
height: 512
|
||||
}
|
||||
]
|
||||
},
|
||||
twitter: {
|
||||
title: 'Home',
|
||||
description: 'Home page',
|
||||
card: 'summary_large_image',
|
||||
image: `${baseUrl}b_shell_nut_favicon.gif`,
|
||||
imageAlt: 'Bradley Shellnut Website Logo'
|
||||
},
|
||||
url: currentPageUrl
|
||||
});
|
||||
|
||||
export const load: PageServerLoad = async ({ fetch, setHeaders }) => {
|
||||
const albums = async () => await fetchBandcampAlbums();
|
||||
const articles = async () => await fetch(`/api/articles?page=1&limit=3`);
|
||||
|
||||
|
|
@ -9,6 +43,8 @@ export const load: PageServerLoad = async ({ fetch, setHeaders }) => {
|
|||
'cache-control': 'max-age=43200'
|
||||
});
|
||||
return {
|
||||
baseUrl,
|
||||
metaTagsChild: metaTags,
|
||||
albums: albums(),
|
||||
articlesData: (await articles()).json()
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import type { PageData } from './$types';
|
||||
import Bandcamp from '$lib/components/bandcamp/index.svelte';
|
||||
import Articles from '$lib/components/articles/index.svelte';
|
||||
import SEO from '$lib/components/SEO.svelte';
|
||||
// import SEO from '$lib/components/SEO.svelte';
|
||||
import type { Album } from '$lib/types/album';
|
||||
import type { Article } from '$lib/types/article';
|
||||
import type { ArticlePageLoad } from './articles/[page]/+page.server';
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
};
|
||||
</script>
|
||||
|
||||
<SEO title="Home" />
|
||||
<!-- <SEO title="Home" /> -->
|
||||
|
||||
<div class="home">
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
import ExternalLink from '$root/lib/components/ExternalLink.svelte';
|
||||
</script>
|
||||
|
||||
<SEO title="About" />
|
||||
<!-- <SEO title="About" /> -->
|
||||
|
||||
<div class="about">
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -1 +1,42 @@
|
|||
export const prerender = true;
|
||||
|
||||
import type { MetaTagsProps } from 'svelte-meta-tags';
|
||||
import { PUBLIC_SITE_URL } from '$env/static/public';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async ({ url }) => {
|
||||
const baseUrl = new URL(url.origin).href || PUBLIC_SITE_URL || 'https://bradleyshellnut.com';
|
||||
const currentPageUrl = new URL(url.pathname, url.origin).href;
|
||||
const metaTags: MetaTagsProps = Object.freeze({
|
||||
title: 'About',
|
||||
description: 'About Bradley Shellnut',
|
||||
openGraph: {
|
||||
title: 'About',
|
||||
description: 'About Bradley Shellnut',
|
||||
url: currentPageUrl,
|
||||
siteName: 'Bradley Shellnut Personal Website',
|
||||
type: 'website',
|
||||
locale: 'en_US',
|
||||
images: [
|
||||
{
|
||||
url: `${baseUrl}b_shell_nut_favicon.gif`,
|
||||
alt: 'Bradley Shellnut Website Logo',
|
||||
width: 512,
|
||||
height: 512
|
||||
}
|
||||
]
|
||||
},
|
||||
twitter: {
|
||||
title: 'About',
|
||||
description: 'About page',
|
||||
card: 'summary_large_image',
|
||||
image: `${baseUrl}b_shell_nut_favicon.gif`,
|
||||
imageAlt: 'Bradley Shellnut Website Logo'
|
||||
},
|
||||
url: currentPageUrl
|
||||
});
|
||||
|
||||
return {
|
||||
metaTagsChild: metaTags
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { error } from '@sveltejs/kit';
|
||||
import type { PageServerLoad } from './$types';
|
||||
import { WALLABAG_MAX_PAGES } from '$env/static/private';
|
||||
import { PUBLIC_SITE_URL } from '$env/static/public';
|
||||
import type { Article } from '$lib/types/article';
|
||||
|
||||
export type ArticlePageLoad = {
|
||||
|
|
@ -12,7 +13,7 @@ export type ArticlePageLoad = {
|
|||
cacheControl: string;
|
||||
};
|
||||
|
||||
export const load: PageServerLoad = async ({ fetch, params, setHeaders }) => {
|
||||
export const load: PageServerLoad = async ({ fetch, params, setHeaders, url }) => {
|
||||
const { page } = params;
|
||||
if (+page > +WALLABAG_MAX_PAGES) {
|
||||
throw error(404, {
|
||||
|
|
@ -32,11 +33,45 @@ export const load: PageServerLoad = async ({ fetch, params, setHeaders }) => {
|
|||
'cache-control': 'max-age=43200' // 12 hours
|
||||
});
|
||||
}
|
||||
|
||||
const baseUrl = new URL(url.origin).href || PUBLIC_SITE_URL || 'https://bradleyshellnut.com';
|
||||
const currentPageUrl = new URL(url.pathname, url.origin).href;
|
||||
|
||||
const metaTags: MetaTagsProps = Object.freeze({
|
||||
title: 'Favorite Articles',
|
||||
description: 'My favorite articles',
|
||||
openGraph: {
|
||||
title: 'Facorite Articles',
|
||||
description: 'My favorite articles',
|
||||
url: currentPageUrl,
|
||||
siteName: 'Bradley Shellnut Personal Website',
|
||||
type: 'website',
|
||||
locale: 'en_US',
|
||||
images: [
|
||||
{
|
||||
url: `${baseUrl}b_shell_nut_favicon.gif`,
|
||||
alt: 'Bradley Shellnut Website Logo',
|
||||
width: 512,
|
||||
height: 512
|
||||
}
|
||||
]
|
||||
},
|
||||
twitter: {
|
||||
title: 'Favorite Articles',
|
||||
description: 'My favorite articles',
|
||||
card: 'summary_large_image',
|
||||
image: `${baseUrl}b_shell_nut_favicon.gif`,
|
||||
imageAlt: 'Bradley Shellnut Website Logo'
|
||||
},
|
||||
url: currentPageUrl
|
||||
});
|
||||
|
||||
return {
|
||||
articles,
|
||||
currentPage,
|
||||
totalPages,
|
||||
limit,
|
||||
totalArticles
|
||||
totalArticles,
|
||||
metaTagsChild: metaTags
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
$: seoTitle = `Tech Articles - Page ${currentPage} | Bradley Shellnut`;
|
||||
</script>
|
||||
|
||||
<SEO title={seoTitle} />
|
||||
<!-- <SEO title={seoTitle} /> -->
|
||||
|
||||
<div class="pageStyles">
|
||||
<h1 style="margin-bottom: 2rem">Favorite Tech Articles</h1>
|
||||
|
|
|
|||
|
|
@ -1 +1,43 @@
|
|||
export const prerender = true;
|
||||
|
||||
import type { MetaTagsProps } from 'svelte-meta-tags';
|
||||
import { PUBLIC_SITE_URL } from '$env/static/public';
|
||||
import type { PageServerLoad } from './$types';
|
||||
|
||||
export const load: PageServerLoad = async ({ url }) => {
|
||||
const baseUrl = new URL(url.origin).href || PUBLIC_SITE_URL || 'https://bradleyshellnut.com';
|
||||
const currentPageUrl = new URL(url.pathname, url.origin).href;
|
||||
|
||||
const metaTags: MetaTagsProps = Object.freeze({
|
||||
title: 'Portfolio',
|
||||
description: "Bradley Shellnut's Portfolio",
|
||||
openGraph: {
|
||||
title: 'Portfolio',
|
||||
description: "Bradley Shellnut's Portfolio",
|
||||
url: currentPageUrl,
|
||||
siteName: 'Bradley Shellnut Personal Website',
|
||||
type: 'website',
|
||||
locale: 'en_US',
|
||||
images: [
|
||||
{
|
||||
url: `${baseUrl}b_shell_nut_favicon.gif`,
|
||||
alt: 'Bradley Shellnut Website Logo',
|
||||
width: 512,
|
||||
height: 512
|
||||
}
|
||||
]
|
||||
},
|
||||
twitter: {
|
||||
title: 'Portfolio',
|
||||
description: "Bradley Shellnut's Portfolio",
|
||||
card: 'summary_large_image',
|
||||
image: `${baseUrl}b_shell_nut_favicon.gif`,
|
||||
imageAlt: 'Bradley Shellnut Website Logo'
|
||||
},
|
||||
url: currentPageUrl
|
||||
});
|
||||
|
||||
return {
|
||||
metaTagsChild: metaTags
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts">
|
||||
import { createTabs, melt } from '@melt-ui/svelte';
|
||||
import GitHub from '@iconify-icons/simple-icons/github';
|
||||
import SEO from '$lib/components/SEO.svelte';
|
||||
// import SEO from '$lib/components/SEO.svelte';
|
||||
import Portfolio from '$lib/components/Portfolio.svelte';
|
||||
import personalSite from "$lib/assets/images/Bradley_Shellnut_New_Site.png?as=run";
|
||||
import weddingWebsite from "$lib/assets/images/Wedding_Website.png?as=run";
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
];
|
||||
</script>
|
||||
|
||||
<SEO title="Portfolio" />
|
||||
<!-- <SEO title="Portfolio" /> -->
|
||||
|
||||
<h1>Portfolio!</h1>
|
||||
<div use:melt={$root} class="root tab-group">
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<script lang="ts">
|
||||
import ExternalLink from "$root/lib/components/ExternalLink.svelte";
|
||||
import SEO from "$root/lib/components/SEO.svelte";
|
||||
// import SEO from "$root/lib/components/SEO.svelte";
|
||||
</script>
|
||||
|
||||
<SEO title="Privacy Blog" />
|
||||
<!-- <SEO title="Privacy Blog" /> -->
|
||||
|
||||
<div>
|
||||
<h1>Privacy</h1>
|
||||
|
|
|
|||
|
|
@ -1 +1,43 @@
|
|||
export const prerender = true;
|
||||
|
||||
import type { MetaTagsProps } from 'svelte-meta-tags';
|
||||
import { PUBLIC_SITE_URL } from '$env/static/public';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async ({ url }) => {
|
||||
const baseUrl = new URL(url.origin).href || PUBLIC_SITE_URL || 'https://bradleyshellnut.com';
|
||||
const currentPageUrl = new URL(url.pathname, url.origin).href;
|
||||
|
||||
const metaTags: MetaTagsProps = Object.freeze({
|
||||
title: 'Privacy Blog',
|
||||
description: 'My thoughts on personal internet privacy.',
|
||||
openGraph: {
|
||||
title: 'Privacy Blog',
|
||||
description: 'My thoughts on personal internet privacy.',
|
||||
url: new URL(url.pathname, url.origin).href,
|
||||
siteName: 'Bradley Shellnut Personal Website',
|
||||
type: 'website',
|
||||
locale: 'en_US',
|
||||
images: [
|
||||
{
|
||||
url: `${baseUrl}b_shell_nut_favicon.gif`,
|
||||
alt: 'Bradley Shellnut Website Logo',
|
||||
width: 512,
|
||||
height: 512
|
||||
}
|
||||
]
|
||||
},
|
||||
twitter: {
|
||||
title: 'Privacy Blog',
|
||||
description: 'My thoughts on personal internet privacy.',
|
||||
card: 'summary_large_image',
|
||||
image: `${baseUrl}b_shell_nut_favicon.gif`,
|
||||
imageAlt: 'Bradley Shellnut Website Logo'
|
||||
},
|
||||
url: currentPageUrl
|
||||
});
|
||||
|
||||
return {
|
||||
metaTagsChild: metaTags
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
import PrivacyHardwareSoftware from '$lib/content/uses/privacy-hardware-software.md';
|
||||
</script>
|
||||
|
||||
<SEO title="Uses" />
|
||||
<!-- <SEO title="Uses" /> -->
|
||||
|
||||
<div class="uses">
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -1 +1,43 @@
|
|||
export const prerender = true;
|
||||
|
||||
import type { MetaTagsProps } from 'svelte-meta-tags';
|
||||
import { PUBLIC_SITE_URL } from '$env/static/public';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async ({ url }) => {
|
||||
const baseUrl = new URL(url.origin).href || PUBLIC_SITE_URL || 'https://bradleyshellnut.com';
|
||||
const currentPageUrl = new URL(url.pathname, url.origin).href;
|
||||
|
||||
const metaTags: MetaTagsProps = Object.freeze({
|
||||
title: '/Uses',
|
||||
description: 'What I use!',
|
||||
openGraph: {
|
||||
title: '/Uses',
|
||||
description: 'What I use!',
|
||||
url: new URL(url.pathname, url.origin).href,
|
||||
siteName: 'Bradley Shellnut Personal Website',
|
||||
type: 'website',
|
||||
locale: 'en_US',
|
||||
images: [
|
||||
{
|
||||
url: `${baseUrl}b_shell_nut_favicon.gif`,
|
||||
alt: 'Bradley Shellnut Website Logo',
|
||||
width: 512,
|
||||
height: 512
|
||||
}
|
||||
]
|
||||
},
|
||||
twitter: {
|
||||
title: '/Uses',
|
||||
description: "What I use!",
|
||||
card: 'summary_large_image',
|
||||
image: `${baseUrl}b_shell_nut_favicon.gif`,
|
||||
imageAlt: 'Bradley Shellnut Website Logo'
|
||||
},
|
||||
url: currentPageUrl
|
||||
});
|
||||
|
||||
return {
|
||||
metaTagsChild: metaTags
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -13,8 +13,11 @@ const config = {
|
|||
extensions: ['.svelte', ...mdsvexConfig.extensions],
|
||||
preprocess: [vitePreprocess(), mdsvex(mdsvexConfig), preprocessMeltUI()],
|
||||
vitePlugin: {
|
||||
inspector: true,
|
||||
toggleKeyCombo: 'control-alt-shift'
|
||||
inspector: {
|
||||
toggleKeyCombo: 'control-alt-shift',
|
||||
showToggleButton: 'always',
|
||||
toggleButtonPos: 'bottom-right'
|
||||
}
|
||||
},
|
||||
kit: {
|
||||
adapter: adapter(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue