Skip to content

Commit 38a8381

Browse files
authored
Style note boxes more like current docs (#8097)
* Style note boxes more like current docs - Switch the body font to Helvetica. Raleway isn't intended as a body copy face. We should continue using a Helvetica stack. - Import the icons and colors for tip/warning/note boxes to match the current book. * Use IBM plex as the body typeface
1 parent 565fa23 commit 38a8381

File tree

7 files changed

+121
-0
lines changed

7 files changed

+121
-0
lines changed

.vitepress/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export default defineConfig({
3030
['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }],
3131
['link', { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' }],
3232
['link', { href: 'https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap', rel: 'stylesheet' }],
33+
['link', { href: 'https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap', rel: 'stylesheet'}],
3334
],
3435
rewrites: {
3536
':version/:slug*': ':version/:slug*'

.vitepress/theme/custom.css

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
1+
/* Generated by Font Squirrel (http://www.fontsquirrel.com) on March 22, 2016 */
2+
@font-face {
3+
font-family: 'cake_dingbatsregular';
4+
src: url('/fonts/cakedingbats-webfont.eot');
5+
src: url('/fonts/cakedingbats-webfont.eot?#iefix') format('embedded-opentype'),
6+
url('/fonts/cakedingbats-webfont.woff2') format('woff2'),
7+
url('/fonts/cakedingbats-webfont.woff') format('woff'),
8+
url('/fonts/cakedingbats-webfont.ttf') format('truetype'),
9+
url('/fonts/cakedingbats-webfont.svg#cake_dingbatsregular') format('svg');
10+
font-weight: normal;
11+
font-style: normal;
12+
}
13+
114
/* CakePHP Theme Customization */
215
:root {
316
--cake-color-link: #2D7EA4;
417
--cake-color-progress: #d33c43;
518

619
--vp-font-family-base: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
20+
--vp-font-family-body: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
721

822
/* CakePHP Brand Colors - Official Red */
923
--vp-c-brand-1: #d33c43;
@@ -16,6 +30,12 @@
1630
--vp-c-red-2: #c8363d;
1731
--vp-c-red-3: #b02e34;
1832

33+
/* custom blocks (warning, info, tip, added, deprecated) */
34+
--vp-custom-block-tip-bg: #d9edf7;
35+
--vp-custom-block-note-bg: #fcf8e3;
36+
--vp-custom-block-warning-bg: #f2dede;
37+
--vp-custom-block-info-bg: #dff0d8;
38+
--vp-custom-block-font-size: 14px;
1939
}
2040

2141
/* Dark theme adjustments */
@@ -40,3 +60,47 @@
4060
.vp-doc a {
4161
color: var(--cake-color-link);
4262
}
63+
.vp-doc strong,
64+
.vp-doc em,
65+
.vp-doc i,
66+
.vp-doc b,
67+
.vp-doc li,
68+
.vp-doc p {
69+
font-family: var(--vp-font-family-body);
70+
}
71+
72+
/* Warnings, Info, Tip, Added, Deprecated callout blocks */
73+
.custom-block-title {
74+
padding-left: 33px;
75+
position: relative;
76+
}
77+
.custom-block-title:before {
78+
display: block;
79+
font-family: 'cake_dingbatsregular';
80+
font-size: 24px;
81+
line-height: 24px;
82+
position: absolute;
83+
top: 1px;
84+
left: 1px;
85+
user-select: none;
86+
}
87+
.custom-block.tip .custom-block-title:before {
88+
content: 'X';
89+
color: #97CAE4;
90+
}
91+
.custom-block.note .custom-block-title:before {
92+
color: #E2C99C;
93+
content: 'U';
94+
}
95+
.custom-block.warning .custom-block-title:before {
96+
color: #E0B9B9;
97+
content: 'W';
98+
}
99+
.custom-block.deprecated .custom-block-title:before {
100+
color: #E0B9B9;
101+
content: 'H';
102+
}
103+
.custom-block.info .custom-block-title:before {
104+
color: #A7D096;
105+
content: 'V';
106+
}
13.8 KB
Binary file not shown.

docs/public/fonts/cakedingbats-webfont.svg

Lines changed: 56 additions & 0 deletions
Loading
21.3 KB
Binary file not shown.
15 KB
Binary file not shown.
13.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)