diff --git a/docs/src/components/AttributeCard.astro b/docs/src/components/AttributeCard.astro index 640db815..0ea6f2b6 100644 --- a/docs/src/components/AttributeCard.astro +++ b/docs/src/components/AttributeCard.astro @@ -91,7 +91,7 @@ const rawJson = JSON.stringify(attribute, null, 2); )} {isDeprecated && ( -
+
{attribute.deprecation?.replacement ? (

Use {attribute.deprecation.replacement} instead.

) : ( diff --git a/docs/src/components/PiiBadge.astro b/docs/src/components/PiiBadge.astro index bb6a2f94..98332e3e 100644 --- a/docs/src/components/PiiBadge.astro +++ b/docs/src/components/PiiBadge.astro @@ -13,9 +13,9 @@ const labels = { }; const colorClasses = { - true: 'bg-pii-true/15 text-pii-true', - maybe: 'bg-pii-maybe/15 text-pii-maybe', - false: 'bg-pii-false/15 text-pii-false', + true: 'bg-pii-true-soft text-pii-true', + maybe: 'bg-pii-maybe-soft text-pii-maybe', + false: 'bg-pii-false-soft text-pii-false', }; --- diff --git a/docs/src/components/SearchModal.svelte b/docs/src/components/SearchModal.svelte index 94a638f9..fc3dc5bc 100644 --- a/docs/src/components/SearchModal.svelte +++ b/docs/src/components/SearchModal.svelte @@ -323,7 +323,7 @@ function highlightMatch(key: string, searchQuery: string): { before: string; mat {#each attributeResults as attr, index} {@const highlighted = highlightMatch(attr.key, query)}
@@ -359,7 +359,7 @@ function highlightMatch(key: string, searchQuery: string): { before: string; mat {#each pageResults as result, index} {@const actualIndex = attributeResults.length + index} diff --git a/docs/src/layouts/BaseLayout.astro b/docs/src/layouts/BaseLayout.astro index c0ae994f..ea92c313 100644 --- a/docs/src/layouts/BaseLayout.astro +++ b/docs/src/layouts/BaseLayout.astro @@ -1,6 +1,7 @@ --- import '../styles/global.css'; import SearchModal from '../components/SearchModal.svelte'; +import ThemeToggle from '../components/ThemeToggle.svelte'; import SearchIcon from '../components/icons/SearchIcon.astro'; import ExternalLinkIcon from '../components/icons/ExternalLinkIcon.astro'; @@ -25,6 +26,14 @@ const currentPath = Astro.url.pathname; {title} | Sentry Conventions +
@@ -80,17 +89,20 @@ const currentPath = Astro.url.pathname; - +
+ + +
diff --git a/docs/src/pages/names/index.astro b/docs/src/pages/names/index.astro index dcd62db1..4b5de2ef 100644 --- a/docs/src/pages/names/index.astro +++ b/docs/src/pages/names/index.astro @@ -76,7 +76,7 @@ const totalOperations = allNames.reduce((acc, name) => acc + name.data.operation

{op.brief}

{!op.is_in_otel && ( -
+
@@ -85,7 +85,7 @@ const totalOperations = allNames.reduce((acc, name) => acc + name.data.operation )} {op.is_in_otel && op.otel_notes && ( -
+
diff --git a/docs/src/styles/global.css b/docs/src/styles/global.css index ee9df5d8..a9742d7b 100644 --- a/docs/src/styles/global.css +++ b/docs/src/styles/global.css @@ -1,3 +1,80 @@ +/* Theme CSS Custom Properties */ +:root { + /* Light theme (default) */ + --color-bg-primary: #ffffff; + --color-bg-secondary: #f8f9fa; + --color-bg-elevated: #f0f1f3; + --color-bg-hover: #e8e9eb; + + --color-text-primary: #1a1d23; + --color-text-secondary: #4a5568; + --color-text-muted: #718096; + + --color-accent: #7c3aed; + --color-accent-hover: #6d28d9; + --color-accent-soft: rgba(124, 58, 237, 0.12); + + --color-border: #e2e8f0; + --color-border-light: #cbd5e1; + + --color-success: #22c55e; + --color-success-soft: rgba(34, 197, 94, 0.15); + --color-warning: #eab308; + --color-warning-soft: rgba(234, 179, 8, 0.15); + --color-error: #ef4444; + --color-error-soft: rgba(239, 68, 68, 0.15); + --color-info: #3b82f6; + --color-info-soft: rgba(59, 130, 246, 0.15); + + --color-code-string: #16a34a; + --color-code-number: #ea580c; + + --color-pii-true: #ef4444; + --color-pii-true-soft: rgba(239, 68, 68, 0.15); + --color-pii-maybe: #eab308; + --color-pii-maybe-soft: rgba(234, 179, 8, 0.15); + --color-pii-false: #22c55e; + --color-pii-false-soft: rgba(34, 197, 94, 0.15); +} + +.dark { + /* Dark theme */ + --color-bg-primary: #111318; + --color-bg-secondary: #181b21; + --color-bg-elevated: #1f2329; + --color-bg-hover: #262b33; + + --color-text-primary: #d4d7db; + --color-text-secondary: #8b919a; + --color-text-muted: #5c6370; + + --color-accent: #9580ff; + --color-accent-hover: #a899ff; + --color-accent-soft: rgba(149, 128, 255, 0.12); + + --color-border: #282d36; + --color-border-light: #343a45; + + --color-success: #50a060; + --color-success-soft: rgba(80, 160, 96, 0.15); + --color-warning: #d4a72c; + --color-warning-soft: rgba(212, 167, 44, 0.15); + --color-error: #c25450; + --color-error-soft: rgba(194, 84, 80, 0.15); + --color-info: #5c9fd4; + --color-info-soft: rgba(92, 159, 212, 0.15); + + --color-code-string: #98c379; + --color-code-number: #d19a66; + + --color-pii-true: #c25450; + --color-pii-true-soft: rgba(194, 84, 80, 0.15); + --color-pii-maybe: #d4a72c; + --color-pii-maybe-soft: rgba(212, 167, 44, 0.15); + --color-pii-false: #50a060; + --color-pii-false-soft: rgba(80, 160, 96, 0.15); +} + @tailwind base; @tailwind components; @tailwind utilities; @@ -127,15 +204,15 @@ } .badge-deprecated { - @apply bg-error/15 text-error; + @apply bg-error-soft text-error; } .badge-otel { - @apply bg-info/15 text-info; + @apply bg-info-soft text-info; } .badge-dynamic { - @apply bg-warning/15 text-warning; + @apply bg-warning-soft text-warning; } .badge-type { diff --git a/docs/tailwind.config.mjs b/docs/tailwind.config.mjs index 2bb4e52e..c581dba2 100644 --- a/docs/tailwind.config.mjs +++ b/docs/tailwind.config.mjs @@ -5,44 +5,59 @@ export default { extend: { colors: { // Background colors - 'bg-primary': '#111318', - 'bg-secondary': '#181b21', - 'bg-elevated': '#1f2329', - 'bg-hover': '#262b33', + 'bg-primary': 'var(--color-bg-primary)', + 'bg-secondary': 'var(--color-bg-secondary)', + 'bg-elevated': 'var(--color-bg-elevated)', + 'bg-hover': 'var(--color-bg-hover)', // Text colors - 'text-primary': '#d4d7db', - 'text-secondary': '#8b919a', - 'text-muted': '#5c6370', + 'text-primary': 'var(--color-text-primary)', + 'text-secondary': 'var(--color-text-secondary)', + 'text-muted': 'var(--color-text-muted)', // Accent accent: { - DEFAULT: '#9580ff', - hover: '#a899ff', - soft: 'rgba(149, 128, 255, 0.12)', + DEFAULT: 'var(--color-accent)', + hover: 'var(--color-accent-hover)', + soft: 'var(--color-accent-soft)', }, // Border colors border: { - DEFAULT: '#282d36', - light: '#343a45', + DEFAULT: 'var(--color-border)', + light: 'var(--color-border-light)', }, // Semantic colors - success: '#50a060', - warning: '#d4a72c', - error: '#c25450', - info: '#5c9fd4', + success: { + DEFAULT: 'var(--color-success)', + soft: 'var(--color-success-soft)', + }, + warning: { + DEFAULT: 'var(--color-warning)', + soft: 'var(--color-warning-soft)', + }, + error: { + DEFAULT: 'var(--color-error)', + soft: 'var(--color-error-soft)', + }, + info: { + DEFAULT: 'var(--color-info)', + soft: 'var(--color-info-soft)', + }, // Code syntax highlighting - 'code-string': '#98c379', - 'code-number': '#d19a66', + 'code-string': 'var(--color-code-string)', + 'code-number': 'var(--color-code-number)', // PII indicator colors pii: { - true: '#c25450', - maybe: '#d4a72c', - false: '#50a060', + true: 'var(--color-pii-true)', + 'true-soft': 'var(--color-pii-true-soft)', + maybe: 'var(--color-pii-maybe)', + 'maybe-soft': 'var(--color-pii-maybe-soft)', + false: 'var(--color-pii-false)', + 'false-soft': 'var(--color-pii-false-soft)', }, }, fontFamily: {