Skip to content

Commit 678617c

Browse files
add hero section and showcases
1 parent 7583998 commit 678617c

20 files changed

Lines changed: 1078 additions & 924 deletions

package.json

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,30 @@
1616
"test": "npm run test:unit -- --run"
1717
},
1818
"devDependencies": {
19-
"@eslint/compat": "^1.2.5",
20-
"@eslint/js": "^9.18.0",
21-
"@sveltejs/adapter-auto": "^6.0.0",
22-
"@sveltejs/kit": "^2.22.0",
23-
"@sveltejs/vite-plugin-svelte": "^6.0.0",
24-
"@tailwindcss/vite": "^4.0.0",
25-
"@vitest/browser": "^3.2.3",
26-
"eslint": "^9.18.0",
27-
"eslint-config-prettier": "^10.0.1",
28-
"eslint-plugin-svelte": "^3.0.0",
29-
"globals": "^16.0.0",
30-
"playwright": "^1.53.0",
31-
"prettier": "^3.4.2",
32-
"prettier-plugin-svelte": "^3.3.3",
33-
"prettier-plugin-tailwindcss": "^0.6.11",
34-
"svelte": "^5.0.0",
35-
"svelte-check": "^4.0.0",
36-
"tailwindcss": "^4.0.0",
37-
"typescript": "^5.0.0",
38-
"typescript-eslint": "^8.20.0",
39-
"vite": "^7.0.4",
40-
"vitest": "^3.2.3",
41-
"vitest-browser-svelte": "^0.1.0"
42-
},
43-
"pnpm": {
44-
"onlyBuiltDependencies": [
45-
"esbuild"
46-
]
19+
"@eslint/compat": "^2.0.0",
20+
"@eslint/js": "^9.39.1",
21+
"@sveltejs/adapter-auto": "^7.0.0",
22+
"@sveltejs/kit": "^2.49.1",
23+
"@sveltejs/vite-plugin-svelte": "^6.2.1",
24+
"@tailwindcss/forms": "^0.5.10",
25+
"@tailwindcss/typography": "^0.5.19",
26+
"@tailwindcss/vite": "^4.1.17",
27+
"@vitest/browser": "^4.0.15",
28+
"eslint": "^9.39.1",
29+
"eslint-config-prettier": "^10.1.8",
30+
"eslint-plugin-svelte": "^3.13.1",
31+
"globals": "^16.5.0",
32+
"playwright": "^1.57.0",
33+
"prettier": "^3.7.4",
34+
"prettier-plugin-svelte": "^3.4.0",
35+
"prettier-plugin-tailwindcss": "^0.7.2",
36+
"svelte": "^5.45.6",
37+
"svelte-check": "^4.3.4",
38+
"tailwindcss": "^4.1.17",
39+
"typescript": "^5.9.3",
40+
"typescript-eslint": "^8.48.1",
41+
"vite": "^7.2.6",
42+
"vitest": "^4.0.15",
43+
"vitest-browser-svelte": "^2.0.1"
4744
}
4845
}

pnpm-lock.yaml

Lines changed: 573 additions & 859 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
onlyBuiltDependencies:
2+
- esbuild
3+
- '@tailwindcss/oxide'

src/app.css

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,138 @@
11
@import 'tailwindcss';
2+
@plugin '@tailwindcss/forms';
3+
@plugin '@tailwindcss/typography';
4+
5+
@custom-variant dark (&:where(.dark, .dark *));
6+
7+
@layer base {
8+
button:not(:disabled) {
9+
cursor: pointer;
10+
}
11+
}
12+
13+
@theme {
14+
/* Primary colors - Orange */
15+
--color-pm50: #fff4ed; /* Palest peach */
16+
--color-pm100: #ffe6d5; /* Very light orange */
17+
--color-pm200: #feccb0; /* Light peachy orange */
18+
--color-pm300: #fdaa82; /* Medium light orange */
19+
--color-pm400: #fc7a4a; /* Light vibrant orange */
20+
--color-pm500: #ff3e00; /* Vivid orange */
21+
--color-pm600: #e63700; /* Medium dark orange */
22+
--color-pm700: #c22f00; /* Dark orange */
23+
--color-pm800: #9e2600; /* Very dark orange */
24+
--color-pm900: #7a1d00; /* Darkest orange-brown */
25+
26+
/* Secondary colors - Slate Gray */
27+
--color-sd50: #f8fafc; /* Almost white slate */
28+
--color-sd100: #f1f5f9; /* Very light slate */
29+
--color-sd200: #e2e8f0; /* Light slate */
30+
--color-sd300: #cbd5e1; /* Medium light slate */
31+
--color-sd400: #94a3b8; /* Light slate gray */
32+
--color-sd500: #64748b; /* Medium slate gray */
33+
--color-sd600: #475569; /* Medium dark slate */
34+
--color-sd700: #334155; /* Dark slate */
35+
--color-sd800: #1e293b; /* Very dark slate */
36+
--color-sd900: #0f172a; /* Darkest slate (almost black) */
37+
38+
/* Background colors */
39+
--color-bg50: #ffffff; /* Pure white (base surface) */
40+
--color-bg100: #fafcfe; /* Almost white with blue hint */
41+
--color-bg200: #f4f7fb; /* Very light blue-gray */
42+
--color-bg300: #eef2f8; /* Pale blue-gray */
43+
--color-bg400: #e5ebf4; /* Light neutral blue-gray */
44+
--color-bg500: #dbe2ee; /* Medium light blue-gray */
45+
--color-bg600: #cbd6e8; /* Mid blue-gray */
46+
--color-bg700: #b3c3dd; /* Medium blue-gray */
47+
--color-bg800: #94a9cf; /* Medium dark blue-gray */
48+
--color-bg900: #6b8bc4; /* Deep muted blue */
49+
50+
/* Text colors */
51+
--color-tx50: #0f172a; /* Darkest text (almost black) */
52+
--color-tx100: #1e293b; /* Very dark text */
53+
--color-tx200: #334155; /* Dark text */
54+
--color-tx300: #475569; /* Medium dark text */
55+
--color-tx400: #64748b; /* Medium text */
56+
--color-tx500: #94a3b8; /* Medium light text */
57+
--color-tx600: #cbd5e1; /* Light text */
58+
--color-tx700: #e2e8f0; /* Lighter text */
59+
--color-tx800: #e5e5e5; /* Very light text (primary) */
60+
--color-tx900: #ffffff; /* Pure white text */
61+
62+
/* Border colors */
63+
--color-bd50: #0a0a0a; /* Darkest border (barely visible) */
64+
--color-bd100: #171717; /* Very dark border */
65+
--color-bd200: #262626; /* Dark border */
66+
--color-bd300: #333333; /* Medium dark border */
67+
--color-bd400: #404040; /* Medium border */
68+
--color-bd500: #525252; /* Medium light border */
69+
--color-bd600: #666666; /* Light border */
70+
--color-bd700: #8a8a8a; /* Lighter border */
71+
--color-bd800: #a3a3a3; /* Very light border */
72+
--color-bd900: #d4d4d4; /* Lightest border */
73+
}
74+
75+
/* Dark Mode */
76+
@layer theme {
77+
.dark {
78+
/* Primary colors - Softer Orange */
79+
--color-pm50: #7a1d00; /* Darkest burnt orange */
80+
--color-pm100: #9e2600; /* Very dark orange */
81+
--color-pm200: #c22f00; /* Dark orange */
82+
--color-pm300: #e63700; /* Medium dark orange */
83+
--color-pm400: #ff5520; /* Medium orange */
84+
--color-pm500: #ff6b3d; /* Softer, lighter orange */
85+
--color-pm600: #ff8461; /* Light orange */
86+
--color-pm700: #ff9d84; /* Lighter peachy orange */
87+
--color-pm800: #ffb8a7; /* Very light orange */
88+
--color-pm900: #ffd3ca; /* Palest peachy orange */
89+
90+
/* Secondary colors - Lighter Slate Gray */
91+
--color-sd50: #0f172a; /* Darkest slate (almost black) */
92+
--color-sd100: #1e293b; /* Very dark slate */
93+
--color-sd200: #334155; /* Dark slate */
94+
--color-sd300: #475569; /* Medium dark slate */
95+
--color-sd400: #64748b; /* Medium slate gray */
96+
--color-sd500: #94a3b8; /* Lighter slate gray */
97+
--color-sd600: #cbd5e1; /* Light slate */
98+
--color-sd700: #e2e8f0; /* Very light slate */
99+
--color-sd800: #f1f5f9; /* Almost white slate */
100+
--color-sd900: #f8fafc; /* Palest slate (almost white) */
101+
102+
/* Background colors */
103+
--color-bg50: #0a0a0a; /* Nearly black (deepest surface) */
104+
--color-bg100: #121212; /* Very dark gray */
105+
--color-bg200: #1a1a1a; /* Dark gray */
106+
--color-bg300: #1e1e1e; /* Dark charcoal gray */
107+
--color-bg400: #262626; /* Medium dark gray */
108+
--color-bg500: #2e2e2e; /* Medium gray */
109+
--color-bg600: #383838; /* Lighter medium gray */
110+
--color-bg700: #4a4a4a; /* Light gray */
111+
--color-bg800: #5c5c5c; /* Lighter gray */
112+
--color-bg900: #707070; /* Lightest gray */
113+
114+
/* Text colors */
115+
--color-tx50: #ffffff; /* Pure white text */
116+
--color-tx100: #f8fafc; /* Almost white */
117+
--color-tx200: #f1f5f9; /* Very light text */
118+
--color-tx300: #cbd5e1; /* Light gray text */
119+
--color-tx400: #94a3b8; /* Medium light gray text */
120+
--color-tx500: #64748b; /* Medium gray text */
121+
--color-tx600: #475569; /* Medium text */
122+
--color-tx700: #334155; /* Dark text */
123+
--color-tx800: #1e293b; /* Very dark text (primary) */
124+
--color-tx900: #0f172a; /* Darkest text (almost black) */
125+
126+
/* Border colors */
127+
--color-bd50: #ffffff; /* White border (invisible) */
128+
--color-bd100: #f8fafc; /* Almost invisible border */
129+
--color-bd200: #f1f5f9; /* Very subtle border */
130+
--color-bd300: #e2e8f0; /* Subtle border */
131+
--color-bd400: #cbd5e1; /* Light border */
132+
--color-bd500: #94a3b8; /* Medium border */
133+
--color-bd600: #64748b; /* Medium dark border */
134+
--color-bd700: #475569; /* Dark border */
135+
--color-bd800: #334155; /* Very dark border */
136+
--color-bd900: #1e293b; /* Darkest border */
137+
}
138+
}

src/app.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,20 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5+
<link rel="icon" href="%sveltekit.assets%/favicon.svg" />
56
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<script>
8+
// Prevent theme flash by applying theme before page renders
9+
(function() {
10+
const stored = localStorage.getItem('theme');
11+
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
12+
const theme = stored || (prefersDark ? 'dark' : 'light');
13+
14+
if (theme === 'dark') {
15+
document.documentElement.classList.add('dark');
16+
}
17+
})();
18+
</script>
619
%sveltekit.head%
720
</head>
821
<body data-sveltekit-preload-data="hover">

src/demo.spec.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/lib/assets/favicon.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/lib/components/GridItem.svelte

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<script lang="ts">
2+
interface Props {
3+
thumbnail: string;
4+
repoName: string;
5+
repoUrl: string;
6+
description: string;
7+
}
8+
9+
let { thumbnail, repoName, repoUrl, description }: Props = $props();
10+
</script>
11+
12+
<a
13+
href={repoUrl}
14+
target="_blank"
15+
rel="noopener noreferrer"
16+
class="group block rounded-lg border border-bd900 dark:border-bd200 bg-bg100 dark:bg-bg200 overflow-hidden transition-all hover:shadow-lg hover:border-pm500"
17+
>
18+
<div class="aspect-video overflow-hidden">
19+
<img
20+
src={thumbnail}
21+
alt={repoName}
22+
class="w-full h-full object-cover transition-transform group-hover:scale-105"
23+
/>
24+
</div>
25+
<div class="p-4">
26+
<h3 class="font-semibold text-tx50 group-hover:text-pm500 transition-colors">
27+
{repoName}
28+
</h3>
29+
<p class="mt-2 text-sm text-tx300">
30+
{description}
31+
</p>
32+
</div>
33+
</a>

src/lib/components/Logo.svelte

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<script lang="ts">
2+
import { asset, resolve } from "$app/paths";
3+
4+
type LogoProps = {
5+
class?: string;
6+
size?: 'sm' | 'md' | 'lg' | 'xl';
7+
text?: string;
8+
showText?: boolean;
9+
}
10+
11+
let { class: className = '', size = 'md', text = '', showText = true }: LogoProps = $props();
12+
13+
let hasLogo = $state(true);
14+
15+
// Size classes for logo image
16+
const sizeClasses = {
17+
sm: 'h-10',
18+
md: 'h-14',
19+
lg: 'h-18',
20+
xl: 'h-22'
21+
};
22+
23+
// Font size classes for logo text - matching MyST's responsive sizing
24+
const textSizeClasses = {
25+
sm: 'text-md sm:text-lg tracking-tight',
26+
md: 'text-md sm:text-xl tracking-tight',
27+
lg: 'text-lg sm:text-2xl tracking-tight',
28+
xl: 'text-xl sm:text-3xl tracking-tight'
29+
};
30+
31+
// Handle fallback to different image formats
32+
function handleImageError(event: Event) {
33+
const img = event.target as HTMLImageElement;
34+
const currentSrc = img.src;
35+
36+
// Try formats in priority order: svg -> png -> jpg -> jpeg
37+
if (currentSrc.endsWith('/logo.svg')) {
38+
img.src = asset('/logo.png');
39+
} else if (currentSrc.endsWith('/logo.png')) {
40+
img.src = asset('/logo.jpg');
41+
} else if (currentSrc.endsWith('/logo.jpg')) {
42+
img.src = asset('/logo.jpeg');
43+
} else {
44+
// All formats failed, hide the logo
45+
hasLogo = false;
46+
}
47+
}
48+
</script>
49+
50+
{#if hasLogo}
51+
<a href={resolve('/')} class="flex items-center gap-3 {className}">
52+
<img
53+
src={asset('/logo.svg')}
54+
alt="Logo"
55+
class="{sizeClasses[size]} w-auto"
56+
onerror={handleImageError}
57+
/>
58+
{#if showText && text}
59+
<span class="{textSizeClasses[size]}">
60+
{text}
61+
</span>
62+
{/if}
63+
</a>
64+
{/if}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<script lang="ts">
2+
import { themeStore } from '$lib/stores/theme.svelte';
3+
</script>
4+
5+
<button
6+
onclick={() => themeStore.toggle()}
7+
class="relative flex h-9 w-9 items-center justify-center rounded-lg text-tx50 transition-all hover:opacity-70"
8+
aria-label="Toggle theme"
9+
title="Toggle theme"
10+
>
11+
{#if themeStore.theme === 'light'}
12+
<!-- Sun Icon -->
13+
<svg
14+
xmlns="http://www.w3.org/2000/svg"
15+
fill="none"
16+
viewBox="0 0 24 24"
17+
stroke-width="1.5"
18+
stroke="currentColor"
19+
class="h-5 w-5"
20+
>
21+
<path
22+
stroke-linecap="round"
23+
stroke-linejoin="round"
24+
d="M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"
25+
/>
26+
</svg>
27+
{:else}
28+
<!-- Moon Icon -->
29+
<svg
30+
xmlns="http://www.w3.org/2000/svg"
31+
fill="none"
32+
viewBox="0 0 24 24"
33+
stroke-width="1.5"
34+
stroke="currentColor"
35+
class="h-5 w-5"
36+
>
37+
<path
38+
stroke-linecap="round"
39+
stroke-linejoin="round"
40+
d="M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"
41+
/>
42+
</svg>
43+
{/if}
44+
</button>

0 commit comments

Comments
 (0)