Refactors theme store

This commit is contained in:
Alicia Sykes committed 2025-10-14 07:43:32 +01:00
1 parent aae9e63fa1
commit 5a13527c38
16 files changed
+974 -661

No files matched your search

@@ -235,7 +235,7 @@
aria-checked={$currentTheme === themeOption.id}
disabled={!themeOption.available}
>
<div class="theme-preview theme-preview-{themeOption.id}"></div>
<div class="theme-preview" style="background: {themeOption.preview || 'var(--bg-secondary)'}"></div>
<span>
{themeOption.name}
{!themeOption.available ? ' (Soon)' : ''}
@@ -447,7 +447,7 @@
class="css-editor"
placeholder="/* Enter your custom CSS here */"
spellcheck="false"
rows="10"
rows="5"
></textarea>
<div class="css-meta">
@@ -607,14 +607,17 @@
}
}
.theme-options,
.theme-options {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
gap: var(--spacing-xs);
}
.additional-themes {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
gap: var(--spacing-xs);
.additional-themes {
grid-column: 1 / -1;
}
grid-column: 1 / -1;
}
.theme-option {
@@ -653,40 +656,6 @@
height: 1rem;
border-radius: var(--radius-xs);
border: 1px solid var(--border-secondary);
&.theme-preview-light {
background: linear-gradient(135deg, #f4f2fa 50%, #fff 50%);
}
&.theme-preview-dark {
background: linear-gradient(135deg, #0d1117 50%, #161b22 50%);
}
&.theme-preview-ocean {
background: linear-gradient(135deg, #131c2b 50%, #70edb7 50%);
}
&.theme-preview-purple {
background: linear-gradient(135deg, #13182b 50%, #cca6ff 50%);
}
&.theme-preview-cyberpunk {
background: linear-gradient(135deg, #000308 30%, #f700ff 70%);
box-shadow: 0 0 8px rgba(0, 255, 204, 0.4);
}
&.theme-preview-midnight {
background: linear-gradient(135deg, #0a0e27 50%, #5e72e4 50%);
}
&.theme-preview-arctic {
background: linear-gradient(135deg, #f0f4f8 50%, #00acc1 50%);
}
&.theme-preview-terminal {
background: linear-gradient(135deg, #000000 50%, #00ff00 50%);
}
&.theme-preview-lightpurple {
background: linear-gradient(135deg, #fafafa 50%, #cca6ff 50%);
}
&.theme-preview-muteddark {
background: linear-gradient(135deg, #21252b 50%, #f1f86d 50%);
}
&.theme-preview-solarized {
background: linear-gradient(135deg, #002b36 50%, #268bd2 50%);
}
}
.language-dropdown {
@@ -1268,7 +1237,7 @@
width: 100%;
justify-content: center;
background: var(--color-error);
color: white;
color: var(--bg-secondary);
border-color: var(--color-error);
&:hover {
@@ -624,7 +624,7 @@
font-weight: 600;
padding: 2px var(--spacing-xs);
background-color: var(--color-primary);
color: white;
color: var(--bg-secondary);
border-radius: var(--radius-sm);
}
@@ -862,7 +862,7 @@
gap: var(--spacing-xs);
padding: var(--spacing-sm) var(--spacing-md);
background: var(--color-primary-dark);
color: white;
color: var(--bg-secondary);
border: none;
border-radius: var(--radius-md);
cursor: pointer;
+1 -1
View File
@@ -669,7 +669,7 @@
&::after {
opacity: 1;
color: white;
color: var(--bg-secondary);
}
}
}
@@ -399,7 +399,7 @@
.copy-btn.copied,
.copy-btn-small.copied {
background-color: var(--color-success);
color: white;
color: var(--bg-secondary);
border-color: var(--color-success);
}
@@ -623,7 +623,7 @@
&.copied {
background: var(--color-success);
color: white;
color: var(--bg-secondary);
border-color: var(--color-success);
transform: scale(1.05);
}
@@ -607,7 +607,7 @@
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
color: var(--bg-secondary);
font-size: 14px;
font-weight: bold;
line-height: 1;
+1
View File
@@ -293,6 +293,7 @@ export const iconMap: Record<string, string> = {
'clipboard-list': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M203.7 133.8C211.3 122.9 208.7 108 197.8 100.4C186.9 92.8 172 95.4 164.4 106.3L124.7 162.8L105 143C95.6 133.7 80.4 133.7 71 143C61.6 152.3 61.7 167.6 71 177L111 217C116 222 123 224.6 130.1 223.9C137.2 223.2 143.6 219.6 147.7 213.8L203.7 133.8zM203.7 293.8C211.3 282.9 208.7 268 197.8 260.4C186.9 252.8 172 255.4 164.4 266.3L124.7 322.8L105 303C95.6 293.6 80.4 293.6 71.1 303C61.8 312.4 61.7 327.6 71 337L111 377C116 382 123 384.6 130.1 383.9C137.2 383.2 143.6 379.6 147.7 373.8L203.7 293.8zM256 160C256 173.3 266.7 184 280 184L552 184C565.3 184 576 173.3 576 160C576 146.7 565.3 136 552 136L280 136C266.7 136 256 146.7 256 160zM256 320C256 333.3 266.7 344 280 344L552 344C565.3 344 576 333.3 576 320C576 306.7 565.3 296 552 296L280 296C266.7 296 256 306.7 256 320zM224 480C224 493.3 234.7 504 248 504L552 504C565.3 504 576 493.3 576 480C576 466.7 565.3 456 552 456L248 456C234.7 456 224 466.7 224 480zM160 480C160 462.3 145.7 448 128 448C110.3 448 96 462.3 96 480C96 497.7 110.3 512 128 512C145.7 512 160 497.7 160 480z"/></svg>`,
palette: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 320C112 434.9 205.1 528 320 528C322.9 528 325.8 527.9 328.6 527.8C329.4 527.8 329.8 527.6 330.2 527.4C330.6 527.2 331.3 526.7 332.2 525.6C334.1 523.3 336 519.1 336 513.8C336 512.1 335.4 508.2 330.4 496.7C329.9 495.5 329.2 494 328.5 492.4C324.3 482.9 317.4 467.4 314.1 451.8C312.7 445.4 312 438.7 312 432C312 379 355 336 408 336L505.9 336C513.6 336 520 333.3 523.7 330.2C527 327.5 527.9 324.9 527.9 322.2C527.9 321.5 527.9 320.8 527.9 320C527.9 205.1 434.8 112 319.9 112C205 112 112 205.1 112 320zM224 320C224 337.7 209.7 352 192 352C174.3 352 160 337.7 160 320C160 302.3 174.3 288 192 288C209.7 288 224 302.3 224 320zM256 224C256 241.7 241.7 256 224 256C206.3 256 192 241.7 192 224C192 206.3 206.3 192 224 192C241.7 192 256 206.3 256 224zM352 192C352 209.7 337.7 224 320 224C302.3 224 288 209.7 288 192C288 174.3 302.3 160 320 160C337.7 160 352 174.3 352 192zM448 224C448 241.7 433.7 256 416 256C398.3 256 384 241.7 384 224C384 206.3 398.3 192 416 192C433.7 192 448 206.3 448 224z"/><path d="M528 322.2C528 324.9 527 327.4 523.8 330.2C520 333.3 513.7 336 506 336L408 336C355 336 312 379 312 432C312 438.8 312.7 445.4 314.1 451.8C317.4 467.5 324.3 482.9 328.5 492.4L328.5 492.4C329.2 494 329.9 495.4 330.4 496.7C335.4 508.2 336 512.1 336 513.8C336 519.1 334.1 523.3 332.2 525.6C331.3 526.7 330.6 527.2 330.2 527.4C329.9 527.6 329.4 527.7 328.6 527.8C325.7 527.9 322.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112C434.9 112 528 205.1 528 320C528 320.7 528 321.4 528 322.2zM576 322.7C576 321.8 576 320.9 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576C323.5 576 327.1 575.9 330.6 575.8C362.4 574.5 384 545.7 384 513.8C384 499.3 377.9 485.5 371.9 471.8C367.6 462 363.2 452.1 361.1 441.9C360.4 438.7 360.1 435.4 360.1 432C360.1 405.5 381.6 384 408.1 384L506 384C542.5 384 575.7 359.2 576.1 322.7zM224 320C224 302.3 209.7 288 192 288C174.3 288 160 302.3 160 320C160 337.7 174.3 352 192 352C209.7 352 224 337.7 224 320zM224 256C241.7 256 256 241.7 256 224C256 206.3 241.7 192 224 192C206.3 192 192 206.3 192 224C192 241.7 206.3 256 224 256zM352 192C352 174.3 337.7 160 320 160C302.3 160 288 174.3 288 192C288 209.7 302.3 224 320 224C337.7 224 352 209.7 352 192zM416 256C433.7 256 448 241.7 448 224C448 206.3 433.7 192 416 192C398.3 192 384 206.3 384 224C384 241.7 398.3 256 416 256z"/></svg>`,
undo: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M172.9 208L195.5 513.2C196.1 521.6 203.1 528 211.5 528L428.6 528C437 528 443.9 521.5 444.6 513.2L467.1 208L172.9 208zM223 319L287 255C296.4 245.6 311.6 245.6 320.9 255C330.2 264.4 330.3 279.6 320.9 288.9L297.9 311.9L328 311.9C376.6 311.9 416 351.3 416 399.9L416 423.9C416 437.2 405.3 447.9 392 447.9C378.7 447.9 368 437.2 368 423.9L368 399.9C368 377.8 350.1 359.9 328 359.9L297.9 359.9L320.9 382.9C330.3 392.3 330.3 407.5 320.9 416.8C311.5 426.1 296.3 426.2 287 416.8L223 352.8C213.6 343.4 213.6 328.2 223 318.9z"/><path d="M232.2 68.8C236.9 56.3 248.8 48 262.2 48L377.8 48C391.1 48 403.1 56.3 407.8 68.8L424 112L520 112C533.3 112 544 122.7 544 136C544 149.3 533.3 160 520 160L120 160C106.7 160 96 149.3 96 136C96 122.7 106.7 112 120 112L216 112L232.2 68.8zM147.6 516.8L124.7 208L172.9 208L195.5 513.2C196.1 521.6 203.1 528 211.5 528L428.6 528C437 528 443.9 521.5 444.6 513.2L467.2 208L515.3 208L492.4 516.7C489.9 550.1 462.1 576 428.6 576L211.5 576C178 576 150.2 550.1 147.7 516.7zM321 255C330.4 264.4 330.4 279.6 321 288.9L298 311.9L328.1 311.9C376.7 311.9 416.1 351.3 416.1 399.9L416.1 423.9C416.1 437.2 405.4 447.9 392.1 447.9C378.8 447.9 368.1 437.2 368.1 423.9L368.1 399.9C368.1 377.8 350.2 359.9 328.1 359.9L298 359.9L321 382.9C330.4 392.3 330.4 407.5 321 416.8C311.6 426.1 296.4 426.2 287.1 416.8L223.1 352.8C213.7 343.4 213.7 328.2 223.1 318.9L287.1 254.9C296.5 245.5 311.7 245.5 321 254.9z"/></svg>`,
badge: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M166.9 230.9L195.4 276.4C212.1 303.1 212.1 336.9 195.4 363.6L166.9 409.1L223.1 409.1C252.8 409.1 280.2 425.1 294.8 451L320.3 496.3L345.8 451C360.4 425.1 387.8 409.1 417.5 409.1L473.7 409.1L445.2 363.6C428.5 336.9 428.5 303.1 445.2 276.4L473.7 230.9L417.5 230.9C387.8 230.9 360.4 214.9 345.8 189L320.3 143.7L294.8 189C280.2 214.9 252.8 230.9 223.1 230.9L166.9 230.9zM375.7 320C375.7 350.8 350.8 375.7 320 375.7C289.2 375.7 264.3 350.8 264.3 320C264.3 289.2 289.2 264.3 320 264.3C350.8 264.3 375.7 289.2 375.7 320z"/><path d="M360.3 72C360.3 82.3 356.4 91.6 350.1 98.7L387.6 165.4C393.7 176.2 405.1 182.9 417.5 182.9L497.3 182.9C500.3 174.1 506.4 166.4 515.1 161.4C534.2 150.4 558.7 156.9 569.7 176C580.7 195.1 574.2 219.6 555.1 230.6C546.4 235.6 536.7 237 527.6 235.2L486 301.7C479 312.8 479 326.9 486 338L527.6 404.5C536.7 402.7 546.5 404.1 555.1 409.1C574.2 420.1 580.8 444.6 569.7 463.7C558.6 482.8 534.2 489.4 515.1 478.3C506.4 473.3 500.4 465.6 497.3 456.8L417.5 456.8C405.1 456.8 393.7 463.5 387.6 474.3L350.1 541C356.4 548.1 360.3 557.4 360.3 567.7C360.3 589.8 342.4 607.7 320.3 607.7C298.2 607.7 280.3 589.8 280.3 567.7C280.3 557.4 284.2 548.1 290.5 541L253 474.6C246.9 463.8 235.5 457.1 223.1 457.1L143.3 457.1C140.3 465.9 134.2 473.6 125.5 478.6C106.4 489.6 81.9 483.1 70.9 464C59.9 444.9 66.4 420.4 85.5 409.4C94.2 404.4 103.9 403 113 404.8L154.6 338.3C161.5 327.2 161.5 313.1 154.6 302L113 235.3C103.9 237.1 94.1 235.7 85.5 230.7C66.4 219.7 59.8 195.2 70.9 176.1C82 157 106.4 150.3 125.5 161.4C134.2 166.4 140.2 174.1 143.3 182.9L223.1 182.9C235.5 182.9 246.9 176.2 253 165.4L290.5 98.7C284.2 91.6 280.3 82.3 280.3 72C280.3 49.9 298.2 32 320.3 32C342.4 32 360.3 49.9 360.3 72zM320.3 143.6L294.8 188.9C280.2 214.8 252.8 230.8 223.1 230.8L166.9 230.8L195.4 276.3C212.1 303 212.1 336.8 195.4 363.5L166.9 409L223.1 409C252.8 409 280.2 425 294.8 450.9L320.3 496.2L345.8 450.9C360.4 425 387.8 409 417.5 409L473.7 409L445.2 363.5C428.5 336.8 428.5 303 445.2 276.3L473.7 230.8L417.5 230.8C387.8 230.8 360.4 214.8 345.8 188.9L320.3 143.6zM319.7 264C350.6 263.8 375.8 288.8 376 319.7C376.2 350.6 351.2 375.8 320.3 376C289.4 376.2 264.2 351.2 264 320.3C263.8 289.4 288.8 264.2 319.7 264z"/></svg>`,
// 'edit-3': ``,
// 'mail-check': ``,
// 'eye': ``,
+1 -1
View File
@@ -1461,7 +1461,7 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
href: makePath('/diagnostics/tls/ct-log-search'),
label: 'CT Log Search',
description: 'Search Certificate Transparency logs to discover all certificates issued for a domain',
icon: 'certificate',
icon: 'badge',
featured: true,
keywords: [
'ct',
+204
View File
@@ -0,0 +1,204 @@
// import type { Theme } from "$lib/stores/theme";
const primaryCdn = 'https://fonts.googleapis.com/css2?family=';
interface Theme {
id: string;
name: string;
available: boolean;
preview?: string;
font?: {
name: string;
url: string;
fallback?: string;
};
}
const fonts = {
Inter: {
name: 'Inter',
url: `${primaryCdn}Inter:wght@300;400;500;600;700&family=Roboto+Mono:wght@400;500&display=swap`,
fallback: 'sans-serif',
},
Poppins: {
name: 'Poppins',
url: `${primaryCdn}Lora:ital,wght@0,400..700;1,400..700&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap`,
fallback: 'sans',
},
Montserrat: {
name: 'Montserrat',
url: `${primaryCdn}Montserrat:wght@300;400;500;600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap`,
fallback: 'sans-serif',
},
Raleway: {
name: 'Raleway',
url: `${primaryCdn}Raleway:wght@300;400;500;600;700;800&family=Source+Code+Pro:wght@400;500;600;700&display=swap`,
fallback: 'sans-serif',
},
Orbitron: {
name: 'Orbitron',
url: `${primaryCdn}Orbitron:wght@400;500;600;700;800;900&family=Share+Tech+Mono&display=swap`,
fallback: 'monospace',
},
JetBrainsMono: {
name: 'JetBrains Mono',
url: `${primaryCdn}JetBrains+Mono:wght@300;400;500;600;700;800&display=swap`,
fallback: 'monospace',
},
SourceCodePro: {
name: 'Source Code Pro',
url: `${primaryCdn}Source+Code+Pro:wght@300;400;500;600;700&family=Open+Sans:wght@300;400;500;600;700&display=swap`,
fallback: 'monospace',
},
Inconsolata: {
name: 'Inconsolata',
url: `${primaryCdn}Inconsolata:wght@300;400;500;600;700&family=Lato:wght@300;400;700&display=swap`,
fallback: 'monospace',
},
IBMPlexSans: {
name: 'IBM Plex Sans',
url: `${primaryCdn}IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@300;400;500;600&display=swap`,
fallback: 'sans-serif',
},
Ubuntu: {
name: 'Ubuntu',
url: `${primaryCdn}Ubuntu:wght@300;400;500;700&family=Ubuntu+Mono:wght@400;500;700&display=swap`,
fallback: 'monospace',
},
FiraCode: {
name: 'Fira Code',
url: `${primaryCdn}Fira+Sans:wght@300;400;500;600;700&family=Fira+Code:wght@300;400;500;600;700&display=swap`,
fallback: 'monospace',
},
Outfit: {
name: 'Outfit',
url: `${primaryCdn}Outfit:wght@300;400;500;600;700&display=swap`,
fallback: 'sans-serif',
},
Nunito: {
name: 'Nunito',
url: `${primaryCdn}Nunito:wght@300;400;500;600;700;800&display=swap`,
fallback: 'sans-serif',
},
};
const makePreviewGradient = (colors: string[], angle = 135, splitPercent = 50) =>
colors.length === 0
? 'var(--bg-secondary)'
: colors.length === 1
? colors[0]
: `linear-gradient(${angle}deg, ${colors.map((c, i) => `${c} ${i === 0 ? 50 : splitPercent}%`).join(', ')})`;
// Available themes configuration
export const themes: Theme[] = [
{
id: 'dark',
name: 'Dark',
available: true,
preview: makePreviewGradient(['#0d1117', '#e3ed70']),
},
{
id: 'light',
name: 'Light',
available: true,
preview: makePreviewGradient(['#fafafa', '#2196f3']),
font: fonts.Inter,
},
{
id: 'purple',
name: 'Purple',
available: true,
preview: makePreviewGradient(['#13182b', '#cca6ff']),
font: fonts.Poppins,
},
{
id: 'ocean',
name: 'Ocean',
available: true,
preview: makePreviewGradient(['#131c2b', '#70edb7']),
font: fonts.Inter,
},
{
id: 'midnight',
name: 'Midnight',
available: true,
preview: makePreviewGradient(['#0a0e27', '#5e72e4']),
font: fonts.Montserrat,
},
{
id: 'arctic',
name: 'Arctic',
available: true,
preview: makePreviewGradient(['#f5f5f5', '#00acc1']),
font: fonts.Raleway,
},
{
id: 'cyberpunk',
name: 'Cyberpunk',
available: true,
preview: makePreviewGradient(['#ff0ac5', '#e4ff00'], 135, 70),
font: fonts.Orbitron,
},
{
id: 'terminal',
name: 'Terminal',
available: true,
preview: makePreviewGradient(['#000000', '#00ff00']),
font: fonts.JetBrainsMono,
},
{
id: 'lightpurple',
name: 'Light Purple',
available: true,
preview: makePreviewGradient(['#f4f2fa', '#af55fc']),
},
{
id: 'muteddark',
name: 'Muted Dark',
available: true,
preview: makePreviewGradient(['#282c34', '#e8ef61']),
font: fonts.SourceCodePro,
},
{
id: 'solarized',
name: 'Solarized',
available: true,
preview: makePreviewGradient(['#002b36', '#268bd2']),
font: fonts.Inconsolata,
},
{
id: 'nord',
name: 'Nord',
available: true,
preview: makePreviewGradient(['#2e3440', '#88c0d0']),
font: fonts.IBMPlexSans,
},
{
id: 'gruvbox',
name: 'Gruvbox',
available: true,
preview: makePreviewGradient(['#282828', '#fabd2f']),
font: fonts.Ubuntu,
},
{
id: 'tokyonight',
name: 'Tokyo Night',
available: true,
preview: makePreviewGradient(['#1a1b26', '#7aa2f7']),
font: fonts.FiraCode,
},
{
id: 'catppuccin',
name: 'Catppuccin',
available: true,
preview: makePreviewGradient(['#1e1e2e', '#cba6f7']),
font: fonts.Outfit,
},
{
id: 'everforest',
name: 'Everforest',
available: true,
preview: makePreviewGradient(['#2d353b', '#a7c080']),
font: fonts.Nunito,
},
];
+3 -104
View File
@@ -2,6 +2,7 @@ import { writable } from 'svelte/store';
import { browser } from '$app/environment';
import { storage } from '$lib/utils/localStorage';
import { DEFAULT_THEME } from '$lib/config/customizable-settings';
import { themes } from '$lib/constants/theme-list';
export type ThemeOption = string;
@@ -17,6 +18,8 @@ export interface Theme {
};
}
export { themes };
const STORAGE_KEY = 'theme';
// Track loaded fonts to avoid duplicates
@@ -74,110 +77,6 @@ function applyThemeClasses(theme: ThemeOption) {
}
}
// Available themes configuration
export const themes: Theme[] = [
{
id: 'dark',
name: 'Dark',
available: true,
},
{
id: 'light',
name: 'Light',
available: true,
font: {
name: 'Inter',
url: 'https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Roboto+Mono:wght@400;500&display=swap',
fallback: 'sans-serif',
},
},
{
id: 'midnight',
name: 'Midnight',
available: true,
font: {
name: 'Montserrat',
url: 'https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap',
fallback: 'sans-serif',
},
},
{
id: 'arctic',
name: 'Arctic',
available: true,
font: {
name: 'Raleway',
url: 'https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700;800&family=Source+Code+Pro:wght@400;500;600;700&display=swap',
fallback: 'sans-serif',
},
},
{
id: 'ocean',
name: 'Ocean',
available: true,
font: {
name: 'Inter',
url: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap',
fallback: 'sans-serif',
},
},
{
id: 'purple',
name: 'Purple',
available: true,
font: {
name: 'Poppins',
url: 'https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap',
fallback: 'sans',
},
},
{
id: 'cyberpunk',
name: 'Cyberpunk',
available: true,
font: {
name: 'Orbitron',
url: 'https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Share+Tech+Mono&display=swap',
fallback: 'monospace',
},
},
{
id: 'terminal',
name: 'Terminal',
available: true,
font: {
name: 'JetBrains Mono',
url: 'https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700;800&display=swap',
fallback: 'monospace',
},
},
{
id: 'lightpurple',
name: 'Light Purple',
available: true,
},
{
id: 'muteddark',
name: 'Muted Dark',
available: true,
font: {
name: 'Source Code Pro',
url: 'https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@300;400;500;600;700&family=Open+Sans:wght@300;400;500;600;700&display=swap',
fallback: 'monospace',
},
},
{
id: 'solarized',
name: 'Solarized',
available: true,
font: {
name: 'Inconsolata',
url: 'https://fonts.googleapis.com/css2?family=Inconsolata:wght@300;400;500;600;700&family=Lato:wght@300;400;700&display=swap',
fallback: 'monospace',
},
},
];
function isValidTheme(theme: unknown): theme is string {
if (typeof theme !== 'string' || !theme) return false;
return themes.some((t) => t.id === theme && t.available);
+1
View File
@@ -3,6 +3,7 @@
import { page } from '$app/stores';
import '../styles/base.scss';
import '../styles/variables.scss';
import '../styles/themes.scss';
import '../styles/components.scss';
import '../styles/ref-pages.scss';
import '../styles/diagnostics-pages.scss';
@@ -533,7 +533,7 @@
&.active {
background: var(--color-primary);
color: white;
color: var(--bg-secondary);
border-color: var(--color-primary);
}
}
@@ -448,17 +448,17 @@
&.success {
background: var(--color-success);
color: white;
color: var(--bg-secondary);
}
&.warning {
background: var(--color-warning);
color: white;
color: var(--bg-secondary);
}
&.error {
background: var(--color-error);
color: white;
color: var(--bg-secondary);
}
}
+742
View File
@@ -0,0 +1,742 @@
.theme-ocean,
html[data-theme='ocean'] {
--color-primary: #70edb7;
--color-primary-hover: color-mix(in srgb, var(--color-primary) 70%, white 30%);
--color-primary-dark: color-mix(in srgb, var(--color-primary) 70%, black 30%);
--bg-primary: #131c2b;
--bg-secondary: #212c3d;
--bg-tertiary: #151e2f;
--text-secondary: #a0a7b0;
--surface-hover: #2b384b;
--border-primary: #30405b;
--font-heading: 'Inter', sans-serif;
--font-body: 'Inter', sans-serif;
}
.theme-purple,
html[data-theme='purple'] {
--color-primary: #cca6ff;
--color-primary-hover: color-mix(in srgb, var(--color-primary) 70%, white 30%);
--color-primary-dark: color-mix(in srgb, var(--color-primary) 70%, black 30%);
--bg-primary: #13182b;
--bg-secondary: #101b31;
--bg-tertiary: #222e45;
--text-secondary: #a0a7b0;
--surface-hover: #2b384b;
--border-primary: #30405b;
--font-body: 'Poppins', sans-serif;
--font-heading: 'Lora', 'Poppins', sans-serif;
}
/* Light theme */
.theme-lightpurple,
html[data-theme='lightpurple'] {
/* Background colors */
--bg-primary: #f4f2fa;
--bg-secondary: #fff; /* cards */
--bg-tertiary: #f6f2fc; /* subtle panels / code blocks */
/* Text colors (AA on light backgrounds) */
--text-primary: #0b1220; /* ~19:1 on white */
--text-secondary: #364152; /* ~15:1 on white */
--text-tertiary: #6b7280; /* ~12:1 on white */
/* Primary brand (use *-dark for filled buttons) */
--color-primary: #af55fc;
--color-primary-hover: color-mix(in srgb, var(--color-primary) 85%, white 15%);
--color-primary-dark: color-mix(in srgb, var(--color-primary) 85%, black 15%);
/* Action colors (chosen so white label text is AA) */
--color-success: #15803d; /* white text ≥ 13:1 */
--color-success-light: #40dc6c;
--color-warning: #a16207; /* white text ≥ 7:1 */
--color-warning-light: #bcbc1c;
--color-error: #b91c1c; /* white text ≥ 6.5:1 */
--color-error-light: #ff6e6e;
--color-info: #0369a1; /* white text ≥ 10.6:1 */
--color-info-light: #2cb5b5;
--color-purple: #7c3aed; /* works on white with white text in fills */
--color-pink: #db2777;
/* Border & surface */
--border-primary: #e5e7eb; /* default hairline */
--border-secondary: #d1d5db; /* dividers on white */
--surface-hover: #f6f2f9; /* interactive hover */
--surface-active: #e9eef5; /* pressed/selected */
/* Shadows (softer for light UI) */
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
--shadow-md: 0 4px 10px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.16);
}
/* Cyberpunk Theme - Enhanced neon tech aesthetic with CRT effects */
.theme-cyberpunk,
html[data-theme='cyberpunk'] {
--bg-primary: #0a0614;
--bg-secondary: #110a1f;
--bg-tertiary: #1a0f2e;
--text-primary: #f0e6ff;
--text-secondary: #b8a6d9;
--text-tertiary: #8b7ba3;
/* Primary - Hot pink neon */
--color-primary: #e4ff00;
--color-primary-hover: #eaff2f;
--color-primary-dark: #b7cc00;
/* Action colors - Enhanced neon palette */
--color-success: #39ff14;
--color-success-light: #7fff44;
--color-warning: #ffdd00;
--color-warning-light: #ffee55;
--color-error: #ff0066;
--color-error-light: #ff3388;
--color-info: #00ddff;
--color-info-light: #44eeff;
--color-purple: #cc00ff;
--color-pink: #ff0099;
/* Borders & surfaces - Enhanced neon glow */
--border-primary: #004d66;
--border-secondary: #002233;
--surface-hover: #001122;
--surface-active: #003344;
/* Shadows with enhanced neon glow effects */
--shadow-sm: 0 0 4px rgba(0, 255, 204, 0.2);
--shadow-md: 0 0 8px rgba(0, 255, 204, 0.3);
--shadow-lg: 0 0 16px rgba(0, 255, 204, 0.4);
/* Fonts */
--font-heading: 'Orbitron', monospace;
--font-body: 'Share Tech Mono', monospace;
--font-mono: 'Share Tech Mono', monospace;
h2 {
color: #fd3d90 !important;
}
/* CRT Screen effect with moving scanlines */
&::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 200vh;
pointer-events: none;
z-index: 9999;
background: linear-gradient(
180deg,
rgba(68, 239, 255, 0.1),
transparent 49%,
rgb(253, 61, 144, 0.08) 50%,
transparent
);
background-size: 4px 4px;
animation: crt-scanlines 8s linear infinite;
}
/* CRT Screen curvature effect on body */
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
pointer-events: none;
z-index: 9998;
background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.2) 100%);
}
/* Glitch effect for links */
a {
transition: all 0.3s ease;
&:hover {
animation: cyberpunk-glitch 0.3s ease-in-out;
text-shadow:
-1px 0 #ff006f,
1px 0 #00ffcc;
}
&:hover::before {
content: attr(href);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
color: #ff006f;
background: transparent;
clip: rect(0, 0, 0, 0);
animation: cyberpunk-glitch-overlay 0.3s ease-in-out;
}
&:hover::after {
content: attr(href);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
color: #00ffcc;
background: transparent;
clip: rect(0, 0, 0, 0);
animation: cyberpunk-glitch-overlay-2 0.3s ease-in-out;
}
}
}
/* Cyberpunk animations */
@keyframes crt-scanlines {
0% {
transform: translateY(-5vh);
}
100% {
transform: translateY(0);
}
}
@keyframes crt-flicker {
0% {
opacity: 1;
}
98% {
opacity: 0.85;
}
99% {
opacity: 0.99;
}
100% {
opacity: 1;
}
}
@keyframes cyberpunk-glitch {
0%,
100% {
transform: translate(0);
}
20% {
transform: translate(-2px, 2px);
}
40% {
transform: translate(-2px, -2px);
}
60% {
transform: translate(2px, 2px);
}
80% {
transform: translate(2px, -2px);
}
}
@keyframes cyberpunk-glitch-overlay {
0% {
clip: rect(42px, 9999px, 44px, 0);
}
25% {
clip: rect(12px, 9999px, 59px, 0);
}
50% {
clip: rect(78px, 9999px, 23px, 0);
}
75% {
clip: rect(34px, 9999px, 67px, 0);
}
100% {
clip: rect(91px, 9999px, 18px, 0);
}
}
@keyframes cyberpunk-glitch-overlay-2 {
0% {
clip: rect(65px, 9999px, 23px, 0);
}
25% {
clip: rect(34px, 9999px, 89px, 0);
}
50% {
clip: rect(12px, 9999px, 56px, 0);
}
75% {
clip: rect(78px, 9999px, 34px, 0);
}
100% {
clip: rect(23px, 9999px, 67px, 0);
}
}
/* Midnight Theme - Sophisticated deep blues and purples */
.theme-midnight,
html[data-theme='midnight'] {
/* Backgrounds - Deep midnight blues */
--bg-primary: #0a0e27;
--bg-secondary: #0f1538;
--bg-tertiary: #141c4c;
/* Text - Cool silver tones */
--text-primary: #e8eaf6;
--text-secondary: #9fa8da;
--text-tertiary: #7986cb;
/* Primary - Royal blue */
--color-primary: #5e72e4;
--color-primary-hover: color-mix(in srgb, var(--color-primary) 70%, white 30%);
--color-primary-dark: color-mix(in srgb, var(--color-primary) 70%, black 30%);
/* Action colors - Sophisticated palette */
--color-success: #56f1c7;
--color-success-light: #7fffd4;
--color-warning: #ffd93d;
--color-warning-light: #ffe566;
--color-error: #ff5252;
--color-error-light: #ff7979;
--color-info: #82b1ff;
--color-info-light: #a3c3ff;
--color-purple: #9c88ff;
--color-pink: #f8b5ce;
/* Borders & surfaces - Deep space */
--border-primary: #2a3f7d;
--border-secondary: #1e2c5f;
--surface-hover: #1a2555;
--surface-active: #243270;
/* Shadows - Deep and mysterious */
--shadow-sm: 0 2px 8px rgba(94, 114, 228, 0.1);
--shadow-md: 0 8px 20px rgba(94, 114, 228, 0.15);
--shadow-lg: 0 16px 40px rgba(94, 114, 228, 0.2);
/* Fonts */
--font-heading: 'Montserrat', sans-serif;
--font-body: 'IBM Plex Mono', monospace;
--font-mono: 'IBM Plex Mono', monospace;
}
/* Arctic Theme - Cool, crisp, and minimal */
.theme-arctic,
html[data-theme='arctic'] {
/* Backgrounds - Cool whites and light blues */
--bg-primary: #f5f5f5;
--bg-secondary: #ffffff;
--bg-tertiary: #e3f2fd;
/* Text - Deep slate for contrast */
--text-primary: #263238;
--text-secondary: #546e7a;
--text-tertiary: #78909c;
/* Primary - Ice blue */
--color-primary: #00acc1;
--color-primary-hover: color-mix(in srgb, var(--color-primary) 85%, white 15%);
--color-primary-dark: color-mix(in srgb, var(--color-primary) 85%, black 15%);
/* Action colors - Cool and crisp */
--color-success: #00897b;
--color-success-light: #26a69a;
--color-warning: #ffb300;
--color-warning-light: #ffc947;
--color-error: #e53935;
--color-error-light: #ef5350;
--color-info: #039be5;
--color-info-light: #29b6f6;
--color-purple: #7e57c2;
--color-pink: #ec407a;
/* Borders & surfaces - Clean and minimal */
--border-primary: #cfd8dc;
--border-secondary: #b0bec5;
--surface-hover: #eceff1;
--surface-active: #cfd8dc;
/* Shadows - Light and airy */
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
--shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);
/* Fonts */
--font-heading: 'Raleway', sans-serif;
--font-body: 'Raleway', sans-serif;
--font-mono: 'Source Code Pro', monospace;
}
/* Terminal Theme - Classic green-on-black terminal aesthetic */
.theme-terminal,
html[data-theme='terminal'] {
/* Backgrounds - Pure blacks */
--bg-primary: #000000;
--bg-secondary: #0a0a0a;
--bg-tertiary: #1c1d1c96;
/* Text - Classic terminal green */
--text-primary: #edf6ed;
--text-secondary: #c7ffc7;
--text-tertiary: #0b820b;
/* Primary - Bright green */
--color-primary: #00ff00;
--color-primary-hover: #66ff66;
--color-primary-dark: #00cc00;
/* Action colors - Retro terminal colors */
--color-success: #00ff00;
--color-success-light: #66ff66;
--color-warning: #ffff00;
--color-warning-light: #ffff66;
--color-error: #ff0000;
--color-error-light: #ff6666;
--color-info: #00ffff;
--color-info-light: #66ffff;
--color-purple: #ff00ff;
--color-pink: #ff00aa;
/* Borders & surfaces - Subtle terminal feel */
--border-primary: #00ff0024;
--border-secondary: #009900;
--surface-hover: #001100;
--surface-active: #002200;
--radius-sm: 0;
--radius-md: 1px;
--radius-lg: 2px;
--spacing-2xs: 0.125rem;
--spacing-xs: 0.125rem;
--spacing-sm: 0.25rem;
--spacing-md: 0.5rem;
--spacing-lg: 0.75rem;
--spacing-xl: 1rem;
--spacing-2xl: 1.5rem;
/* Shadows - CRT monitor glow */
--shadow-sm: 0 0 2px rgba(0, 255, 0, 0.5);
--shadow-md: 0 0 8px rgba(0, 255, 0, 0.3);
--shadow-lg: 0 0 20px rgba(0, 255, 0, 0.2);
/* Fonts */
--font-heading: 'JetBrains Mono', monospace;
--font-body: 'JetBrains Mono', monospace;
--font-mono: 'JetBrains Mono', monospace;
}
/* One Dark Theme - VS Code's beloved dark theme */
.theme-muteddark,
html[data-theme='muteddark'] {
--bg-primary: #282c34;
--bg-secondary: #21252b;
--bg-tertiary: #2c313a;
--text-primary: #abb2bf;
--text-secondary: #a2abc9;
--text-tertiary: #5c6370;
--color-primary: #e8ef61;
--color-primary-hover: color-mix(in srgb, var(--color-primary) 70%, white 30%);
--color-primary-dark: color-mix(in srgb, var(--color-primary) 70%, black 30%);
--color-success: #98c379;
--color-warning: #e5c07b;
--color-error: #e06c75;
--color-info: #61afef;
--color-purple: #c678dd;
--color-pink: #e06c75;
--border-primary: #3e4451;
--surface-hover: #2c313a;
--surface-active: #3e4451;
--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
--shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
--shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
--font-heading: 'Open Sans', sans-serif;
--font-body: 'Source Code Pro', monospace;
--font-mono: 'Source Code Pro', monospace;
}
/* Solarized Theme - The scientifically designed color scheme */
.theme-solarized,
html[data-theme='solarized'] {
--bg-primary: #002b36;
--bg-secondary: #073642;
--bg-tertiary: #033947;
--text-primary: #839496;
--text-secondary: #93a1a1;
--text-tertiary: #657b83;
--color-primary: #268bd2;
--color-primary-hover: color-mix(in srgb, var(--color-primary) 70%, white 30%);
--color-primary-dark: color-mix(in srgb, var(--color-primary) 70%, black 30%);
--color-success: #859900;
--color-warning: #b58900;
--color-error: #dc322f;
--color-info: #268bd2;
--color-purple: #6c71c4;
--color-pink: #d33682;
--border-primary: #586e75;
--surface-hover: #073642;
--surface-active: #586e75;
--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
--shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
--shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4);
--font-heading: 'Lato', sans-serif;
--font-body: 'Inconsolata', monospace;
--font-mono: 'Inconsolata', monospace;
}
/* Nord Theme - Professional, cool, and muted */
.theme-nord,
html[data-theme='nord'] {
/* Backgrounds - Polar Night */
--bg-primary: #2e3440;
--bg-secondary: #3b4252;
--bg-tertiary: #434c5e;
/* Text - Snow Storm */
--text-primary: #eceff4;
--text-secondary: #d8dee9;
--text-tertiary: #e5e9f0;
/* Primary - Frost Blue */
--color-primary: #88c0d0;
--color-primary-hover: color-mix(in srgb, var(--color-primary) 70%, white 30%);
--color-primary-dark: color-mix(in srgb, var(--color-primary) 70%, black 30%);
/* Action colors - Aurora */
--color-success: #a3be8c;
--color-success-light: #b8d1a8;
--color-warning: #ebcb8b;
--color-warning-light: #f0d9a7;
--color-error: #bf616a;
--color-error-light: #d08770;
--color-info: #81a1c1;
--color-info-light: #88c0d0;
--color-purple: #b48ead;
--color-pink: #bf616a;
/* Borders & surfaces */
--border-primary: #4c566a;
--border-secondary: #434c5e;
--surface-hover: #313746;
--surface-active: #4c566a;
/* Shadows */
--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
--shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
--shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4);
/* Fonts */
--font-heading: 'IBM Plex Sans', sans-serif;
--font-body: 'IBM Plex Sans', sans-serif;
--font-mono: 'IBM Plex Mono', monospace;
}
/* Gruvbox Theme - Warm, retro, and earthy */
.theme-gruvbox,
html[data-theme='gruvbox'] {
/* Backgrounds - Dark Brown */
--bg-primary: #282828;
--bg-secondary: #3c3836;
--bg-tertiary: #504945;
/* Text - Light Cream */
--text-primary: #ebdbb2;
--text-secondary: #d5c4a1;
--text-tertiary: #bdae93;
/* Primary - Bright Yellow */
--color-primary: #fabd2f;
--color-primary-hover: color-mix(in srgb, var(--color-primary) 70%, white 30%);
--color-primary-dark: color-mix(in srgb, var(--color-primary) 70%, black 30%);
/* Action colors - Retro palette */
--color-success: #b8bb26;
--color-success-light: #98971a;
--color-warning: #fabd2f;
--color-warning-light: #d79921;
--color-error: #fb4934;
--color-error-light: #cc241d;
--color-info: #83a598;
--color-info-light: #458588;
--color-purple: #d3869b;
--color-pink: #fb4934;
/* Borders & surfaces */
--border-primary: #665c54;
--border-secondary: #504945;
--surface-hover: #3c3836;
--surface-active: #504945;
/* Shadows */
--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
--shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
--shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
/* Fonts */
--font-heading: 'Ubuntu', sans-serif;
--font-body: 'Ubuntu Mono', monospace;
--font-mono: 'Ubuntu Mono', monospace;
}
/* Tokyo Night Theme - Deep blue, modern, popular */
.theme-tokyonight,
html[data-theme='tokyonight'] {
/* Backgrounds - Storm Night */
--bg-primary: #1a1b26;
--bg-secondary: #24283b;
--bg-tertiary: #414868;
/* Text - Cool White */
--text-primary: #c0caf5;
--text-secondary: #a9b1d6;
--text-tertiary: #9aa5ce;
/* Primary - Bright Blue */
--color-primary: #7aa2f7;
--color-primary-hover: color-mix(in srgb, var(--color-primary) 70%, white 30%);
--color-primary-dark: color-mix(in srgb, var(--color-primary) 70%, black 30%);
/* Action colors - Night palette */
--color-success: #9ece6a;
--color-success-light: #73daca;
--color-warning: #e0af68;
--color-warning-light: #ff9e64;
--color-error: #f7768e;
--color-error-light: #db4b4b;
--color-info: #7dcfff;
--color-info-light: #b4f9f8;
--color-purple: #bb9af7;
--color-pink: #f7768e;
/* Borders & surfaces */
--border-primary: #565f89;
--border-secondary: #414868;
--surface-hover: #292e42;
--surface-active: #3b4261;
/* Shadows */
--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
/* Fonts */
--font-heading: 'Fira Sans', sans-serif;
--font-body: 'Fira Code', monospace;
--font-mono: 'Fira Code', monospace;
}
/* Catppuccin Mocha Theme - Pastel dark, soothing */
.theme-catppuccin,
html[data-theme='catppuccin'] {
/* Backgrounds - Dark Mocha */
--bg-primary: #1e1e2e;
--bg-secondary: #181825;
--bg-tertiary: #313244;
/* Text - Light Latte */
--text-primary: #cdd6f4;
--text-secondary: #bac2de;
--text-tertiary: #a6adc8;
/* Primary - Lavender */
--color-primary: #b2a5ff;
--color-primary-hover: color-mix(in srgb, var(--color-primary) 70%, white 30%);
--color-primary-dark: color-mix(in srgb, var(--color-primary) 70%, black 30%);
/* Action colors - Pastel palette */
--color-success: #a6e3a1;
--color-success-light: #94e2d5;
--color-warning: #f9e2af;
--color-warning-light: #fab387;
--color-error: #f38ba8;
--color-error-light: #eba0ac;
--color-info: #89dceb;
--color-info-light: #89b4fa;
--color-purple: #cba6f7;
--color-pink: #f5c2e7;
/* Borders & surfaces */
--border-primary: #45475a;
--border-secondary: #313244;
--surface-hover: #313244;
--surface-active: #45475a;
/* Shadows */
--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
--shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
--shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4);
/* Fonts */
--font-heading: 'Outfit', sans-serif;
--font-body: 'Outfit', sans-serif;
--font-mono: 'JetBrains Mono', monospace;
}
/* Everforest Theme - Green, natural, easy on eyes */
.theme-everforest,
html[data-theme='everforest'] {
/* Backgrounds - Forest Floor */
--bg-primary: #2d353b;
--bg-secondary: #343f44;
--bg-tertiary: #3d484d;
/* Text - Cream */
--text-primary: #d3c6aa;
--text-secondary: #baa89f;
--text-tertiary: #859289;
/* Primary - Forest Green */
--color-primary: #a7c080;
--color-primary-hover: color-mix(in srgb, var(--color-primary) 70%, white 30%);
--color-primary-dark: color-mix(in srgb, var(--color-primary) 70%, black 30%);
/* Action colors - Natural palette */
--color-success: #a7c080;
--color-success-light: #83c092;
--color-warning: #dbbc7f;
--color-warning-light: #e69875;
--color-error: #e67e80;
--color-error-light: #e67e80;
--color-info: #7fbbb3;
--color-info-light: #a7c080;
--color-purple: #d699b6;
--color-pink: #e67e80;
/* Borders & surfaces */
--border-primary: #4f5b58;
--border-secondary: #3d484d;
--surface-hover: #3d484d;
--surface-active: #4f5b58;
/* Shadows */
--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
--shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
--shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4);
/* Fonts */
--font-heading: 'Nunito', sans-serif;
--font-body: 'Nunito', sans-serif;
--font-mono: 'Source Code Pro', monospace;
}
+2 -505
View File
@@ -99,437 +99,6 @@
}
}
.theme-ocean,
html[data-theme='ocean'] {
--color-primary: #70edb7;
--color-primary-hover: #a0ffd0;
--color-primary-dark: #38b48b;
--bg-primary: #131c2b;
--bg-secondary: #212c3d;
--bg-tertiary: #151e2f;
--text-secondary: #a0a7b0;
--surface-hover: #2b384b;
--border-primary: #30405b;
--font-heading: 'Inter', sans-serif;
--font-body: 'Inter', sans-serif;
}
.theme-purple,
html[data-theme='purple'] {
--color-primary: #cca6ff;
--color-primary-hover: #d4b6fd;
--color-primary-dark: #8d67c0;
--bg-primary: #13182b;
--bg-secondary: #101b31;
--bg-tertiary: #222e45;
--text-secondary: #a0a7b0;
--surface-hover: #2b384b;
--border-primary: #30405b;
--font-body: 'Poppins', sans-serif;
--font-heading: 'Lora', 'Poppins', sans-serif;
}
/* Light theme */
.theme-lightpurple,
html[data-theme='lightpurple'] {
/* Background colors */
--bg-primary: #f4f2fa;
--bg-secondary: #fff; /* cards */
--bg-tertiary: #f6f2fc; /* subtle panels / code blocks */
/* Text colors (AA on light backgrounds) */
--text-primary: #0b1220; /* ~19:1 on white */
--text-secondary: #364152; /* ~15:1 on white */
--text-tertiary: #6b7280; /* ~12:1 on white */
/* Primary brand (use *-dark for filled buttons) */
--color-primary: #af55fc;
--color-primary-hover: #c581ff;
--color-primary-dark: #872bd5;
/* Action colors (chosen so white label text is AA) */
--color-success: #15803d; /* white text ≥ 13:1 */
--color-success-light: #40dc6c;
--color-warning: #a16207; /* white text ≥ 7:1 */
--color-warning-light: #bcbc1c;
--color-error: #b91c1c; /* white text ≥ 6.5:1 */
--color-error-light: #ff6e6e;
--color-info: #0369a1; /* white text ≥ 10.6:1 */
--color-info-light: #2cb5b5;
--color-purple: #7c3aed; /* works on white with white text in fills */
--color-pink: #db2777;
/* Border & surface */
--border-primary: #e5e7eb; /* default hairline */
--border-secondary: #d1d5db; /* dividers on white */
--surface-hover: #f6f2f9; /* interactive hover */
--surface-active: #e9eef5; /* pressed/selected */
/* Shadows (softer for light UI) */
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
--shadow-md: 0 4px 10px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.16);
}
/* Cyberpunk Theme - Enhanced neon tech aesthetic with CRT effects */
.theme-cyberpunk,
html[data-theme='cyberpunk'] {
--bg-primary: #0a0614;
--bg-secondary: #110a1f;
--bg-tertiary: #1a0f2e;
--text-primary: #f0e6ff;
--text-secondary: #b8a6d9;
--text-tertiary: #8b7ba3;
/* Primary - Hot pink neon */
--color-primary: #e4ff00;
--color-primary-hover: #eaff2f;
--color-primary-dark: #b7cc00;
/* Action colors - Enhanced neon palette */
--color-success: #39ff14;
--color-success-light: #7fff44;
--color-warning: #ffdd00;
--color-warning-light: #ffee55;
--color-error: #ff0066;
--color-error-light: #ff3388;
--color-info: #00ddff;
--color-info-light: #44eeff;
--color-purple: #cc00ff;
--color-pink: #ff0099;
/* Borders & surfaces - Enhanced neon glow */
--border-primary: #004d66;
--border-secondary: #002233;
--surface-hover: #001122;
--surface-active: #003344;
/* Shadows with enhanced neon glow effects */
--shadow-sm: 0 0 4px rgba(0, 255, 204, 0.2);
--shadow-md: 0 0 8px rgba(0, 255, 204, 0.3);
--shadow-lg: 0 0 16px rgba(0, 255, 204, 0.4);
/* Fonts */
--font-heading: 'Orbitron', monospace;
--font-body: 'Share Tech Mono', monospace;
--font-mono: 'Share Tech Mono', monospace;
h2 {
color: #fd3d90 !important;
}
/* CRT Screen effect with moving scanlines */
&::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 200vh;
pointer-events: none;
z-index: 9999;
background: linear-gradient(
180deg,
rgba(68, 239, 255, 0.1),
transparent 49%,
rgb(253, 61, 144, 0.08) 50%,
transparent
);
background-size: 4px 4px;
animation: crt-scanlines 8s linear infinite;
}
/* CRT Screen curvature effect on body */
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
pointer-events: none;
z-index: 9998;
background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.2) 100%);
}
/* Glitch effect for links */
a {
transition: all 0.3s ease;
&:hover {
animation: cyberpunk-glitch 0.3s ease-in-out;
text-shadow:
-1px 0 #ff006f,
1px 0 #00ffcc;
}
&:hover::before {
content: attr(href);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
color: #ff006f;
background: transparent;
clip: rect(0, 0, 0, 0);
animation: cyberpunk-glitch-overlay 0.3s ease-in-out;
}
&:hover::after {
content: attr(href);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
color: #00ffcc;
background: transparent;
clip: rect(0, 0, 0, 0);
animation: cyberpunk-glitch-overlay-2 0.3s ease-in-out;
}
}
}
/* Cyberpunk animations */
@keyframes crt-scanlines {
0% {
transform: translateY(-5vh);
}
100% {
transform: translateY(0);
}
}
@keyframes crt-flicker {
0% {
opacity: 1;
}
98% {
opacity: 0.85;
}
99% {
opacity: 0.99;
}
100% {
opacity: 1;
}
}
@keyframes cyberpunk-glitch {
0%,
100% {
transform: translate(0);
}
20% {
transform: translate(-2px, 2px);
}
40% {
transform: translate(-2px, -2px);
}
60% {
transform: translate(2px, 2px);
}
80% {
transform: translate(2px, -2px);
}
}
@keyframes cyberpunk-glitch-overlay {
0% {
clip: rect(42px, 9999px, 44px, 0);
}
25% {
clip: rect(12px, 9999px, 59px, 0);
}
50% {
clip: rect(78px, 9999px, 23px, 0);
}
75% {
clip: rect(34px, 9999px, 67px, 0);
}
100% {
clip: rect(91px, 9999px, 18px, 0);
}
}
@keyframes cyberpunk-glitch-overlay-2 {
0% {
clip: rect(65px, 9999px, 23px, 0);
}
25% {
clip: rect(34px, 9999px, 89px, 0);
}
50% {
clip: rect(12px, 9999px, 56px, 0);
}
75% {
clip: rect(78px, 9999px, 34px, 0);
}
100% {
clip: rect(23px, 9999px, 67px, 0);
}
}
/* Midnight Theme - Sophisticated deep blues and purples */
.theme-midnight,
html[data-theme='midnight'] {
/* Backgrounds - Deep midnight blues */
--bg-primary: #0a0e27;
--bg-secondary: #0f1538;
--bg-tertiary: #141c4c;
/* Text - Cool silver tones */
--text-primary: #e8eaf6;
--text-secondary: #9fa8da;
--text-tertiary: #7986cb;
/* Primary - Royal blue */
--color-primary: #5e72e4;
--color-primary-hover: #7e8fff;
--color-primary-dark: #3f51b5;
/* Action colors - Sophisticated palette */
--color-success: #56f1c7;
--color-success-light: #7fffd4;
--color-warning: #ffd93d;
--color-warning-light: #ffe566;
--color-error: #ff5252;
--color-error-light: #ff7979;
--color-info: #82b1ff;
--color-info-light: #a3c3ff;
--color-purple: #9c88ff;
--color-pink: #f8b5ce;
/* Borders & surfaces - Deep space */
--border-primary: #2a3f7d;
--border-secondary: #1e2c5f;
--surface-hover: #1a2555;
--surface-active: #243270;
/* Shadows - Deep and mysterious */
--shadow-sm: 0 2px 8px rgba(94, 114, 228, 0.1);
--shadow-md: 0 8px 20px rgba(94, 114, 228, 0.15);
--shadow-lg: 0 16px 40px rgba(94, 114, 228, 0.2);
/* Fonts */
--font-heading: 'Montserrat', sans-serif;
--font-body: 'IBM Plex Mono', monospace;
--font-mono: 'IBM Plex Mono', monospace;
}
/* Arctic Theme - Cool, crisp, and minimal */
.theme-arctic,
html[data-theme='arctic'] {
/* Backgrounds - Cool whites and light blues */
--bg-primary: #f5f5f5;
--bg-secondary: #ffffff;
--bg-tertiary: #e3f2fd;
/* Text - Deep slate for contrast */
--text-primary: #263238;
--text-secondary: #546e7a;
--text-tertiary: #78909c;
/* Primary - Ice blue */
--color-primary: #00acc1;
--color-primary-hover: #26c6da;
--color-primary-dark: #0097a7;
/* Action colors - Cool and crisp */
--color-success: #00897b;
--color-success-light: #26a69a;
--color-warning: #ffb300;
--color-warning-light: #ffc947;
--color-error: #e53935;
--color-error-light: #ef5350;
--color-info: #039be5;
--color-info-light: #29b6f6;
--color-purple: #7e57c2;
--color-pink: #ec407a;
/* Borders & surfaces - Clean and minimal */
--border-primary: #cfd8dc;
--border-secondary: #b0bec5;
--surface-hover: #eceff1;
--surface-active: #cfd8dc;
/* Shadows - Light and airy */
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
--shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);
/* Fonts */
--font-heading: 'Raleway', sans-serif;
--font-body: 'Raleway', sans-serif;
--font-mono: 'Source Code Pro', monospace;
}
/* Terminal Theme - Classic green-on-black terminal aesthetic */
.theme-terminal,
html[data-theme='terminal'] {
/* Backgrounds - Pure blacks */
--bg-primary: #000000;
--bg-secondary: #0a0a0a;
--bg-tertiary: #1a1a1a;
/* Text - Classic terminal green */
--text-primary: #00ff00;
--text-secondary: #00cc00;
--text-tertiary: #009900;
/* Primary - Bright green */
--color-primary: #00ff00;
--color-primary-hover: #66ff66;
--color-primary-dark: #00cc00;
/* Action colors - Retro terminal colors */
--color-success: #00ff00;
--color-success-light: #66ff66;
--color-warning: #ffff00;
--color-warning-light: #ffff66;
--color-error: #ff0000;
--color-error-light: #ff6666;
--color-info: #00ffff;
--color-info-light: #66ffff;
--color-purple: #ff00ff;
--color-pink: #ff00aa;
/* Borders & surfaces - Subtle terminal feel */
--border-primary: #00ff00;
--border-secondary: #009900;
--surface-hover: #001100;
--surface-active: #002200;
--radius-sm: 0;
--radius-md: 0;
--radius-lg: 2px;
--spacing-2xs: 0.125rem;
--spacing-xs: 0.125rem;
--spacing-sm: 0.25rem;
--spacing-md: 0.5rem;
--spacing-lg: 0.75rem;
--spacing-xl: 1rem;
--spacing-2xl: 1.5rem;
/* Shadows - CRT monitor glow */
--shadow-sm: 0 0 2px rgba(0, 255, 0, 0.5);
--shadow-md: 0 0 8px rgba(0, 255, 0, 0.3);
--shadow-lg: 0 0 20px rgba(0, 255, 0, 0.2);
/* Fonts */
--font-heading: 'JetBrains Mono', monospace;
--font-body: 'JetBrains Mono', monospace;
--font-mono: 'JetBrains Mono', monospace;
}
/* Minimal Theme - Clean and modern */
.theme-light,
html[data-theme='light'] {
@@ -542,8 +111,8 @@ html[data-theme='light'] {
--text-tertiary: #9e9e9e;
--color-primary: #2196f3;
--color-primary-hover: #42a5f5;
--color-primary-dark: #1976d2;
--color-primary-hover: color-mix(in srgb, var(--color-primary) 85%, white 15%);
--color-primary-dark: color-mix(in srgb, var(--color-primary) 85%, black 15%);
--color-success: #4caf50;
--color-warning: #ff9800;
@@ -563,75 +132,3 @@ html[data-theme='light'] {
--font-body: 'Inter', sans-serif;
--font-mono: 'Roboto Mono', monospace;
}
/* One Dark Theme - VS Code's beloved dark theme */
.theme-muteddark,
html[data-theme='muteddark'] {
--bg-primary: #282c34;
--bg-secondary: #21252b;
--bg-tertiary: #2c313a;
--text-primary: #abb2bf;
--text-secondary: #a2abc9;
--text-tertiary: #5c6370;
--color-primary: #e8ef61;
--color-primary-hover: #f1f86d;
--color-primary-dark: #e1e956;
--color-success: #98c379;
--color-warning: #e5c07b;
--color-error: #e06c75;
--color-info: #61afef;
--color-purple: #c678dd;
--color-pink: #e06c75;
--border-primary: #3e4451;
--surface-hover: #2c313a;
--surface-active: #3e4451;
--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
--shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
--shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
--font-heading: 'Open Sans', sans-serif;
--font-body: 'Source Code Pro', monospace;
--font-mono: 'Source Code Pro', monospace;
}
/* Solarized Theme - The scientifically designed color scheme */
.theme-solarized,
html[data-theme='solarized'] {
--bg-primary: #002b36;
--bg-secondary: #073642;
--bg-tertiary: #033947;
--text-primary: #839496;
--text-secondary: #93a1a1;
--text-tertiary: #657b83;
--color-primary: #268bd2;
--color-primary-hover: #4ba3e2;
--color-primary-dark: #1e73a9;
--color-success: #859900;
--color-warning: #b58900;
--color-error: #dc322f;
--color-info: #268bd2;
--color-purple: #6c71c4;
--color-pink: #d33682;
--border-primary: #586e75;
--surface-hover: #073642;
--surface-active: #586e75;
--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
--shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
--shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4);
--font-heading: 'Lato', sans-serif;
--font-body: 'Inconsolata', monospace;
--font-mono: 'Inconsolata', monospace;
}