Skip to content

Commit e44997b

Browse files
committed
refactor(docs): switch to Material native Mermaid with EKGF colors
- Remove mkdocs-mermaid2-plugin in favor of Material for MkDocs native support - Configure custom theme colors (indigo primary, orange accent) - Add CSS overrides for Mermaid diagrams to use EKGF blue/orange scheme - Fix instant loading compatibility issues with Mermaid rendering - Node backgrounds: indigo blue (#4051b5) - Borders and connector lines: EKGF orange (#ff6f00) - Text on nodes: white for contrast
1 parent 48c0e9e commit e44997b

File tree

2 files changed

+89
-28
lines changed

2 files changed

+89
-28
lines changed

docs/stylesheets/extra.css

Lines changed: 84 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,87 @@
11
:root {
2-
--md-primary-fg-color: #4A23D9;
3-
--md-primary-fg-color--light: #4A23D9;
4-
--md-primary-fg-color--dark: #25126A;
2+
/* EKGF custom colors - used by entire theme including Mermaid diagrams */
3+
--md-primary-fg-color: #4051b5; /* Material Indigo 500 for primary elements */
4+
--md-primary-fg-color--light: #5c6bc0; /* Lighter indigo */
5+
--md-primary-fg-color--dark: #303f9f; /* Darker indigo */
6+
--md-accent-fg-color: #ff6f00; /* EKGF orange for accents */
7+
--md-accent-fg-color--light: #ff9800; /* Lighter orange */
8+
--md-accent-fg-color--dark: #e65100; /* Darker orange */
9+
}
10+
11+
/* Dark mode color adjustments */
12+
[data-md-color-scheme="slate"] {
13+
--md-primary-fg-color: #4051b5;
14+
--md-primary-fg-color--light: #5c6bc0;
15+
--md-primary-fg-color--dark: #303f9f;
16+
--md-accent-fg-color: #ff6f00;
17+
--md-accent-fg-color--light: #ff9800;
18+
--md-accent-fg-color--dark: #e65100;
19+
}
20+
21+
/* Force Mermaid diagram elements to use EKGF colors */
22+
/* Node backgrounds - indigo blue */
23+
.mermaid .node rect,
24+
.mermaid .node circle,
25+
.mermaid .node ellipse,
26+
.mermaid .node polygon,
27+
.mermaid .cluster rect,
28+
.mermaid g.classGroup rect {
29+
fill: #4051b5 !important;
30+
}
31+
32+
/* Node borders - orange */
33+
.mermaid .node rect,
34+
.mermaid .node circle,
35+
.mermaid .node ellipse,
36+
.mermaid .node polygon,
37+
.mermaid .cluster rect,
38+
.mermaid g.classGroup rect {
39+
stroke: #ff6f00 !important;
40+
stroke-width: 2px !important;
41+
}
42+
43+
/* Connector lines and arrows - orange */
44+
.mermaid .edgePath path,
45+
.mermaid .flowchart-link,
46+
.mermaid line.relation,
47+
.mermaid path.relation,
48+
.mermaid line[class*="messageLine"],
49+
.mermaid path[class*="messageLine"] {
50+
stroke: #ff6f00 !important;
51+
stroke-width: 2px !important;
52+
}
53+
54+
/* Arrow markers - orange */
55+
.mermaid marker path,
56+
.mermaid defs marker path {
57+
fill: #ff6f00 !important;
58+
stroke: #ff6f00 !important;
59+
}
60+
61+
/* Text labels on nodes - white */
62+
.mermaid .nodeLabel,
63+
.mermaid text.nodeLabel,
64+
.mermaid .node text,
65+
.mermaid .classLabel .label,
66+
.mermaid tspan {
67+
fill: #ffffff !important;
68+
color: #ffffff !important;
69+
}
70+
71+
/* Edge labels - keep dark for readability */
72+
.mermaid .edgeLabel,
73+
.mermaid .edgeLabel text,
74+
.mermaid .edgeLabel tspan {
75+
fill: #333333 !important;
76+
color: #333333 !important;
77+
}
78+
79+
/* Dark mode edge label adjustments */
80+
[data-md-color-scheme="slate"] .mermaid .edgeLabel,
81+
[data-md-color-scheme="slate"] .mermaid .edgeLabel text,
82+
[data-md-color-scheme="slate"] .mermaid .edgeLabel tspan {
83+
fill: #ffffff !important;
84+
color: #ffffff !important;
585
}
686

787
/* Card Design Enhancements */
@@ -575,3 +655,4 @@
575655
.md-typeset blockquote p:last-child {
576656
margin-bottom: 0;
577657
}
658+

mkdocs.yml

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ theme:
2626
palette:
2727
- media: "(prefers-color-scheme: light)"
2828
scheme: default
29-
primary: indigo
30-
accent: light blue
29+
primary: custom
30+
accent: custom
3131
toggle:
3232
# icon: material/toggle-switch-off-outline
3333
# icon: material/lightbulb-outline
3434
icon: material/weather-sunny
3535
name: Switch to dark mode
3636
- media: "(prefers-color-scheme: dark)"
3737
scheme: slate
38-
primary: indigo
39-
accent: deep orange
38+
primary: custom
39+
accent: custom
4040
toggle:
4141
# icon: material/toggle-switch
4242
# icon: material/lightbulb
@@ -83,26 +83,6 @@ plugins:
8383
- search:
8484
lang:
8585
- en
86-
- mermaid2:
87-
javascript: "https://unpkg.com/mermaid/dist/mermaid.min.js"
88-
arguments:
89-
# Use a consistent “EKGF blue” background with white text for all Mermaid diagrams.
90-
# We use theme "base" so we can control colors via themeVariables.
91-
theme: "base"
92-
themeVariables:
93-
# Match MkDocs Material "indigo" (nav bar) for node fills, but keep the canvas white
94-
# so connectors remain visible.
95-
background: "#ffffff"
96-
primaryColor: "#4051b5" # Material Indigo 500 (close to the nav bar)
97-
secondaryColor: "#4051b5"
98-
tertiaryColor: "#4051b5"
99-
primaryTextColor: "#ffffff"
100-
secondaryTextColor: "#ffffff"
101-
tertiaryTextColor: "#ffffff"
102-
primaryBorderColor: "#ff6f00" # EKGF orange (lines/borders)
103-
lineColor: "#ff6f00" # EKGF orange
104-
textColor: "#ffffff"
105-
securityLevel: 'loose'
10686
- exclude-search:
10787
exclude:
10888
- 'fragment/*'
@@ -174,7 +154,7 @@ markdown_extensions:
174154
custom_fences:
175155
- name: mermaid
176156
class: mermaid
177-
format: !!python/name:mermaid2.fence_mermaid
157+
format: !!python/name:pymdownx.superfences.fence_code_format
178158
- pymdownx.tabbed:
179159
alternate_style: true
180160
slugify: !!python/object/apply:pymdownx.slugs.slugify

0 commit comments

Comments
 (0)