{#if content.__component === "content.text-markdown"} {#if content.type === "paragraph"} - + + + + + {:else if content.type === "infobox"} - - Info - + + + + {/if} {:else if content.__component === "content.image"} diff --git a/src/global.scss b/src/global.scss index 3abddf3..fad1825 100644 --- a/src/global.scss +++ b/src/global.scss @@ -1,9 +1,59 @@ @import url(sanitize.css); @import "$lib/vars.scss"; +@font-face { + font-family: "Filo"; + font-style: normal; + font-weight: 500; + src: local(""), url("/fonts/Filo/Filo.otf"), url("/fonts/Filo/Filo.ttf"); +} + +@font-face { + font-family: "GradientVector"; + font-style: normal; + font-weight: 500; + src: local(""), url("/fonts/GradientVector/GradientVector.otf"); +} + + +@font-face { + font-family: "Manifold"; + font-style: normal; + font-weight: 500; + src: local(""), url("/fonts/Manifold/manifold.otf"), url("/fonts/Manifold/manifold.ttf"); +} + + +@font-face { + font-family: "3270"; + font-style: normal; + font-weight: 500; + src: local(""), url("/fonts/3270/3270SemiCondensed-Regular.otf"), url("/fonts/3270/3270SemiCondensed-Regular.ttf"); +} + +:root { + --color-background: #2B1C3D; + --color-background-light: #3A2A4D; + --color-foreground: #ffffff; + --color-foreground-tint: #ffd1f8; + --color-foreground-dim: #acbacd; + --color-primary: #ff79c6; + --color-purple: #bd93f9; + --color-cyan: #8be9fd; + --color-green: #50fa7b; + --color-red: #ff5555; + --color-orange: #ffb86c; + --color-yellow: #f1fa8c; + --color-image-frame: #fff; + --color-image-frame-text: #204; + + --font-primary: Manifold, Lexend, Arial, Helvetica, sans-serif; + --font-readable: "3270", Lexend, Arial, Helvetica, sans-serif; +} + @layer default { body { - font-family: Lexend, Arial, Helvetica, sans-serif; + font-family: var(--font-primary); color: var(--color-foreground); background-color: var(--color-background); font-size: 14pt; @@ -25,7 +75,7 @@ display: flex; flex-direction: row; } - + .flex-column { display: flex; flex-direction: column; @@ -35,11 +85,4 @@ text-decoration: inherit; color: inherit; } -} - -@font-face { - font-family: "Filo"; - font-style: normal; - font-weight: 500; - src: local(""), url("/fonts/Filo/Filo.ttf"), url("/fonts/Filo/Filo.otf"); -} +} \ No newline at end of file diff --git a/src/hooks.server.ts b/src/hooks.server.ts new file mode 100644 index 0000000..746092f --- /dev/null +++ b/src/hooks.server.ts @@ -0,0 +1,8 @@ +import type { Handle } from "@sveltejs/kit"; + +export const handle = (async ({ event, resolve }) => { + const lang = event.url.searchParams.get("lang") ?? "en"; + return resolve(event, { + transformPageChunk: ({ html }) => html.replace("%lang%", lang), + }); +}) satisfies Handle; diff --git a/src/lib/cms/blog.ts b/src/lib/cms/blog.ts index 9d7089d..796535b 100644 --- a/src/lib/cms/blog.ts +++ b/src/lib/cms/blog.ts @@ -4,6 +4,7 @@ import fetchApi from "./client"; export type BlogPostTeaser = { id: number; attributes: { + locale: string; title: string; createdAt: string; updatedAt: string; diff --git a/src/lib/vars.scss b/src/lib/vars.scss index ecd64fc..44995a1 100644 --- a/src/lib/vars.scss +++ b/src/lib/vars.scss @@ -1,19 +1,3 @@ -:root { - --color-background: #2B1C3D; - --color-background-light: #3A2A4D; - --color-foreground: #ffffff; - --color-foreground-tint: #ffd1f8; - --color-foreground-dim: #acbacd; - --color-primary: #ff79c6; - --color-purple: #bd93f9; - --color-cyan: #8be9fd; - --color-green: #50fa7b; - --color-red: #ff5555; - --color-orange: #ffb86c; - --color-yellow: #f1fa8c; - --color-image-frame: #fff; - --color-image-frame-text: #204; -} @mixin mobile() { @media (max-width: 600px) { diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 878c4fc..8b8f379 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,6 +1,7 @@ @@ -8,10 +9,13 @@
-

+ Heyyy. I'm a software developer and tinkerer from Germany. I do a lot of stuff so this website is an attempt in providing an overview. -

+

+ Right now it's very much a work in progress as I'm figuring out how to + properly design a website (lol). But there's already some content to explore. +
{ +export const load: PageServerLoad = async ({ params }) => { try { const slug = params.slug; const post = await getPost(slug); @@ -16,7 +14,7 @@ export const load: PageLoad = async ({ } catch (err: any) { console.error(err); return { - posts: [], + post: undefined, error: { message: "Could not load blog post :(", code: 500, diff --git a/src/routes/blog/[slug]/+page.svelte b/src/routes/blog/[slug]/+page.svelte index 702c2e8..b059371 100644 --- a/src/routes/blog/[slug]/+page.svelte +++ b/src/routes/blog/[slug]/+page.svelte @@ -1,12 +1,32 @@ {#if data.post} @@ -21,7 +41,11 @@

{post.attributes.title}

by {author?.name}

{#if collection} -

in {collection?.name}

+

+ in {collection?.name} +

{/if} {formatDateRelative(post.attributes.publishedAt)}
@@ -37,12 +61,10 @@ {/if}
- - {#each post.attributes.content as contentEntry} - - {/each} - -{:else} + {#each post.attributes.content as contentEntry} + + {/each} +{:else if !data.error} {/if} diff --git a/static/fonts/3270/3270-Regular.otf b/static/fonts/3270/3270-Regular.otf new file mode 100644 index 0000000..52b3ab8 Binary files /dev/null and b/static/fonts/3270/3270-Regular.otf differ diff --git a/static/fonts/3270/3270-Regular.ttf b/static/fonts/3270/3270-Regular.ttf new file mode 100644 index 0000000..3fa73e7 Binary files /dev/null and b/static/fonts/3270/3270-Regular.ttf differ diff --git a/static/fonts/3270/3270Condensed-Regular.otf b/static/fonts/3270/3270Condensed-Regular.otf new file mode 100644 index 0000000..43f5e6e Binary files /dev/null and b/static/fonts/3270/3270Condensed-Regular.otf differ diff --git a/static/fonts/3270/3270Condensed-Regular.ttf b/static/fonts/3270/3270Condensed-Regular.ttf new file mode 100644 index 0000000..4567827 Binary files /dev/null and b/static/fonts/3270/3270Condensed-Regular.ttf differ diff --git a/static/fonts/3270/3270SemiCondensed-Regular.otf b/static/fonts/3270/3270SemiCondensed-Regular.otf new file mode 100644 index 0000000..0639bdd Binary files /dev/null and b/static/fonts/3270/3270SemiCondensed-Regular.otf differ diff --git a/static/fonts/3270/3270SemiCondensed-Regular.ttf b/static/fonts/3270/3270SemiCondensed-Regular.ttf new file mode 100644 index 0000000..83dd9c2 Binary files /dev/null and b/static/fonts/3270/3270SemiCondensed-Regular.ttf differ diff --git a/static/fonts/3270/LICENSE.txt b/static/fonts/3270/LICENSE.txt new file mode 100644 index 0000000..3ca71cb --- /dev/null +++ b/static/fonts/3270/LICENSE.txt @@ -0,0 +1,49 @@ +Copyright (c) 2011-2017, Ricardo Banffy. +Copyright (c) 1993-2011, Paul Mattes. +Copyright (c) 2004-2005, Don Russell. +Copyright (c) 2004, Dick Altenbern. +Copyright (c) 1990, Jeff Sparkes. +Copyright (c) 1989, Georgia Tech Research Corporation (GTRC), Atlanta, GA 30332. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Ricardo Banffy, Paul Mattes, Don Russell, + Dick Altenbern, Jeff Sparkes, GTRC nor the names of their contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL RICARDO BANFFY, PAUL MATTES, DON RUSSELL, DICK ALTENBERN, JEFF +SPARKES OR GTRC BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The Debian Logo glyph is based on the Debian Open Use Logo and is +Copyright (c) 1999 Software in the Public Interest, Inc., and it is +incorporated here under the terms of the Creative Commons +Attribution-ShareAlike 3.0 Unported License. The logo is released +under the terms of the GNU Lesser General Public License, version 3 or +any later version, or, at your option, of the Creative Commons +Attribution-ShareAlike 3.0 Unported License. + +Ubuntu, the Ubuntu logo and the Circle of Friends symbol are +registered trademarks of Canonical Ltd. + +The Fontforge SFD font description file is optionally licensed under +the SIL Open Font License v1.1 with no Reserved Font Name. This +license is available with a FAQ at http://scripts.sil.org/OFL. diff --git a/static/fonts/GradientVector/GradientVector-Light.otf b/static/fonts/GradientVector/GradientVector-Light.otf new file mode 100644 index 0000000..d86a0c3 Binary files /dev/null and b/static/fonts/GradientVector/GradientVector-Light.otf differ diff --git a/static/fonts/GradientVector/GradientVector.otf b/static/fonts/GradientVector/GradientVector.otf new file mode 100644 index 0000000..f9b8f6b Binary files /dev/null and b/static/fonts/GradientVector/GradientVector.otf differ diff --git a/static/fonts/GradientVector/OFL.txt b/static/fonts/GradientVector/OFL.txt new file mode 100644 index 0000000..96d39dd --- /dev/null +++ b/static/fonts/GradientVector/OFL.txt @@ -0,0 +1,90 @@ +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. \ No newline at end of file diff --git a/static/fonts/Manifold/license.txt b/static/fonts/Manifold/license.txt new file mode 100644 index 0000000..627a351 --- /dev/null +++ b/static/fonts/Manifold/license.txt @@ -0,0 +1,93 @@ +Copyright (c) 2024, George Arnold +(https://fontstruct.com/fontstructors/148542/bufb) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. \ No newline at end of file diff --git a/static/fonts/Manifold/manifold.otf b/static/fonts/Manifold/manifold.otf new file mode 100644 index 0000000..05de60e Binary files /dev/null and b/static/fonts/Manifold/manifold.otf differ diff --git a/static/fonts/Manifold/manifold.ttf b/static/fonts/Manifold/manifold.ttf new file mode 100644 index 0000000..2e7f127 Binary files /dev/null and b/static/fonts/Manifold/manifold.ttf differ