|
83 | 83 |
|
84 | 84 | // 테마에 따른 변수 설정 함수 |
85 | 85 | const getThemeVariables = (isDark) => { |
86 | | - const baseVariables = { |
87 | | - // 투명 배경 설정 |
88 | | - background: 'transparent', |
89 | | - mainBkg: 'transparent', |
90 | | - |
91 | | - // 폰트 설정 |
92 | | - fontFamily: 'Inter, -apple-system, BlinkMacSystemFont, sans-serif', |
93 | | - fontSize: '14px', |
94 | | - }; |
| 86 | + const baseVariables = { |
| 87 | + // 완전 투명 배경 설정 |
| 88 | + background: 'transparent', |
| 89 | + mainBkg: 'transparent', |
| 90 | + secondaryBkg: 'transparent', |
| 91 | + tertiaryBkg: 'transparent', |
| 92 | + |
| 93 | + // 폰트 설정 |
| 94 | + fontFamily: 'Inter, -apple-system, BlinkMacSystemFont, sans-serif', |
| 95 | + fontSize: '14px', |
| 96 | + }; |
95 | 97 |
|
96 | 98 | if (isDark) { |
97 | 99 | return { |
98 | 100 | ...baseVariables, |
99 | | - // 다크모드 색상 |
100 | | - primaryColor: '#8b7cf8', |
101 | | - primaryTextColor: '#f7fafc', |
102 | | - primaryBorderColor: '#7c3aed', |
| 101 | + // 다크모드 색상 (더 밝고 선명하게) |
| 102 | + primaryColor: '#a78bfa', |
| 103 | + primaryTextColor: '#ffffff', |
| 104 | + primaryBorderColor: '#8b7cf8', |
103 | 105 |
|
104 | | - secondaryColor: '#a78bfa', |
105 | | - secondaryTextColor: '#f7fafc', |
106 | | - secondaryBorderColor: '#8b5cf6', |
| 106 | + secondaryColor: '#c084fc', |
| 107 | + secondaryTextColor: '#ffffff', |
| 108 | + secondaryBorderColor: '#a78bfa', |
107 | 109 |
|
108 | 110 | tertiaryColor: '#fbbf24', |
109 | | - tertiaryTextColor: '#1a202c', |
| 111 | + tertiaryTextColor: '#ffffff', |
110 | 112 | tertiaryBorderColor: '#f59e0b', |
111 | 113 |
|
112 | | - // 배경과 표면 (투명/반투명) |
113 | | - secondaryBkg: 'rgba(79, 70, 229, 0.1)', |
114 | | - tertiaryBkg: 'rgba(168, 85, 247, 0.1)', |
115 | | - |
116 | | - // 텍스트 색상 (다크모드) |
117 | | - textColor: '#f7fafc', |
118 | | - lineColor: '#6b7280', |
| 114 | + // 텍스트 색상 (다크모드 - 더 밝게) |
| 115 | + textColor: '#ffffff', |
| 116 | + lineColor: '#8b7cf8', |
119 | 117 |
|
120 | 118 | // 노트 색상 |
121 | | - noteBkgColor: 'rgba(59, 130, 246, 0.15)', |
122 | | - noteTextColor: '#f7fafc', |
123 | | - noteBorderColor: '#3b82f6', |
| 119 | + noteBkgColor: 'transparent', |
| 120 | + noteTextColor: '#ffffff', |
| 121 | + noteBorderColor: '#a78bfa', |
124 | 122 |
|
125 | 123 | // 플로우차트 |
126 | | - nodeBorder: '#8b7cf8', |
127 | | - clusterBkg: 'rgba(168, 85, 247, 0.1)', |
128 | | - clusterBorder: '#a78bfa', |
129 | | - defaultLinkColor: '#8b7cf8', |
130 | | - titleColor: '#f7fafc', |
131 | | - nodeTextColor: '#1a202c', |
| 124 | + nodeBorder: '#a78bfa', |
| 125 | + clusterBkg: 'transparent', |
| 126 | + clusterBorder: '#c084fc', |
| 127 | + defaultLinkColor: '#a78bfa', |
| 128 | + titleColor: '#ffffff', |
| 129 | + nodeTextColor: '#ffffff', |
132 | 130 |
|
133 | 131 | // 시퀀스 다이어그램 |
134 | | - actorBkg: 'rgba(139, 124, 248, 0.2)', |
135 | | - actorBorder: '#8b7cf8', |
136 | | - actorTextColor: '#f7fafc', |
137 | | - signalColor: '#8b7cf8', |
138 | | - signalTextColor: '#f7fafc', |
| 132 | + actorBkg: 'transparent', |
| 133 | + actorBorder: '#a78bfa', |
| 134 | + actorTextColor: '#ffffff', |
| 135 | + signalColor: '#a78bfa', |
| 136 | + signalTextColor: '#ffffff', |
139 | 137 |
|
140 | 138 | // 간트 차트 |
141 | | - gridColor: '#4b5563', |
142 | | - section0: '#8b7cf8', |
143 | | - section1: '#a78bfa', |
| 139 | + gridColor: '#6b7280', |
| 140 | + section0: '#a78bfa', |
| 141 | + section1: '#c084fc', |
144 | 142 | section2: '#fbbf24', |
145 | 143 | section3: '#34d399', |
146 | 144 |
|
147 | 145 | // 파이 차트 |
148 | | - pie1: '#8b7cf8', |
149 | | - pie2: '#a78bfa', |
| 146 | + pie1: '#a78bfa', |
| 147 | + pie2: '#c084fc', |
150 | 148 | pie3: '#fbbf24', |
151 | 149 | pie4: '#34d399', |
152 | 150 | pie5: '#f87171', |
153 | 151 | pie6: '#60a5fa', |
154 | | - pie7: '#c084fc', |
| 152 | + pie7: '#e879f9', |
155 | 153 | pie8: '#22d3ee', |
156 | 154 | pie9: '#fb7185', |
157 | 155 | pie10: '#4ade80', |
158 | | - pie11: '#818cf8', |
| 156 | + pie11: '#8b7cf8', |
159 | 157 | pie12: '#f472b6' |
160 | 158 | }; |
161 | 159 | } else { |
|
174 | 172 | tertiaryTextColor: '#1a202c', |
175 | 173 | tertiaryBorderColor: '#e879f9', |
176 | 174 |
|
177 | | - // 배경과 표면 (투명/반투명) |
178 | | - secondaryBkg: 'rgba(102, 126, 234, 0.1)', |
179 | | - tertiaryBkg: 'rgba(240, 147, 251, 0.1)', |
180 | | - |
181 | 175 | // 텍스트 색상 (라이트모드) |
182 | 176 | textColor: '#2d3748', |
183 | | - lineColor: '#cbd5e0', |
| 177 | + lineColor: '#667eea', |
184 | 178 |
|
185 | 179 | // 노트 색상 |
186 | | - noteBkgColor: 'rgba(102, 126, 234, 0.1)', |
| 180 | + noteBkgColor: 'transparent', |
187 | 181 | noteTextColor: '#2d3748', |
188 | 182 | noteBorderColor: '#667eea', |
189 | 183 |
|
190 | 184 | // 플로우차트 |
191 | 185 | nodeBorder: '#5a67d8', |
192 | | - clusterBkg: 'rgba(240, 147, 251, 0.1)', |
| 186 | + clusterBkg: 'transparent', |
193 | 187 | clusterBorder: '#e879f9', |
194 | 188 | defaultLinkColor: '#667eea', |
195 | 189 | titleColor: '#2d3748', |
196 | | - nodeTextColor: '#1a202c', |
| 190 | + nodeTextColor: '#ffffff', |
197 | 191 |
|
198 | 192 | // 시퀀스 다이어그램 |
199 | | - actorBkg: 'rgba(102, 126, 234, 0.15)', |
| 193 | + actorBkg: 'transparent', |
200 | 194 | actorBorder: '#5a67d8', |
201 | | - actorTextColor: '#1a202c', |
| 195 | + actorTextColor: '#ffffff', |
202 | 196 | signalColor: '#667eea', |
203 | 197 | signalTextColor: '#2d3748', |
204 | 198 |
|
|
373 | 367 | display: block; |
374 | 368 | margin: 0 auto; |
375 | 369 | font-family: var(--font-family, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif); |
| 370 | + background: transparent !important; |
376 | 371 | } |
377 | 372 |
|
378 | 373 | /* 다이어그램 제목 스타일링 */ |
|
387 | 382 | .mermaid .node rect, |
388 | 383 | .mermaid .node circle, |
389 | 384 | .mermaid .node polygon { |
390 | | - fill: url(#siteGradient); |
391 | | - stroke: var(--primary-color, #667eea); |
392 | | - stroke-width: 2px; |
| 385 | + fill: url(#siteGradient) !important; |
| 386 | + stroke: var(--primary-color, #667eea) !important; |
| 387 | + stroke-width: 2px !important; |
393 | 388 | filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); |
394 | 389 | } |
395 | 390 |
|
| 391 | + /* SVG 배경 강제 투명 처리 */ |
| 392 | + .mermaid svg rect[fill="#ffffff"], |
| 393 | + .mermaid svg rect[fill="white"], |
| 394 | + .mermaid svg rect[style*="fill: #ffffff"], |
| 395 | + .mermaid svg rect[style*="fill: white"], |
| 396 | + .mermaid svg rect[fill="#1a202c"], |
| 397 | + .mermaid svg rect[fill="#000000"], |
| 398 | + .mermaid svg rect[style*="fill: #1a202c"], |
| 399 | + .mermaid svg rect[style*="fill: #000000"] { |
| 400 | + fill: transparent !important; |
| 401 | + } |
| 402 | + |
| 403 | + /* 노드 라벨 색상 강제 적용 */ |
| 404 | + .mermaid .nodeLabel { |
| 405 | + color: #ffffff !important; |
| 406 | + font-weight: 600 !important; |
| 407 | + text-shadow: 1px 1px 2px rgba(0,0,0,0.3); |
| 408 | + } |
| 409 | + |
396 | 410 | /* 그라데이션 정의 */ |
397 | 411 | .mermaid svg defs { |
398 | 412 | background: transparent; |
|
414 | 428 | .mermaid .nodeLabel, |
415 | 429 | .mermaid .edgeLabel { |
416 | 430 | font-family: var(--font-family, 'Inter', sans-serif); |
417 | | - font-weight: 500; |
| 431 | + font-weight: 600; |
418 | 432 | font-size: 14px; |
419 | 433 | } |
420 | 434 |
|
| 435 | + /* 에지 라벨 배경 투명 처리 */ |
| 436 | + .mermaid .edgeLabel rect { |
| 437 | + fill: transparent !important; |
| 438 | + } |
| 439 | + |
| 440 | + /* 에지 라벨 텍스트 색상 */ |
| 441 | + .mermaid .edgeLabel .label { |
| 442 | + color: var(--text-primary, #2d3748) !important; |
| 443 | + } |
| 444 | + |
421 | 445 | /* 다크모드 대응 */ |
422 | 446 | [data-theme="dark"] .mermaid, |
423 | 447 | .dark .mermaid { |
|
436 | 460 | fill: #f7fafc; |
437 | 461 | } |
438 | 462 |
|
| 463 | + [data-theme="dark"] .mermaid .edgeLabel .label, |
| 464 | + .dark .mermaid .edgeLabel .label { |
| 465 | + color: #f7fafc !important; |
| 466 | + } |
| 467 | + |
439 | 468 | @media (prefers-color-scheme: dark) { |
440 | 469 | .mermaid { |
441 | 470 | border: 1px solid rgba(139, 124, 248, 0.3); |
|
450 | 479 | .mermaid .titleText { |
451 | 480 | fill: #f7fafc; |
452 | 481 | } |
| 482 | + |
| 483 | + .mermaid .edgeLabel .label { |
| 484 | + color: #f7fafc !important; |
| 485 | + } |
453 | 486 | } |
454 | 487 |
|
455 | 488 | /* 반응형 대응 */ |
|
0 commit comments