diff --git a/src/lib/config.ts b/src/lib/config.ts index 26086be..db6b7c1 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -1,13 +1,12 @@ import { dev } from '$app/environment'; -export const title = "Matt's Propaganda Machine"; +export const title = "Matt's Portfolio"; export const description = - 'A blog & portfolio of Matt Morin - a complex organism radically living on planet Earth, staring into the abyss and trying to code his way out of it.'; + 'I code, I think, I write. My thoughts go into the world of Free & Open Source Software, AI and philosophy of mind, Climate Change, Cybersecurity.'; export const url = dev ? 'http://localhost:5174' : 'https://mattmor.in'; export const author = 'Matt Morin'; - -export const email = 'matt.b.morin@protonmail.com'; -export const github = 'https://github.com/matthieu42morin'; +export const backgroundColor = '#111827'; +export const themeColor = '#3b82f6'; // prettier-ignore export const socialLinks = [ @@ -15,7 +14,8 @@ export const socialLinks = [ { title: 'Matrix', href: '', icon: './MatrixLogo' }, { title: 'Gitea', href: 'https://git.mattmor.in', icon: './GiteaLogo' }, { title: 'Mastodon', href: 'https://mastodon.social/@matt_mor', icon: 'fa-brands fa-mastodon'}, - { title: 'RSS feed', href: '/blog/feed', icon: 'fa-regular fa-square-rss' } + { title: 'RSS feed', href: '/blog/feed', icon: 'fa-regular fa-square-rss' }, + { title: 'email', href: 'matt.b.morin@protonmail.com', icon: 'fa-regular mail'} ]; // Routes diff --git a/src/routes/manifest.webmanifest/+server.ts b/src/routes/manifest.webmanifest/+server.ts new file mode 100644 index 0000000..57057fb --- /dev/null +++ b/src/routes/manifest.webmanifest/+server.ts @@ -0,0 +1,29 @@ +import conf from '$lib/config'; +import { RequestHandler } from '$lib/types'; + +export const prerender = true; + +/** @type {import('./$types').RequestHandler} */ +export const GET: RequestHandler = ({ setHeaders }) => { + const { backgroundColor, description, /* siteShortTitle, */ title, themeColor } = conf; + + const manifest = { + name: title, + // short_name: siteShortTitle, + description, + start_url: '/', + background_color: backgroundColor, + theme_color: themeColor, + display: 'standalone', + icons: [ + { src: '/profile-pic.png', type: 'image/png', sizes: '540x540' }, + { src: '/icon-512.png', type: 'image/png', sizes: '512x512' } + ] + }; + + setHeaders({ + 'content-type': 'application/json' + }); + + return new Response(JSON.stringify(manifest)); +};