Skip to content

Commit 2905df9

Browse files
committed
adjust site
1 parent 0dad192 commit 2905df9

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<small>Sample content borrowed with thanks from [elm-markdown](http://elm-lang.org/examples/markdown) ❤️</small>
5959

6060
> [!Tip]
61-
> Normal and "alert" blockquotes are possible. Use `renderRule` for more control if needed.
61+
> Normal and "alert" blockquotes are possible. Use `renderRule` for more control if needed. Classes like `.markdown-alert-[type]` are provided as styling hooks.
6262

6363
Custom handling of code blocks (or any rule!) is possible with the [`renderRule` option](https://github.com/quantizor/markdown-to-jsx#optionsrenderrule). For example, LaTeX support via [`@matejmazur/react-katex`](https://www.npmjs.com/package/@matejmazur/react-katex):
6464

site.tsx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,42 @@ const GlobalStyles = createGlobalStyle`
196196
}
197197
}
198198
199+
&.markdown-alert-note header {
200+
color: cornflowerblue;
201+
202+
&::before {
203+
content: 'ⓘ';
204+
margin-right: 4px;
205+
}
206+
}
207+
208+
&.markdown-alert-important header {
209+
color: darkorchid;
210+
211+
&::before {
212+
content: '❕';
213+
margin-right: 4px;
214+
}
215+
}
216+
217+
&.markdown-alert-warning header {
218+
color: gold;
219+
220+
&::before {
221+
content: '⚠️';
222+
margin-right: 4px;
223+
}
224+
}
225+
226+
&.markdown-alert-caution header {
227+
color: red;
228+
229+
&::before {
230+
content: '🛑';
231+
margin-right: 4px;
232+
}
233+
}
234+
199235
header + * {
200236
margin-top: 0.25em;
201237
}
@@ -285,6 +321,8 @@ const Compiled = styled.div`
285321
${sharedCss};
286322
padding-left: 2rem;
287323
padding-right: 1rem;
324+
padding-top: 2rem;
325+
padding-bottom: 2rem;
288326
overflow: auto;
289327
overflow-x: hidden;
290328
`

0 commit comments

Comments
 (0)