samantha's personal website!~ ✨ samanthanguyen.me
0
fork

Configure Feed

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

make a Quote component, reduce nesting, other cleanup

+57 -71
+9 -5
eslint.config.js
··· 1 - import js from '@eslint/js'; 2 - import svelte from 'eslint-plugin-svelte'; 3 - import globals from 'globals'; 4 - import ts from 'typescript-eslint'; 1 + import js from '@eslint/js' 2 + import svelte from 'eslint-plugin-svelte' 3 + import globals from 'globals' 4 + import ts from 'typescript-eslint' 5 5 6 6 export default ts.config( 7 + { 8 + ignores: [ 9 + '.svelte-kit/' 10 + ] 11 + }, 7 12 js.configs.recommended, 8 13 ...ts.configs.recommended, 9 14 ...svelte.configs["flat/recommended"], ··· 23 28 }, 24 29 { 25 30 files: ["**/*.svelte"], 26 - 27 31 languageOptions: { 28 32 parserOptions: { 29 33 parser: ts.parser
+2 -1
package.json
··· 9 9 "preview": "vite preview", 10 10 "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", 11 11 "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", 12 - "lint": "eslint ." 12 + "lint": "eslint .", 13 + "fix": "eslint . --fix" 13 14 }, 14 15 "devDependencies": { 15 16 "@sveltejs/adapter-auto": "^3.0.0",
+4 -4
postcss.config.js
··· 1 1 export default { 2 - plugins: { 3 - tailwindcss: {}, 4 - autoprefixer: {} 5 - } 2 + plugins: { 3 + tailwindcss: {}, 4 + autoprefixer: {} 5 + } 6 6 };
+1 -1
src/lib/Footer.svelte src/lib/layout/Footer.svelte
··· 1 1 <script lang="ts"> 2 2 import { IconBrandBluesky, IconBrandGithubFilled, IconMailFilled } from '@tabler/icons-svelte' 3 3 import { twJoin } from 'tailwind-merge' 4 - import ExternalLink from './ExternalLink.svelte' 4 + import ExternalLink from '$lib/ExternalLink.svelte' 5 5 </script> 6 6 7 7 <div class="h-0 lg:h-[1px] bg-separator-light dark:bg-separator-dark"></div>
src/lib/Header.svelte src/lib/layout/Header.svelte
+9
src/lib/Quote.svelte
··· 1 + <script lang="ts"> 2 + let { children, author } = $props() 3 + </script> 4 + <blockquote class="flex flex-col gap-2 italic font-sans text-sm"> 5 + <p> 6 + {"\""}{@render children()}{"\""} 7 + </p> 8 + <cite class="text-right">—{author}</cite> 9 + </blockquote>
+4 -7
src/routes/+layout.svelte
··· 2 2 import "../app.css"; 3 3 import "@fontsource-variable/public-sans"; 4 4 import '@fontsource-variable/domine'; // Supports weights 400-700 5 - import { twJoin } from "tailwind-merge"; 5 + import { twJoin } from "tailwind-merge"; 6 6 let { children } = $props(); 7 7 </script> 8 8 ··· 14 14 <div class={twJoin( 15 15 "mx-8 max-w-lg", 16 16 "lg:mx-auto lg:max-w-xl", 17 + "flex flex-col gap-6 lg:gap-8", 18 + "selection:bg-pink-200 selection:text-pink-700", 19 + "dark:selection:bg-white dark:selection:text-zinc-950" 17 20 )}> 18 - <section class={twJoin( 19 - "flex flex-col gap-6 lg:gap-8", 20 - "selection:bg-pink-200 selection:text-pink-700", 21 - "dark:selection:bg-white dark:selection:text-zinc-950" 22 - )}> 23 21 {@render children()} 24 - </section> 25 22 </div>
+14 -12
src/routes/+page.svelte
··· 1 1 <script> 2 - import Footer from '$lib/Footer.svelte' 3 - import Header from '$lib/Header.svelte' 2 + import Footer from '$lib/layout/Footer.svelte' 3 + import Header from '$lib/layout/Header.svelte' 4 + import Quote from '$lib/Quote.svelte' 5 + import { twJoin } from 'tailwind-merge' 4 6 </script> 5 7 6 8 <Header /> 7 9 <main class="flex flex-col gap-8 lg:gap-12"> 8 - <span class="flex flex-col gap-6 lg:gap-8 font-domine text-sm lg:text-base text-left lg:text-balance"> 10 + <span class={twJoin( 11 + "flex flex-col gap-6 lg:gap-8", 12 + "font-domine text-sm lg:text-base text-left lg:text-balance" 13 + )}> 9 14 <p> 10 15 I've most recently worked as a Research Assistant 11 16 at the Security & Privacy Research Lab ··· 18 23 Besides programming, I've enjoyed fine arts since I was a child, 19 24 and hope to one day work in a field where I can combine both, 20 25 such as a developer for a video game and/or video game engine. 21 - {`:-)`} 26 + Here's to the future. {`:-)`} 22 27 </p> 23 28 </span> 24 - <blockquote class="flex flex-col gap-2 italic font-sans text-sm"> 25 - <p> 26 - "We adventure together, explore together, and capture wonderful memories together. 27 - In the journeys to come, we will "trailblaze" more beautiful moments, preserving 28 - them with our camera, our eyes, and our hearts." 29 - </p> 30 - <cite class="text-right">—Honkai Star Rail</cite> 31 - </blockquote> 29 + <Quote author="Honkai Star Rail"> 30 + We adventure together, explore together, and capture wonderful memories together. 31 + In the journeys to come, we will "trailblaze" more beautiful moments, preserving 32 + them with our camera, our eyes, and our hearts. 33 + </Quote> 32 34 </main> 33 35 <Footer />
-25
src/routes/resume/+page.svelte
··· 1 - <script> 2 - import Footer from '$lib/Footer.svelte' 3 - import { twJoin } from 'tailwind-merge' 4 - </script> 5 - 6 - <header class="flex flex-col gap-2"> 7 - <h1 class={twJoin( 8 - "pt-12 flex items-end", 9 - "text-2xl lg:text-4xl font-domine font-bold lg:font-medium", 10 - )}> 11 - samanthanguyen.me 12 - </h1> 13 - <span class={twJoin( 14 - "text-sm lg:text-base dark:text-zinc-500", 15 - "font-domine", 16 - )}> 17 - she / her. artist, software engineer, aspiring computer scientist 18 - </span> 19 - </header> 20 - 21 - <main class="flex flex-col gap-8 lg:gap-12"> 22 - 23 - </main> 24 - 25 - <Footer />
+7 -9
svelte.config.js
··· 4 4 5 5 /** @type {import('@sveltejs/kit').Config} */ 6 6 const config = { 7 - // Consult https://svelte.dev/docs/kit/integrations 8 - // for more information about preprocessors 9 - preprocess: [vitePreprocess(), mdsvex()], 10 - 11 - kit: { 7 + // Consult https://svelte.dev/docs/kit/integrations 8 + // for more information about preprocessors 9 + preprocess: [vitePreprocess(), mdsvex()], 10 + kit: { 12 11 // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list. 13 12 // If your environment is not supported, or you settled on a specific environment, switch out the adapter. 14 13 // See https://svelte.dev/docs/kit/adapters for more information about adapters. 15 14 adapter: adapter() 16 15 }, 16 + extensions: [".svelte", ".svx"] 17 + } 17 18 18 - extensions: [".svelte", ".svx"] 19 - }; 20 - 21 - export default config; 19 + export default config
+5 -5
tailwind.config.ts
··· 1 - import type { Config } from 'tailwindcss'; 1 + import type { Config } from 'tailwindcss' 2 2 3 3 export default { 4 4 content: ['./src/**/*.{html,js,svelte,ts}'], ··· 11 11 backgroundImage: { 12 12 'separator-light': 'linear-gradient(to right, transparent, #CFB4C5 50%, transparent)', 13 13 'separator-dark': 'linear-gradient(to right, transparent, rgb(39 39 42), transparent)', 14 - } 15 - } 14 + }, 15 + }, 16 16 }, 17 - plugins: [] 18 - } satisfies Config; 17 + plugins: [], 18 + } satisfies Config
+2 -2
vite.config.ts
··· 1 - import { sveltekit } from '@sveltejs/kit/vite'; 2 - import { defineConfig } from 'vite'; 1 + import { sveltekit } from '@sveltejs/kit/vite' 2 + import { defineConfig } from 'vite' 3 3 4 4 export default defineConfig({ 5 5 plugins: [sveltekit()]