Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Empty file modified _freeze/site_libs/revealjs/plugin/markdown/plugin.js
100644 → 100755
Empty file.
52 changes: 33 additions & 19 deletions _freeze/site_libs/revealjs/plugin/quarto-support/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,36 +281,49 @@ window.QuartoSupport = function () {
}
}

// dispatch for htmlwidgets
// they use slideenter event to trigger resize
const fireSlideEnter = () => {
const event = window.document.createEvent("Event");
event.initEvent("slideenter", true, true);
window.document.dispatchEvent(event);
};

// dispatch for shiny
// they use BS shown and hidden events to trigger rendering
const distpatchShinyEvents = (previous, current) => {
if (window.jQuery) {
if (previous) {
window.jQuery(previous).trigger("hidden");
}
if (current) {
window.jQuery(current).trigger("shown");
}
}
};

function handleSlideChanges(deck) {
// dispatch for htmlwidgets
const fireSlideEnter = () => {
const event = window.document.createEvent("Event");
event.initEvent("slideenter", true, true);
window.document.dispatchEvent(event);
};

const fireSlideChanged = (previousSlide, currentSlide) => {
fireSlideEnter();

// dispatch for shiny
if (window.jQuery) {
if (previousSlide) {
window.jQuery(previousSlide).trigger("hidden");
}
if (currentSlide) {
window.jQuery(currentSlide).trigger("shown");
}
}
distpatchShinyEvents(previousSlide, currentSlide);
};

// fire slideEnter for tabby tab activations (for htmlwidget resize behavior)
document.addEventListener("tabby", fireSlideEnter, false);

deck.on("slidechanged", function (event) {
fireSlideChanged(event.previousSlide, event.currentSlide);
});
}

function handleTabbyChanges() {
const fireTabChanged = (previousTab, currentTab) => {
fireSlideEnter()
distpatchShinyEvents(previousTab, currentTab);
};
document.addEventListener("tabby", function(event) {
fireTabChanged(event.detail.previousTab, event.detail.tab);
}, false);
}

function workaroundMermaidDistance(deck) {
if (window.document.querySelector("pre.mermaid-js")) {
const slideCount = deck.getTotalSlides();
Expand Down Expand Up @@ -390,6 +403,7 @@ window.QuartoSupport = function () {
addFooter(deck);
addChalkboardButtons(deck);
handleTabbyClicks();
handleTabbyChanges();
handleSlideChanges(deck);
workaroundMermaidDistance(deck);
handleWhiteSpaceInColumns(deck);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ The plugin has several configuration options:
- ```chalkEffect```: a float in the range ```[0.0, 1.0]```, the intesity of the chalk effect on the chalk board. Full effect (default) ```1.0```, no effect ```0.0```.
- ```storage```: Optional variable name for session storage of drawings.
- ```src```: Optional filename for pre-recorded drawings.
- ```readOnly```: Configuation option allowing to prevent changes to existing drawings. If set to ```true``` no changes can be made, if set to false ```false``` changes can be made, if unset or set to ```undefined``` no changes to the drawings can be made after returning to a slide or fragment for which drawings had been recorded before. In any case the recorded drawings for a slide or fragment can be cleared by pressing the 'DEL' key (i.e. by using the ```RevealChalkboard.clear()``` function).
- ```readOnly```: Configuation option allowing to prevent changes to existing drawings. If set to ```true``` no changes can be made, if set to ```false``` changes can be made, if unset or set to ```undefined``` no changes to the drawings can be made after returning to a slide or fragment for which drawings had been recorded before. In any case the recorded drawings for a slide or fragment can be cleared by pressing the 'DEL' key (i.e. by using the ```RevealChalkboard.clear()``` function).
- ```transition```: Gives the duration (in milliseconds) of the transition for a slide change, so that the notes canvas is drawn after the transition is completed.
- ```theme```: Can be set to either ```"chalkboard"``` or ```"whiteboard"```.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,7 @@ const initChalkboard = function ( Reveal ) {
container.style.visibility = 'visible';
container.style.pointerEvents = 'none';
container.style['backdrop-filter'] = 'none';
// for older safari
container.style["-webkit-backdrop-filter"] = "none";
container.style['-webkit-backdrop-filter'] = 'none';

var slides = document.querySelector( '.slides' );
var aspectRatio = Reveal.getConfig().width / Reveal.getConfig().height;
Expand Down
2 changes: 1 addition & 1 deletion docs/authoring/appendices.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To learn more about including document attribution information in the appendix,

## Custom Appendix Sections

Sections of your document can be added to the Appendix that appears at the end of your article by adding the `.appendix` class to any header. For example:
Sections of your document can be added to the Appendix that appears at the end of your article by adding the `.appendix` class to any heading. For example:

``` yaml
## Acknowledgments {.appendix}
Expand Down
56 changes: 29 additions & 27 deletions docs/authoring/markdown-basics.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,33 +41,35 @@ This document provides examples of the most commonly used markdown syntax. See t

## Headings {#headings}

+-----------------+-----------------------------------+
| Markdown Syntax | Output |
+=================+===================================+
| ``` markdown | # Header 1 {.heading-output} |
| # Header 1 | |
| ``` | |
+-----------------+-----------------------------------+
| ``` markdown | ## Header 2 {.heading-output} |
| ## Header 2 | |
| ``` | |
+-----------------+-----------------------------------+
| ``` markdown | ### Header 3 {.heading-output} |
| ### Header 3 | |
| ``` | |
+-----------------+-----------------------------------+
| ``` markdown | #### Header 4 {.heading-output} |
| #### Header 4 | |
| ``` | |
+-----------------+-----------------------------------+
| ``` markdown | ##### Header 5 {.heading-output} |
| ##### Header 5 | |
| ``` | |
+-----------------+-----------------------------------+
| ``` markdown | ###### Header 6 {.heading-output} |
| ###### Header 6 | |
| ``` | |
+-----------------+-----------------------------------+
+------------------+-----------------------------------+
| Markdown Syntax | Output |
+==================+===================================+
| ``` markdown | # Heading 1 {.heading-output} |
| # Heading 1 | |
| ``` | |
+------------------+-----------------------------------+
| ``` markdown | ## Heading 2 {.heading-output} |
| ## Heading 2 | |
| ``` | |
+------------------+-----------------------------------+
| ``` markdown | ### Heading 3 {.heading-output} |
| ### Heading 3 | |
| ``` | |
+------------------+-----------------------------------+
| ``` markdown | #### Heading 4 {.heading-output} |
| #### Heading 4 | |
| ``` | |
+------------------+-----------------------------------+
| ``` markdown | ##### Heading 5 {.heading-output} |
| ##### Heading 5 | |
| ``` | |
+------------------+-----------------------------------+
| ``` markdown | ###### Heading 6 {.heading-output}|
| ###### Heading 6 | |
| ``` | |
+------------------+-----------------------------------+

: {tbl-colwidths="[50, 50]"}

```{=html}
<style type="text/css">
Expand Down
8 changes: 4 additions & 4 deletions docs/books/book-structure.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ format:

## Titles

Since rendering options are provided in `_quarto.yml`, you'll typically see a simple level-one header at the top of chapters. For example:
Since rendering options are provided in `_quarto.yml`, you'll typically see a simple level-one heading at the top of chapters. For example:

``` {.markdown filename="intro.qmd"}
# Introduction
Expand All @@ -59,11 +59,11 @@ title: "Introduction"
---
```

In the absence of a level-one header or a title set in the YAML front matter, the first header in the page will be used as the title.
In the absence of a level-one heading or a title set in the YAML front matter, the first heading in the page will be used as the title.

## Chapter Numbers

All chapters are numbered by default. If you want a chapter to be unnumbered simply add the `.unnumbered` class to its main header. For example, it is common to omit the chapter number for `index.qmd`:
All chapters are numbered by default. If you want a chapter to be unnumbered simply add the `.unnumbered` class to its main heading. For example, it is common to omit the chapter number for `index.qmd`:

```{.markdown filename="index.qmd"}
# Preface {.unnumbered}
Expand Down Expand Up @@ -185,7 +185,7 @@ book:
- environments.qmd
```

Note that the markdown files `dice.qmd` and `cards.qmd` contain the part title (as a level one header) as well as some introductory content for the part. If you just need a part title then you can alternatively use this syntax:
Note that the markdown files `dice.qmd` and `cards.qmd` contain the part title (as a level one heading) as well as some introductory content for the part. If you just need a part title then you can alternatively use this syntax:

```{.yaml filename="_quarto.yml"}
book:
Expand Down
2 changes: 1 addition & 1 deletion docs/dashboards/interactivity/observable.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Inputs.table(filtered)

3. `filtered` is a value that is automatically recomputed when variables declared with `viewof` change (in this case `bill_length_min` and `islands`).

4. Create global sidebars by adding the `.sidebar` class to a level 1 header. Sidebars can include code cells as well as images, narrative, and links.
4. Create global sidebars by adding the `.sidebar` class to a level 1 heading. Sidebars can include code cells as well as images, narrative, and links.

5. Here we define our inputs using `viewof` so that the `filtered` dataset is automatically recomputed when they change.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def dataview():

2. The `context: setup` cell option indicates that this code cell should run when the application starts (as opposed to when each new client session starts). Expensive initialization code (e.g. loading data) should be placed in `context: setup`.

3. Create global sidebars by adding the `.sidebar` class to a level 1 header. Sidebars can include code cells as well as images, narrative, and links.
3. Create global sidebars by adding the `.sidebar` class to a level 1 heading. Sidebars can include code cells as well as images, narrative, and links.

4. These checkbox input groups have their contents dynamically driven from the available categories in the `species` and `islands` fields of the dataset.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def displot():

1. The `server: shiny` option instructs Quarto to run a Shiny Server behind the document.

2. Create sidebars by adding the `.sidebar` class to a level 2 header. Sidebars can include code cells as well as images, narrative, and links.
2. Create sidebars by adding the `.sidebar` class to a level 2 heading. Sidebars can include code cells as well as images, narrative, and links.

3. A series of Shiny input elements (interacting with them updates the `input` object)

Expand Down
4 changes: 2 additions & 2 deletions docs/dashboards/interactivity/shiny-python/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The second argument for each input function is usually a human-readable string t

#### Sidebars and Toolbars

In many dashboards, it's desirable to visually gather all of your input controls into a sidebar. You can do this by adding the `.sidebar` class to a level 2 header, as we did in the example:
In many dashboards, it's desirable to visually gather all of your input controls into a sidebar. You can do this by adding the `.sidebar` class to a level 2 heading, as we did in the example:

````{.python .pymd}
## {.sidebar}
Expand Down Expand Up @@ -147,7 +147,7 @@ By simply adding `#| context: setup` to the code cell, we can tell Quarto to run

### Dashboard Pages

At the top of this dashboard, you can see "Plots" and "Data" headings. These are called **dashboard pages**. Dashboard pages are a way to organize your dashboard into multiple pages, each with its own set of outputs. You can insert dashboard pages by adding level 1 headers to your Markdown. In this case, `# Plots` and `# Data`:
At the top of this dashboard, you can see "Plots" and "Data" headings. These are called **dashboard pages**. Dashboard pages are a way to organize your dashboard into multiple pages, each with its own set of outputs. You can insert dashboard pages by adding level 1 headings to your Markdown. In this case, `# Plots` and `# Data`:

```` {.python .pymd}
# Plots
Expand Down
2 changes: 1 addition & 1 deletion docs/dashboards/interactivity/shiny-r.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ output$data <- renderTable({ # <9>

2. The `context: setup` cell option indicates that this code cell should run when the application starts (as opposed to when each new client session starts). Expensive initialization code (e.g. loading data) should be placed in `context: setup`.

3. Create global sidebars by adding the `.sidebar` class to level 1 headers. Sidebars can include code cells as well as images, narrative, and links.
3. Create global sidebars by adding the `.sidebar` class to level 1 headings. Sidebars can include code cells as well as images, narrative, and links.

4. These select inputs have their contents dynamically driven from the available columns in the dataset.

Expand Down
4 changes: 2 additions & 2 deletions docs/get-started/hello/jupyter.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ You'll notice that the code is now shown above the plot, where previously it was

Markdown cells contain raw markdown that will be passed through to Quarto during rendering.
You can use any valid Quarto [markdown syntax](/docs/authoring/markdown-basics.qmd) in these cells.
Here we specify a header and a cross-reference to the figure created in the code cell below.
Here we specify a heading and a cross-reference to the figure created in the code cell below.

``` {.markdown .visually-hidden}
## Polar Axis
Expand All @@ -180,7 +180,7 @@ For a demonstration of a line plot on a polar axis, see @fig-polar.

![](images/jupyter-markdown.png){.border fig-alt="A Markdown cell with the title Polar Axis as a second level header and text that reads 'For a demonstration of a line plot on a polar axis, see @fig-polar.'"}

Try changing the header and saving the notebook---the preview will update with the new header text.
Try changing the heading and saving the notebook---the preview will update with the new heading text.

## Code Cells

Expand Down
4 changes: 2 additions & 2 deletions docs/get-started/hello/neovim.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ Then re-render the document by saving it.
You'll notice that the code is now shown above the plot, where previously it was hidden with a **Code** button that could be used to show it.

Narrative content is written using markdown.
Here we specify a header and a cross-reference to the figure created in the code cell below.
Here we specify a heading and a cross-reference to the figure created in the code cell below.

``` markdown
## Polar Axis

For a demonstration of a line plot on a polar axis, see @fig-polar.
```

Try changing the header and re-rendering---the preview will update with the new header text.
Try changing the heading and re-rendering---the preview will update with the new heading text.

## Code Cells

Expand Down
4 changes: 2 additions & 2 deletions docs/get-started/hello/rstudio.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ RStudio executes the code and displays the results either inline within your fil

### Markdown text

Text with formatting, including section headers, hyperlinks, an embedded image, and an inline code chunk.
Text with formatting, including section headings, hyperlinks, an embedded image, and an inline code chunk.

![](images/rstudio-text.png){.border fig-alt="Text portion of the of the linked example document titled \"Penguins, meet Quarto!\", with an annotation that reads \"Text\"." fig-align="center"}

Quarto uses markdown syntax for text.
If using the visual editor, you won't need to learn much markdown syntax for authoring your document, as you can use the menus and shortcuts to add a header, bold text, insert a table, etc.
If using the visual editor, you won't need to learn much markdown syntax for authoring your document, as you can use the menus and shortcuts to add a heading, bold text, insert a table, etc.
If using the source editor, you can achieve these with markdown expressions like `##`, `**bold**`, etc.

## How it works
Expand Down
4 changes: 2 additions & 2 deletions docs/get-started/hello/text-editor.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ You'll notice that the code is now shown above the plot, where previously it was
## Markdown

Narrative content is written using markdown.
Here we specify a header and a cross-reference to the figure created in the code cell below.
Here we specify a heading and a cross-reference to the figure created in the code cell below.

``` markdown
## Polar Axis

For a demonstration of a line plot on a polar axis, see @fig-polar.
```

Try changing the header and saving the notebook---the preview will update with the new header text.
Try changing the heading and saving the notebook---the preview will update with the new heading text.

## Code Cells

Expand Down
4 changes: 2 additions & 2 deletions docs/get-started/hello/vscode.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,15 @@ You'll notice that the code is now shown above the plot, where previously it was
## Markdown

Narrative content is written using markdown.
Here we specify a header and a cross-reference to the figure created in the code cell below.
Here we specify a heading and a cross-reference to the figure created in the code cell below.

``` markdown
## Polar Axis

For a demonstration of a line plot on a polar axis, see @fig-polar.
```

Try changing the header and re-rendering---the preview will update with the new header text.
Try changing the heading and re-rendering---the preview will update with the new heading text.

## Code Cells

Expand Down
2 changes: 1 addition & 1 deletion docs/presentations/_creating-slides-reveal.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ format: {{< meta slide-format >}}
- Count sheep
```

You can also divide slide shows into sections with title slides using a level 1 header (`#`). For example:
You can also divide slide shows into sections with title slides using a level 1 heading (`#`). For example:

``` {.markdown code-preview="examples/creating-slides-2.qmd"}
---
Expand Down
2 changes: 1 addition & 1 deletion docs/presentations/_creating-slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ format: {{< meta slide-format >}}
- Count sheep
```

You can also divide slide shows into sections with title slides using a level 1 header (`#`). For example:
You can also divide slide shows into sections with title slides using a level 1 heading (`#`). For example:


``` markdown
Expand Down
2 changes: 1 addition & 1 deletion docs/presentations/_incremental-pause-reveal.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ content before the pause
content after the pause
```

Note this only works below headers that are creating slides (see [Creating slides](#creating-slides)).
Note this only works below headings that are creating slides (see [Creating slides](#creating-slides)).
2 changes: 1 addition & 1 deletion docs/presentations/_incremental-pause.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ content before the pause
content after the pause
```

Note this only works below headers that are creating slides (see [Creating slides](#creating-slides)).
Note this only works below headings that are creating slides (see [Creating slides](#creating-slides)).
Loading