[READ-ONLY] Mirror of https://github.com/mrgnw/cv.
0

Configure Feed

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

Initial commit

author
Morgan
committer
GitHub
date (Sep 15, 2024, 11:29 PM +0200) commit 32507f51
+375
+21
.gitignore
··· 1 + node_modules 2 + 3 + # Output 4 + .output 5 + .vercel 6 + /.svelte-kit 7 + /build 8 + 9 + # OS 10 + .DS_Store 11 + Thumbs.db 12 + 13 + # Env 14 + .env 15 + .env.* 16 + !.env.example 17 + !.env.test 18 + 19 + # Vite 20 + vite.config.js.timestamp-* 21 + vite.config.ts.timestamp-*
+1
.npmrc
··· 1 + engine-strict=true
+15
README.md
··· 1 + # Svelte 5 template with [shadcn-svelte](http://shadcn-svelte.com) and [mdsvex](http://mdsvex.pngwn.io) 2 + 3 + ### Use this template 4 + 5 + ```sh 6 + appname="svwhatever" 7 + ``` 8 + 9 + ```sh 10 + gh repo create $appname \ 11 + --template https://github.com/mrgnw/shadcn-svelte-template \ 12 + --private --clone 13 + cd $appname 14 + ``` 15 +
bun.lockb

This is a binary file and will not be displayed.

+14
components.json
··· 1 + { 2 + "$schema": "https://shadcn-svelte.com/schema.json", 3 + "style": "default", 4 + "tailwind": { 5 + "config": "tailwind.config.ts", 6 + "css": "src/app.css", 7 + "baseColor": "neutral" 8 + }, 9 + "aliases": { 10 + "components": "$lib/components", 11 + "utils": "$lib/utils" 12 + }, 13 + "typescript": true 14 + }
+30
package.json
··· 1 + { 2 + "name": "vase", 3 + "version": "0.0.1", 4 + "private": true, 5 + "scripts": { 6 + "dev": "vite dev", 7 + "build": "vite build", 8 + "preview": "vite preview", 9 + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", 10 + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" 11 + }, 12 + "devDependencies": { 13 + "@sveltejs/adapter-auto": "^3.0.0", 14 + "@sveltejs/kit": "^2.0.0", 15 + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.6", 16 + "autoprefixer": "^10.4.20", 17 + "mdsvex": "^0.11.2", 18 + "svelte": "^5.0.0-next.1", 19 + "svelte-check": "^4.0.0", 20 + "tailwindcss": "^3.4.9", 21 + "typescript": "^5.0.0", 22 + "vite": "^5.0.3" 23 + }, 24 + "type": "module", 25 + "dependencies": { 26 + "clsx": "^2.1.1", 27 + "tailwind-merge": "^2.5.2", 28 + "tailwind-variants": "^0.2.1" 29 + } 30 + }
+6
postcss.config.js
··· 1 + export default { 2 + plugins: { 3 + tailwindcss: {}, 4 + autoprefixer: {} 5 + } 6 + };
+78
src/app.css
··· 1 + @tailwind base; 2 + @tailwind components; 3 + @tailwind utilities; 4 + 5 + @layer base { 6 + :root { 7 + --background: 0 0% 100%; 8 + --foreground: 0 0% 3.9%; 9 + 10 + --muted: 0 0% 96.1%; 11 + --muted-foreground: 0 0% 45.1%; 12 + 13 + --popover: 0 0% 100%; 14 + --popover-foreground: 0 0% 3.9%; 15 + 16 + --card: 0 0% 100%; 17 + --card-foreground: 0 0% 3.9%; 18 + 19 + --border: 0 0% 89.8%; 20 + --input: 0 0% 89.8%; 21 + 22 + --primary: 0 0% 9%; 23 + --primary-foreground: 0 0% 98%; 24 + 25 + --secondary: 0 0% 96.1%; 26 + --secondary-foreground: 0 0% 9%; 27 + 28 + --accent: 0 0% 96.1%; 29 + --accent-foreground: 0 0% 9%; 30 + 31 + --destructive: 0 72.2% 50.6%; 32 + --destructive-foreground: 0 0% 98%; 33 + 34 + --ring: 0 0% 3.9%; 35 + 36 + --radius: 0.5rem; 37 + } 38 + 39 + .dark { 40 + --background: 0 0% 3.9%; 41 + --foreground: 0 0% 98%; 42 + 43 + --muted: 0 0% 14.9%; 44 + --muted-foreground: 0 0% 63.9%; 45 + 46 + --popover: 0 0% 3.9%; 47 + --popover-foreground: 0 0% 98%; 48 + 49 + --card: 0 0% 3.9%; 50 + --card-foreground: 0 0% 98%; 51 + 52 + --border: 0 0% 14.9%; 53 + --input: 0 0% 14.9%; 54 + 55 + --primary: 0 0% 98%; 56 + --primary-foreground: 0 0% 9%; 57 + 58 + --secondary: 0 0% 14.9%; 59 + --secondary-foreground: 0 0% 98%; 60 + 61 + --accent: 0 0% 14.9%; 62 + --accent-foreground: 0 0% 98%; 63 + 64 + --destructive: 0 62.8% 30.6%; 65 + --destructive-foreground: 0 0% 98%; 66 + 67 + --ring: 0 0% 83.1%; 68 + } 69 + } 70 + 71 + @layer base { 72 + * { 73 + @apply border-border; 74 + } 75 + body { 76 + @apply bg-background text-foreground; 77 + } 78 + }
+13
src/app.d.ts
··· 1 + // See https://kit.svelte.dev/docs/types#app 2 + // for information about these interfaces 3 + declare global { 4 + namespace App { 5 + // interface Error {} 6 + // interface Locals {} 7 + // interface PageData {} 8 + // interface PageState {} 9 + // interface Platform {} 10 + } 11 + } 12 + 13 + export {};
+12
src/app.html
··· 1 + <!doctype html> 2 + <html lang="en"> 3 + <head> 4 + <meta charset="utf-8" /> 5 + <link rel="icon" href="%sveltekit.assets%/favicon.png" /> 6 + <meta name="viewport" content="width=device-width, initial-scale=1" /> 7 + %sveltekit.head% 8 + </head> 9 + <body data-sveltekit-preload-data="hover"> 10 + <div style="display: contents">%sveltekit.body%</div> 11 + </body> 12 + </html>
+1
src/lib/index.ts
··· 1 + // place files you want to import through the `$lib` alias in this folder.
+62
src/lib/utils.ts
··· 1 + import { type ClassValue, clsx } from "clsx"; 2 + import { twMerge } from "tailwind-merge"; 3 + import { cubicOut } from "svelte/easing"; 4 + import type { TransitionConfig } from "svelte/transition"; 5 + 6 + export function cn(...inputs: ClassValue[]) { 7 + return twMerge(clsx(inputs)); 8 + } 9 + 10 + type FlyAndScaleParams = { 11 + y?: number; 12 + x?: number; 13 + start?: number; 14 + duration?: number; 15 + }; 16 + 17 + export const flyAndScale = ( 18 + node: Element, 19 + params: FlyAndScaleParams = { y: -8, x: 0, start: 0.95, duration: 150 } 20 + ): TransitionConfig => { 21 + const style = getComputedStyle(node); 22 + const transform = style.transform === "none" ? "" : style.transform; 23 + 24 + const scaleConversion = ( 25 + valueA: number, 26 + scaleA: [number, number], 27 + scaleB: [number, number] 28 + ) => { 29 + const [minA, maxA] = scaleA; 30 + const [minB, maxB] = scaleB; 31 + 32 + const percentage = (valueA - minA) / (maxA - minA); 33 + const valueB = percentage * (maxB - minB) + minB; 34 + 35 + return valueB; 36 + }; 37 + 38 + const styleToString = ( 39 + style: Record<string, number | string | undefined> 40 + ): string => { 41 + return Object.keys(style).reduce((str, key) => { 42 + if (style[key] === undefined) return str; 43 + return str + `${key}:${style[key]};`; 44 + }, ""); 45 + }; 46 + 47 + return { 48 + duration: params.duration ?? 200, 49 + delay: 0, 50 + css: (t) => { 51 + const y = scaleConversion(t, [0, 1], [params.y ?? 5, 0]); 52 + const x = scaleConversion(t, [0, 1], [params.x ?? 0, 0]); 53 + const scale = scaleConversion(t, [0, 1], [params.start ?? 0.95, 1]); 54 + 55 + return styleToString({ 56 + transform: `${transform} translate3d(${x}px, ${y}px, 0) scale(${scale})`, 57 + opacity: t 58 + }); 59 + }, 60 + easing: cubicOut 61 + }; 62 + };
+1
src/routes/+layout.svelte
··· 1 + <script>import "../app.css";</script><slot></slot>
+2
src/routes/+page.svelte
··· 1 + <h1>Welcome to SvelteKit</h1> 2 + <p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
static/favicon.png

This is a binary file and will not be displayed.

+21
svelte.config.js
··· 1 + import { mdsvex } from "mdsvex"; 2 + import adapter from '@sveltejs/adapter-auto'; 3 + import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; 4 + 5 + /** @type {import('@sveltejs/kit').Config} */ 6 + const config = { 7 + // Consult https://kit.svelte.dev/docs/integrations#preprocessors 8 + // for more information about preprocessors 9 + preprocess: [vitePreprocess(), mdsvex()], 10 + 11 + kit: { 12 + // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. 13 + // If your environment is not supported, or you settled on a specific environment, switch out the adapter. 14 + // See https://kit.svelte.dev/docs/adapters for more information about adapters. 15 + adapter: adapter() 16 + }, 17 + 18 + extensions: [".svelte", ".svx"] 19 + }; 20 + 21 + export default config;
+64
tailwind.config.ts
··· 1 + import { fontFamily } from "tailwindcss/defaultTheme"; 2 + import type { Config } from "tailwindcss"; 3 + 4 + const config: Config = { 5 + darkMode: ["class"], 6 + content: ["./src/**/*.{html,js,svelte,ts}"], 7 + safelist: ["dark"], 8 + theme: { 9 + container: { 10 + center: true, 11 + padding: "2rem", 12 + screens: { 13 + "2xl": "1400px" 14 + } 15 + }, 16 + extend: { 17 + colors: { 18 + border: "hsl(var(--border) / <alpha-value>)", 19 + input: "hsl(var(--input) / <alpha-value>)", 20 + ring: "hsl(var(--ring) / <alpha-value>)", 21 + background: "hsl(var(--background) / <alpha-value>)", 22 + foreground: "hsl(var(--foreground) / <alpha-value>)", 23 + primary: { 24 + DEFAULT: "hsl(var(--primary) / <alpha-value>)", 25 + foreground: "hsl(var(--primary-foreground) / <alpha-value>)" 26 + }, 27 + secondary: { 28 + DEFAULT: "hsl(var(--secondary) / <alpha-value>)", 29 + foreground: "hsl(var(--secondary-foreground) / <alpha-value>)" 30 + }, 31 + destructive: { 32 + DEFAULT: "hsl(var(--destructive) / <alpha-value>)", 33 + foreground: "hsl(var(--destructive-foreground) / <alpha-value>)" 34 + }, 35 + muted: { 36 + DEFAULT: "hsl(var(--muted) / <alpha-value>)", 37 + foreground: "hsl(var(--muted-foreground) / <alpha-value>)" 38 + }, 39 + accent: { 40 + DEFAULT: "hsl(var(--accent) / <alpha-value>)", 41 + foreground: "hsl(var(--accent-foreground) / <alpha-value>)" 42 + }, 43 + popover: { 44 + DEFAULT: "hsl(var(--popover) / <alpha-value>)", 45 + foreground: "hsl(var(--popover-foreground) / <alpha-value>)" 46 + }, 47 + card: { 48 + DEFAULT: "hsl(var(--card) / <alpha-value>)", 49 + foreground: "hsl(var(--card-foreground) / <alpha-value>)" 50 + } 51 + }, 52 + borderRadius: { 53 + lg: "var(--radius)", 54 + md: "calc(var(--radius) - 2px)", 55 + sm: "calc(var(--radius) - 4px)" 56 + }, 57 + fontFamily: { 58 + sans: [...fontFamily.sans] 59 + } 60 + } 61 + }, 62 + }; 63 + 64 + export default config;
+19
tsconfig.json
··· 1 + { 2 + "extends": "./.svelte-kit/tsconfig.json", 3 + "compilerOptions": { 4 + "allowJs": true, 5 + "checkJs": true, 6 + "esModuleInterop": true, 7 + "forceConsistentCasingInFileNames": true, 8 + "resolveJsonModule": true, 9 + "skipLibCheck": true, 10 + "sourceMap": true, 11 + "strict": true, 12 + "moduleResolution": "bundler" 13 + } 14 + // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias 15 + // except $lib which is handled by https://kit.svelte.dev/docs/configuration#files 16 + // 17 + // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes 18 + // from the referenced tsconfig.json - TypeScript does not merge them in 19 + }
+9
use_template.sh
··· 1 + #! /bin/bash 2 + 3 + word(){ sed `perl -e "print int rand(99999)"`"q;d" /usr/share/dict/words } 4 + 5 + appname=$1 6 + gh repo create $appname \ 7 + --template https://github.com/mrgnw/shadcn-svelte-template \ 8 + --private --clone 9 + cd $appname
+6
vite.config.ts
··· 1 + import { sveltekit } from '@sveltejs/kit/vite'; 2 + import { defineConfig } from 'vite'; 3 + 4 + export default defineConfig({ 5 + plugins: [sveltekit()] 6 + });