Skip to content

Commit 195de18

Browse files
branding
style: gradient header/nav with theme-aware colors
1 parent 948593f commit 195de18

File tree

3 files changed

+52
-20
lines changed

3 files changed

+52
-20
lines changed

docs/assets/branding.css

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/* ============================= */
2+
/* Pirate MIDI gradient headers */
3+
/* ============================= */
4+
5+
/* LIGHT THEME — blue gradient @ 45deg */
6+
:root {
7+
/* Header & top tabs gradient */
8+
--pm-header-gradient: linear-gradient(45deg, #5b8dca 0%, #85d1d4 100%);
9+
/* Ensure header text/icons are readable on the gradient */
10+
--pm-header-fg: #ffffff;
11+
}
12+
13+
/* DARK THEME — pink gradient @ 45deg */
14+
[data-md-color-scheme="slate"] {
15+
--pm-header-gradient: linear-gradient(45deg, #ef5280 0%, #f15a5b 100%);
16+
--pm-header-fg: #ffffff;
17+
}
18+
19+
/* Apply the gradient */
20+
.md-header,
21+
.md-tabs {
22+
background: var(--pm-header-gradient) !important;
23+
color: var(--pm-header-fg);
24+
}
25+
26+
/* Make sure header icons/text inherit the contrast color */
27+
.md-header .md-header__button,
28+
.md-header .md-header__button .md-icon,
29+
.md-header .md-header__title,
30+
.md-header .md-search__input,
31+
.md-header .md-search__icon,
32+
.md-tabs__link,
33+
.md-tabs__item .md-icon {
34+
color: var(--pm-header-fg);
35+
fill: var(--pm-header-fg);
36+
}
37+
38+
/* Keep the default sticky header shadow (optional polish) */
39+
.md-header {
40+
box-shadow: var(--md-shadow-z2);
41+
}
42+
43+
/* Optional: hover state tweaks for tabs on gradients */
44+
.md-tabs__link:hover,
45+
.md-tabs__link--active {
46+
opacity: 0.9;
47+
}

docs/assets/extra.css

Lines changed: 0 additions & 15 deletions
This file was deleted.

mkdocs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ theme:
1515
palette:
1616
- media: "(prefers-color-scheme: light)"
1717
scheme: default
18-
primary: indigo
19-
accent: deep orange
18+
primary: cyan
19+
accent: blue
2020
toggle:
2121
icon: material/weather-night
2222
name: Switch to dark mode
2323
- media: "(prefers-color-scheme: dark)"
2424
scheme: slate
25-
primary: teal
26-
accent: lime
25+
primary: blue
26+
accent: light blue
2727
toggle:
2828
icon: material/weather-sunny
2929
name: Switch to light mode
@@ -55,7 +55,7 @@ nav:
5555
- Support: support/index.md
5656

5757
extra_css:
58-
- assets/extra.css
58+
- assets/branding.css
5959

6060
extra_javascript:
6161
- assets/logo-switch.js

0 commit comments

Comments
 (0)