Mirror of the sourcecode for my blog, original repo: https://github.com/NobbZ/blog-nobbz-dev
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

mixed chagnes and formatting :(

+78 -48
+43 -29
src/content/schemas/authors.ts
··· 1 1 import { defineCollection, z } from "astro:content"; 2 2 3 - const catchall = z.object({ 4 - icon: z.string().url(), 5 - displayText: z.string(), 6 - href: z.string().url(), 7 - }).partial({ icon: true }); 3 + const catchall = z 4 + .object({ 5 + icon: z.string().url(), 6 + displayText: z.string(), 7 + href: z.string().url(), 8 + }) 9 + .partial({ icon: true }); 8 10 9 - const funding = z.object({ 10 - amazon: z.string().url(), 11 - github: z.string(), 12 - kofi: z.string(), 13 - patreon: z.string(), 14 - polar: z.string(), 15 - }).catchall(catchall).partial(); 11 + const funding = z 12 + .object({ 13 + amazon: z.string().url(), 14 + github: z.string(), 15 + kofi: z.string(), 16 + patreon: z.string(), 17 + polar: z.string(), 18 + }) 19 + .catchall(catchall) 20 + .partial(); 16 21 17 - const social = z.object({ 18 - github: z.string(), 19 - gitlab: z.string(), 20 - linkedin: z.string(), 21 - twitter: z.string(), 22 - }).catchall(catchall).partial(); 22 + const social = z 23 + .object({ 24 + github: z.string(), 25 + gitlab: z.string(), 26 + linkedin: z.string(), 27 + twitter: z.string(), 28 + }) 29 + .catchall(catchall) 30 + .partial(); 23 31 24 - const web = z.object({ 25 - homepage: z.string().url(), 26 - }).catchall(catchall).partial(); 32 + const web = z 33 + .object({ 34 + homepage: z.string().url(), 35 + }) 36 + .catchall(catchall) 37 + .partial(); 27 38 28 - const schema = z.object({ 29 - first_name: z.string(), 30 - last_name: z.string(), 31 - nick_name: z.string(), 32 - funding, 33 - social, 34 - web, 35 - }).partial().required({ nick_name: true }); 39 + const schema = z 40 + .object({ 41 + first_name: z.string(), 42 + last_name: z.string(), 43 + nick_name: z.string(), 44 + funding, 45 + social, 46 + web, 47 + }) 48 + .partial() 49 + .required({ nick_name: true }); 36 50 37 51 export const authors = defineCollection({ 38 52 type: "content",
+19 -6
src/layouts/NobbzDev.astro
··· 13 13 <meta name="generator" content={Astro.generator} /> 14 14 <title>{title}</title> 15 15 </head> 16 - <body> 16 + <body 17 + class:list={[ 18 + "mocha", 19 + "bg-gradient-to-b", 20 + "from-base", 21 + "to-crust", 22 + "min-h-screen", 23 + "bg-fixed", 24 + ]} 25 + > 17 26 <div 18 27 class:list={[ 19 - "w-1/1", 20 - "md:w-[1024px]", 28 + "flex", 29 + "flex-col", 21 30 "m-auto", 22 - "md:border-4", 23 - "rounded-[12px]", 31 + "min-h-screen", 32 + "justify-center", 33 + "text-text", 24 34 ]} 25 35 > 26 - <div class:list={["md:flex"]}> 36 + <div class:list={["flex", "md:flex-row", "flex-col", "flex-none"]}> 27 37 <div 28 38 id="main" 29 39 class:list={[ 40 + "flex-none", 30 41 "w-1/1", 31 42 "border-4", 32 43 "p-1", ··· 39 50 </div> 40 51 <NavBox /> 41 52 </div> 53 + <div class:list={["flex-auto"]}></div> 42 54 <footer 43 55 id="bottom" 44 56 class:list={[ 57 + "flex-none", 45 58 "w-1/1", 46 59 "border-4", 47 60 "mt-1",
+10 -5
src/scripts/authors.ts
··· 3 3 export type Author = CollectionEntry<"authors">; 4 4 5 5 export type WithPosts<T extends Author> = T & { 6 - posts: CollectionEntry<"blog">[], 6 + posts: CollectionEntry<"blog">[]; 7 7 }; 8 8 9 - export const withPosts = async <T extends Author>(author: T): Promise<WithPosts<T>> => { 10 - const posts = await getCollection("blog", ({ data: { author: postAuthor } }) => author.slug == postAuthor.slug); 9 + export const withPosts = async <T extends Author>( 10 + author: T, 11 + ): Promise<WithPosts<T>> => { 12 + const posts = await getCollection( 13 + "blog", 14 + ({ data: { author: postAuthor } }) => author.slug == postAuthor.slug, 15 + ); 11 16 12 - return { ...author, posts } 13 - } 17 + return { ...author, posts }; 18 + };
+5 -5
src/styles/base.css
··· 3 3 @tailwind utilities; 4 4 5 5 * { 6 - --background-color: black; 7 - --text-color: aliceblue; 8 - --highlight-color: aqua; 6 + /* --background-color: black; */ 7 + /* --text-color: aliceblue; */ 8 + /* --highlight-color: aqua; */ 9 9 } 10 10 11 11 body { 12 - background-color: var(--background-color); 13 - color: var(--text-color); 12 + /* background-color: var(--background-color); */ 13 + /* color: var(--text-color); */ 14 14 } 15 15 16 16 #main {
+1 -3
tailwind.config.mjs
··· 13 13 }, 14 14 }, 15 15 }, 16 - plugins: [ 17 - require("@catppuccin/tailwindcss")({defaultFlavour: "mocha"}), 18 - ], 16 + plugins: [require("@catppuccin/tailwindcss")({ defaultFlavour: "mocha" })], 19 17 };