Skip to content

Commit 4814fbf

Browse files
committed
feat(markdown): move callouts
1 parent e88216f commit 4814fbf

File tree

3 files changed

+242
-236
lines changed

3 files changed

+242
-236
lines changed

_quarto.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ website:
2828
- pages/basic_structure.qmd
2929
- pages/making_a_change.qmd
3030
- pages/markdown.qmd
31+
- pages/quarto_features.qmd
3132
- pages/media.qmd
3233
- pages/customising.qmd
3334
- pages/code.qmd

pages/markdown.qmd

Lines changed: 1 addition & 236 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "(4) Markdown"
2+
title: "Markdown basics"
33
---
44

55
> **Acknowledgements:** This page is adapted from [health-data-science-OR/jupyterlab-introduction](https://github.com/health-data-science-OR/jupyterlab-introduction/blob/main/01_basic_markdown.ipynb).
@@ -152,241 +152,6 @@ You can use this for quotes, highlights, or short notes.
152152

153153
:::
154154

155-
## Callouts
156-
157-
Quarto extends Markdown with **callouts**, which are highlighted boxes you can use for notes, tips, or warnings.
158-
159-
Callouts use a small bit of extra syntax that Quarto understands as a "special box" rather than normal text. In Markdown, `::: ... :::` defines a block (a kind of container) that Quarto treats like an HTML `<div>`. By adding a class to that block, you tell Quarto what kind of callout it is.
160-
161-
A simple callout note looks like this:
162-
163-
* `:::` starts the block.
164-
* `{.callout-note}` says that this is a class "callout-note" (just like HTML `<div class="callout-note">`)/
165-
* Everything until the closing `:::` is the content of the callout.
166-
* The final `:::` closes the block.
167-
168-
::::: {.columns}
169-
170-
:::: {.column width=60%}
171-
172-
Markdown:
173-
174-
```markdown
175-
::: {.callout-note}
176-
This is a callout.
177-
You can use it to draw attention to important information.
178-
:::
179-
```
180-
181-
::::
182-
183-
:::: {.column width=5%}
184-
185-
::::
186-
187-
:::: {.column width=35%}
188-
189-
Output:
190-
191-
::: {.callout-note}
192-
This is a callout.
193-
You can use it to draw attention to important information.
194-
:::
195-
196-
::::
197-
198-
:::::
199-
200-
You can change the type:
201-
202-
::::: {.columns}
203-
204-
:::: {.column width=60%}
205-
206-
```markdown
207-
::: {.callout-tip}
208-
This is a tip.
209-
:::
210-
```
211-
212-
```markdown
213-
::: {.callout-warning}
214-
This is a warning.
215-
:::
216-
```
217-
218-
```markdown
219-
::: {.callout-important}
220-
This is important information.
221-
:::
222-
```
223-
224-
```markdown
225-
::: {.callout-caution}
226-
This is a caution.
227-
:::
228-
```
229-
230-
::::
231-
232-
:::: {.column width=5%}
233-
234-
::::
235-
236-
:::: {.column width=35%}
237-
238-
::: {.callout-tip}
239-
This is a tip.
240-
:::
241-
242-
::: {.callout-warning}
243-
This is a warning.
244-
:::
245-
246-
::: {.callout-important}
247-
This is important information.
248-
:::
249-
250-
::: {.callout-caution}
251-
This is a caution.
252-
:::
253-
254-
::::
255-
256-
:::::
257-
258-
You can add a title:
259-
260-
::::: {.columns}
261-
262-
:::: {.column width=60%}
263-
264-
```markdown
265-
::: {.callout-tip title="Helpful tip"}
266-
Remember to save your file before you render.
267-
:::
268-
```
269-
270-
::::
271-
272-
:::: {.column width=5%}
273-
274-
::::
275-
276-
:::: {.column width=35%}
277-
278-
::: {.callout-tip title="Helpful tip"}
279-
Remember to save your file before you render.
280-
:::
281-
282-
::::
283-
284-
:::::
285-
286-
You can also set the callout to collapse:
287-
288-
::::: {.columns}
289-
290-
:::: {.column width=60%}
291-
292-
```
293-
::: {.callout-note title="More details" collapse="true"}
294-
This extra information is hidden until you click the arrow.
295-
:::
296-
```
297-
298-
::::
299-
300-
:::: {.column width=5%}
301-
302-
::::
303-
304-
:::: {.column width=35%}
305-
306-
::: {.callout-note title="More details" collapse="true"}
307-
This extra information is hidden until you click the arrow.
308-
:::
309-
310-
::::
311-
312-
:::::
313-
314-
You can change the appearance style to `simple` or `minimal`:
315-
316-
::::: {.columns}
317-
318-
:::: {.column width=60%}
319-
320-
```markdown
321-
::: {.callout-note appearance="simple"}
322-
This is a simple callout.
323-
:::
324-
```
325-
326-
```markdown
327-
::: {.callout-note appearance="minimal"}
328-
This is a minimal callout.
329-
:::
330-
```
331-
332-
::::
333-
334-
:::: {.column width=5%}
335-
336-
::::
337-
338-
:::: {.column width=35%}
339-
340-
::: {.callout-note appearance="simple"}
341-
This is a simple callout.
342-
:::
343-
344-
::: {.callout-note appearance="minimal"}
345-
This is a minimal callout.
346-
:::
347-
348-
::::
349-
350-
:::::
351-
352-
You can also hide the icon:
353-
354-
::::: {.columns}
355-
356-
:::: {.column width=60%}
357-
358-
```markdown
359-
::: {.callout-note icon="false"}
360-
Default callout with icon removed
361-
:::
362-
```
363-
364-
::::
365-
366-
:::: {.column width=5%}
367-
368-
::::
369-
370-
:::: {.column width=35%}
371-
372-
::: {.callout-note icon="false"}
373-
Default callout with icon removed
374-
:::
375-
376-
::::
377-
378-
:::::
379-
380-
::: {.pale-blue}
381-
382-
**Task:** In `markdown.qmd`:
383-
384-
* [ ] Add a callout of type `tip` with a short title (e.g., "Helpful tip").
385-
* [ ] Inside the callout, write one sentence of advice (e.g., "Take short breaks when you are concentrating.").
386-
* [ ] Add another callout with `collapse="true"` (e.g., with title "More information" and with content "You can come back to this note later if you need it.").
387-
388-
:::
389-
390155
## Line break
391156

392157
You can insert a line break using `<br>`.

0 commit comments

Comments
 (0)