11/* eslint-disable react/no-unknown-property */
22import { themeConsoleStyle } from '@/lib/themeConsoleStyle'
3+ import { siteConfig } from '@/lib/config'
34import CONFIG from './config'
45
56const Style = ( ) => {
67 return (
78 < style jsx global > { `
89 #theme-xuhome {
9- --xuhome-primary: #0284c7;
10- --xuhome-primary-hover: #0ea5e9;
11- --xuhome-accent: #fde68a;
12- --xuhome-bg-light: #faf8f5;
13- --xuhome-surface-light: #ffffff;
14- --xuhome-text-light: #0f172a;
15- --xuhome-muted-light: #475569;
16- --xuhome-bg-dark: #0f172a;
17- --xuhome-surface-dark: #1e293b;
18- --xuhome-text-dark: #f1f5f9;
19- --xuhome-muted-dark: #94a3b8;
20- background-color: var(--xuhome-bg-light);
21- color: var(--xuhome-text-light);
10+ --xuhome-color-primary-hover: ${ siteConfig ( 'XUHOME_COLOR_PRIMARY_HOVER' , CONFIG . XUHOME_COLOR_PRIMARY_HOVER , CONFIG ) } ;
11+ --xuhome-color-accent: ${ siteConfig ( 'XUHOME_COLOR_ACCENT' , CONFIG . XUHOME_COLOR_ACCENT , CONFIG ) } ;
12+ --xuhome-hero-title-color: ${ siteConfig ( 'XUHOME_HERO_TITLE_COLOR' , CONFIG . XUHOME_HERO_TITLE_COLOR , CONFIG ) } ;
13+ --xuhome-hero-bio-color: ${ siteConfig ( 'XUHOME_HERO_BIO_COLOR' , CONFIG . XUHOME_HERO_BIO_COLOR , CONFIG ) } ;
14+ --xuhome-primary: var(--xuhome-console-primary);
15+ --xuhome-primary-hover: var(--xuhome-console-primary-hover);
16+ --xuhome-accent: var(
17+ --xuhome-console-accent,
18+ var(--xuhome-color-accent)
19+ );
20+ --xuhome-bg-light: var(--xuhome-console-bg);
21+ --xuhome-surface-light: var(--xuhome-console-card);
22+ --xuhome-text-light: var(--xuhome-console-text);
23+ --xuhome-muted-light: var(--xuhome-console-text-secondary);
24+ --xuhome-bg-dark: var(--xuhome-console-bg);
25+ --xuhome-surface-dark: var(--xuhome-console-card);
26+ --xuhome-text-dark: var(--xuhome-console-text);
27+ --xuhome-muted-dark: var(--xuhome-console-text-secondary);
28+ background-color: var(--xuhome-console-bg);
29+ color: var(--xuhome-console-text);
2230 }
2331 .dark #theme-xuhome {
24- background-color: var(--xuhome-bg-dark);
25- color: var(--xuhome-text-dark);
32+ background-color: var(--xuhome-console-bg);
33+ color: var(--xuhome-console-text);
34+ }
35+
36+ /* XuHome uses arbitrary Tailwind colors extensively. Map those legacy
37+ utility tokens to the live theme-console variables. */
38+ #theme-xuhome [class~='border-[#0284c7]'] {
39+ border-color: var(--xuhome-console-border) !important;
40+ }
41+ #theme-xuhome [class~='border-[#fde68a]'] {
42+ border-color: var(--xuhome-accent) !important;
43+ }
44+ #theme-xuhome [class~='text-[#0284c7]'] {
45+ color: var(--xuhome-console-primary) !important;
46+ }
47+ #theme-xuhome [class~='text-[#0284c7]/60'] {
48+ color: color-mix(
49+ in srgb,
50+ var(--xuhome-console-primary) 60%,
51+ transparent
52+ ) !important;
53+ }
54+ #theme-xuhome [class~='bg-[#0284c7]'] {
55+ background-color: var(--xuhome-console-primary) !important;
56+ }
57+ #theme-xuhome [class~='bg-[#fde68a]'] {
58+ background-color: var(--xuhome-accent) !important;
59+ }
60+ #theme-xuhome [class~='bg-[#ffffff]'],
61+ #theme-xuhome [class~='bg-white'] {
62+ background-color: var(--xuhome-console-card) !important;
63+ }
64+ #theme-xuhome [class~='bg-[#faf8f5]'] {
65+ background-color: var(--xuhome-console-bg) !important;
66+ }
67+ #theme-xuhome [class~='text-slate-900'],
68+ #theme-xuhome [class~='text-slate-800'],
69+ #theme-xuhome [class~='dark:text-slate-100']:is(.dark *),
70+ #theme-xuhome [class~='dark:text-slate-200']:is(.dark *) {
71+ color: var(--xuhome-console-text) !important;
72+ }
73+ #theme-xuhome [class~='text-slate-700'],
74+ #theme-xuhome [class~='text-slate-600'],
75+ #theme-xuhome [class~='text-slate-500'],
76+ #theme-xuhome [class~='text-slate-400'],
77+ #theme-xuhome [class~='text-slate-300'],
78+ #theme-xuhome [class~='dark:text-slate-300']:is(.dark *),
79+ #theme-xuhome [class~='dark:text-slate-400']:is(.dark *),
80+ #theme-xuhome [class~='dark:text-slate-500']:is(.dark *),
81+ #theme-xuhome [class~='dark:text-slate-600']:is(.dark *) {
82+ color: var(--xuhome-console-text-secondary) !important;
83+ }
84+ .dark #theme-xuhome [class~='dark:bg-slate-600'],
85+ .dark #theme-xuhome [class~='dark:bg-slate-700'],
86+ .dark #theme-xuhome [class~='dark:bg-slate-800'] {
87+ background-color: var(--xuhome-console-card) !important;
88+ }
89+ .dark #theme-xuhome [class~='dark:bg-slate-900/85'] {
90+ background-color: color-mix(
91+ in srgb,
92+ var(--xuhome-console-bg) 85%,
93+ transparent
94+ ) !important;
95+ }
96+ #theme-xuhome [class~='bg-[#faf8f5]/55'] {
97+ background-color: color-mix(
98+ in srgb,
99+ var(--xuhome-console-bg) 55%,
100+ transparent
101+ ) !important;
102+ }
103+ #theme-xuhome [class~='hover:bg-[#0284c7]']:hover {
104+ background-color: var(--xuhome-console-primary) !important;
105+ }
106+ #theme-xuhome [class~='hover:bg-[#0ea5e9]']:hover {
107+ background-color: var(--xuhome-console-primary-hover) !important;
108+ }
109+ #theme-xuhome [class~='hover:bg-[#fde68a]']:hover {
110+ background-color: var(--xuhome-accent) !important;
111+ }
112+ #theme-xuhome [class~='hover:text-[#0284c7]']:hover,
113+ #theme-xuhome .group:hover [class~='group-hover:text-[#0284c7]'] {
114+ color: var(--xuhome-console-primary) !important;
115+ }
116+ #theme-xuhome .group:hover [class~='group-hover:text-[#0ea5e9]'] {
117+ color: var(--xuhome-console-primary-hover) !important;
118+ }
119+ #theme-xuhome [class~='shadow-[1px_1px_0px_0px_#0284c7]'] {
120+ --tw-shadow: 1px 1px 0 0 var(--xuhome-console-border);
121+ }
122+ #theme-xuhome [class~='shadow-[2px_2px_0px_0px_#0284c7]'] {
123+ --tw-shadow: 2px 2px 0 0 var(--xuhome-console-border);
124+ }
125+ #theme-xuhome [class~='shadow-[3px_3px_0px_0px_#0284c7]'] {
126+ --tw-shadow: 3px 3px 0 0 var(--xuhome-console-border);
127+ }
128+ #theme-xuhome [class~='shadow-[4px_4px_0px_0px_#0284c7]'] {
129+ --tw-shadow: 4px 4px 0 0 var(--xuhome-console-border);
130+ }
131+ #theme-xuhome [class~='hover:shadow-[4px_4px_0px_0px_#0284c7]']:hover {
132+ --tw-shadow: 4px 4px 0 0 var(--xuhome-console-border);
133+ }
134+ #theme-xuhome [class~='hover:shadow-[6px_6px_0px_0px_#0284c7]']:hover {
135+ --tw-shadow: 6px 6px 0 0 var(--xuhome-console-border);
136+ }
137+ #theme-xuhome [class~='active:shadow-[1px_1px_0px_0px_#0284c7]']:active {
138+ --tw-shadow: 1px 1px 0 0 var(--xuhome-console-border);
139+ }
140+ #theme-xuhome [class~='active:shadow-[2px_2px_0px_0px_#0284c7]']:active {
141+ --tw-shadow: 2px 2px 0 0 var(--xuhome-console-border);
142+ }
143+ #theme-xuhome [class~='shadow-[0px_4px_0px_0px_#0284c7]'] {
144+ --tw-shadow: 0 4px 0 0 var(--xuhome-console-border);
145+ }
146+ #theme-xuhome [class~='shadow-[0px_4px_0px_0px_rgba(2,132,199,0.2)]'] {
147+ --tw-shadow: 0 4px 0 0
148+ color-mix(in srgb, var(--xuhome-console-border) 20%, transparent);
26149 }
27150
28151 #theme-xuhome ::selection {
@@ -76,15 +199,15 @@ const Style = () => {
76199 ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
77200 }
78201 .dark #theme-xuhome #notion-article code {
79- background: #334155 ;
202+ background: var(--xuhome-console-card) ;
80203 color: var(--xuhome-accent);
81204 }
82205
83206 #theme-xuhome #notion-article pre {
84207 border-radius: 0.125rem;
85208 padding: 16px;
86209 overflow-x: auto;
87- background: #f8fafc ;
210+ background: var(--xuhome-console-card) ;
88211 border: 2px solid var(--xuhome-primary);
89212 font-size: 0.8125rem;
90213 line-height: 1.5;
@@ -97,11 +220,11 @@ const Style = () => {
97220 border-left: 4px solid var(--xuhome-accent);
98221 padding: 0.5em 1em;
99222 margin: 1em 0;
100- background: rgba(253, 230, 138, 0.1 );
223+ background: color-mix(in srgb, var(--xuhome-accent) 10%, transparent );
101224 font-weight: 500;
102225 }
103226 .dark #theme-xuhome #notion-article blockquote {
104- background: rgba(253, 230, 138, 0.05 );
227+ background: color-mix(in srgb, var(--xuhome-accent) 5%, transparent );
105228 }
106229
107230 #theme-xuhome #notion-article hr {
@@ -128,7 +251,7 @@ const Style = () => {
128251 letter-spacing: 0.05em;
129252 }
130253 .dark #theme-xuhome #notion-article th {
131- background: #334155 ;
254+ background: var(--xuhome-console-card) ;
132255 color: var(--xuhome-accent);
133256 border-color: var(--xuhome-primary);
134257 }
@@ -157,7 +280,7 @@ const Style = () => {
157280 height: 8px;
158281 }
159282 #theme-xuhome ::-webkit-scrollbar-track {
160- background: #f1f5f9 ;
283+ background: var(--xuhome-console-card) ;
161284 }
162285 #theme-xuhome ::-webkit-scrollbar-thumb {
163286 background: var(--xuhome-primary);
0 commit comments