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
765 changes: 408 additions & 357 deletions Pipfile.lock

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"hash": "20108c2ca26dd1c67905669ef7e0a07b",
"result": {
"engine": "jupyter",
"markdown": "---\nformat:\n revealjs:\n height: 500\n---\n\n::: {#2ecbb1f9 .cell execution_count=1}\n``` {.python .cell-code}\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nr = np.arange(0, 2, 0.01)\ntheta = 2 * np.pi * r\nfig, ax = plt.subplots(subplot_kw={\"projection\": \"polar\"})\nax.plot(theta, r)\nax.set_rticks([0.5, 1, 1.5, 2])\nax.grid(True)\nplt.show()\n```\n\n::: {.cell-output .cell-output-display}\n![](code-echo_files/figure-revealjs/cell-2-output-1.png){width=450 height=439 fig-align='center'}\n:::\n:::\n\n\n",
"markdown": "---\nformat:\n revealjs:\n height: 500\n---\n\n::: {#accf1084 .cell execution_count=1}\n``` {.python .cell-code}\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nr = np.arange(0, 2, 0.01)\ntheta = 2 * np.pi * r\nfig, ax = plt.subplots(subplot_kw={\"projection\": \"polar\"})\nax.plot(theta, r)\nax.set_rticks([0.5, 1, 1.5, 2])\nax.grid(True)\nplt.show()\n```\n\n::: {.cell-output .cell-output-display}\n![](code-echo_files/figure-revealjs/cell-2-output-1.png){width=450 height=439 fig-align='center'}\n:::\n:::\n\n\n",
"supporting": [
"code-echo_files"
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"hash": "714353627ff1c2493943516b2eea0cb1",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: All revealjs examples\nformat:\n revealjs: \n slide-level: 0\n slide-number: c/t\n# listing: default\n---\n\n* [background-color](background-color.qmd)\n* [background-no-title](background-no-title.qmd)\n* [code-echo](code-echo.qmd)\n* [columns](columns.qmd)\n* [creating-slides-1](creating-slides-1.qmd)\n\n----\n\n* [creating-slides-2](creating-slides-2.qmd)\n* [creating-slides-3](creating-slides-3.qmd)\n* [executable-code-figure-size](executable-code-figure-size.qmd)\n* [footer-and-logo](footer-and-logo.qmd)\n* [image-background](image-background.qmd)\n\n----\n\n* [incremental-lists-1](incremental-lists-1.qmd)\n* [incremental-lists-2](incremental-lists-2.qmd)\n* [incremental-lists-3](incremental-lists-3.qmd)\n* [incremental-pause](incremental-pause.qmd)\n* [line-highlighting-1](line-highlighting-1.qmd)\n\n----\n\n* [line-highlighting-2](line-highlighting-2.qmd)\n* [line-highlighting-3](line-highlighting-3.qmd)\n* [line-highlighting-4](line-highlighting-4.qmd)\n* [no-footer-on-a-slide](no-footer-on-a-slide.qmd)\n* [per-slide-footer](per-slide-footer.qmd)\n\n----\n\n* [scrollable-and-smaller](scrollable-and-smaller.qmd)\n* [scrollable](scrollable.qmd)\n* [slide-with-speaker-notes](slide-with-speaker-notes.qmd)\n* [smaller](smaller.qmd)\n* [tabset](tabset.qmd)\n",
"markdown": "---\ntitle: All revealjs examples\nformat:\n revealjs: \n slide-level: 0\n slide-number: c/t\n# listing: default\n---\n\n* [background-color](background-color.qmd)\n* [background-gradient](background-gradient.qmd)\n* [background-no-title](background-no-title.qmd)\n* [code-echo](code-echo.qmd)\n* [columns](columns.qmd)\n\n----\n\n* [creating-slides-1](creating-slides-1.qmd)\n* [creating-slides-2](creating-slides-2.qmd)\n* [creating-slides-3](creating-slides-3.qmd)\n* [executable-code-figure-size](executable-code-figure-size.qmd)\n* [footer-and-logo](footer-and-logo.qmd)\n\n----\n\n* [image-background](image-background.qmd)\n* [incremental-lists-1](incremental-lists-1.qmd)\n* [incremental-lists-2](incremental-lists-2.qmd)\n* [incremental-lists-3](incremental-lists-3.qmd)\n* [incremental-pause](incremental-pause.qmd)\n\n----\n\n* [line-highlighting-1](line-highlighting-1.qmd)\n* [line-highlighting-2](line-highlighting-2.qmd)\n* [line-highlighting-3](line-highlighting-3.qmd)\n* [line-highlighting-4](line-highlighting-4.qmd)\n* [no-footer-on-a-slide](no-footer-on-a-slide.qmd)\n\n----\n\n* [per-slide-footer](per-slide-footer.qmd)\n* [scrollable-and-smaller](scrollable-and-smaller.qmd)\n* [scrollable](scrollable.qmd)\n* [slide-with-speaker-notes](slide-with-speaker-notes.qmd)\n* [smaller](smaller.qmd)\n\n----\n\n* [tabset](tabset.qmd)\n",
"supporting": [],
"filters": [
"rmarkdown/pagebreak.lua"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"hash": "159c13099b33424750324b561f857bf1",
"result": {
"engine": "jupyter",
"markdown": "---\nformat:\n revealjs:\n height: 450\n---\n\n::: {#2ed14e63 .cell execution_count=1}\n``` {.python .cell-code code-line-numbers=\"|6|9\"}\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nr = np.arange(0, 2, 0.01)\ntheta = 2 * np.pi * r\nfig, ax = plt.subplots(subplot_kw={'projection': 'polar'})\nax.plot(theta, r)\nax.set_rticks([0.5, 1, 1.5, 2])\nax.grid(True)\nplt.show()\n```\n\n::: {.cell-output .cell-output-display}\n![](line-highlighting-4_files/figure-revealjs/cell-2-output-1.png){width=450 height=439}\n:::\n:::\n\n\n",
"markdown": "---\nformat:\n revealjs:\n height: 450\n---\n\n::: {#e187998c .cell execution_count=1}\n``` {.python .cell-code code-line-numbers=\"|6|9\"}\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nr = np.arange(0, 2, 0.01)\ntheta = 2 * np.pi * r\nfig, ax = plt.subplots(subplot_kw={'projection': 'polar'})\nax.plot(theta, r)\nax.set_rticks([0.5, 1, 1.5, 2])\nax.grid(True)\nplt.show()\n```\n\n::: {.cell-output .cell-output-display}\n![](line-highlighting-4_files/figure-revealjs/cell-2-output-1.png){width=450 height=439}\n:::\n:::\n\n\n",
"supporting": [
"line-highlighting-4_files"
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

This file was deleted.

8 changes: 0 additions & 8 deletions _freeze/site_libs/revealjs/dist/theme/quarto.css

This file was deleted.

55 changes: 48 additions & 7 deletions _freeze/site_libs/revealjs/plugin/quarto-support/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,13 @@ window.QuartoSupport = function () {
// tweak slide-number element
function tweakSlideNumber(deck) {
deck.on("slidechanged", function (ev) {
// No slide number in scroll view
if (deck.isScrollView()) { return }
const revealParent = deck.getRevealElement();
const slideNumberEl = revealParent.querySelector(".slide-number");
const onDarkBackground = Reveal.getSlideBackground(ev.indexh, ev.indexv).classList.contains('has-dark-background');
const onLightBackground = Reveal.getSlideBackground(ev.indexh, ev.indexv).classList.contains('has-light-background');
const slideBackground = Reveal.getSlideBackground(ev.currentSlide);
const onDarkBackground = slideBackground.classList.contains('has-dark-background')
const onLightBackground = slideBackground.classList.contains('has-light-background')
toggleBackgroundTheme(slideNumberEl, onDarkBackground, onLightBackground);
})
}
Expand All @@ -144,8 +147,8 @@ window.QuartoSupport = function () {
// or show default unless data-footer="false" for no footer on this slide
const setSlideFooter = (ev, defaultFooterDiv) => {
const currentSlideFooter = ev.currentSlide.querySelector(".footer");
const onDarkBackground = deck.getSlideBackground(ev.indexh, ev.indexv).classList.contains('has-dark-background')
const onLightBackground = deck.getSlideBackground(ev.indexh, ev.indexv).classList.contains('has-light-background')
const onDarkBackground = deck.getSlideBackground(ev.currentSlide).classList.contains('has-dark-background')
const onLightBackground = deck.getSlideBackground(ev.currentSlide).classList.contains('has-light-background')
if (currentSlideFooter) {
defaultFooterDiv.style.display = "none";
const slideFooter = currentSlideFooter.cloneNode(true);
Expand Down Expand Up @@ -335,16 +338,49 @@ window.QuartoSupport = function () {
}
}

function cleanEmptyAutpGeneratedContent(deck) {
function cleanEmptyAutoGeneratedContent(deck) {
const div = document.querySelector('div.quarto-auto-generated-content')
if (div.textContent.trim() === '') {
if (div && div.textContent.trim() === '') {
div.remove()
}
}

// FIXME: Possibly remove this wrapper class when upstream trigger is fixed
// https://github.com/hakimel/reveal.js/issues/3688
// Currently, scrollActivationWidth needs to be unset for toggle to work
class ScrollViewToggler {
constructor(deck) {
this.deck = deck;
this.oldScrollActivationWidth = deck.getConfig()['scrollActivationWidth'];
}

toggleScrollViewWrapper() {
if (this.deck.isScrollView() === true) {
this.deck.configure({ scrollActivationWidth: this.oldScrollActivationWidth });
this.deck.toggleScrollView(false);
} else if (this.deck.isScrollView() === false) {
this.deck.configure({ scrollActivationWidth: null });
this.deck.toggleScrollView(true);
}
}
}

let scrollViewToggler;

function installScollViewKeyBindings(deck) {
var config = deck.getConfig();
var shortcut = config.scrollViewShortcut || 'R';
Reveal.addKeyBinding({
keyCode: shortcut.toUpperCase().charCodeAt( 0 ),
key: shortcut.toUpperCase(),
description: 'Scroll View Mode'
}, () => { scrollViewToggler.toggleScrollViewWrapper() } );
}

return {
id: "quarto-support",
init: function (deck) {
scrollViewToggler = new ScrollViewToggler(deck);
controlsAuto(deck);
previewLinksAuto(deck);
fixupForPrint(deck);
Expand All @@ -357,8 +393,13 @@ window.QuartoSupport = function () {
handleSlideChanges(deck);
workaroundMermaidDistance(deck);
handleWhiteSpaceInColumns(deck);
installScollViewKeyBindings(deck);
// should stay last
cleanEmptyAutpGeneratedContent(deck);
cleanEmptyAutoGeneratedContent(deck);
},
// Export for adding in menu
toggleScrollView: function() {
scrollViewToggler.toggleScrollViewWrapper();
}
};
};
2 changes: 2 additions & 0 deletions _freeze/site_libs/revealjs/plugin/reveal-chalkboard/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,8 @@ 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";

var slides = document.querySelector( '.slides' );
var aspectRatio = Reveal.getConfig().width / Reveal.getConfig().height;
Expand Down
3 changes: 3 additions & 0 deletions _freeze/site_libs/revealjs/plugin/reveal-menu/quarto-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ window.RevealMenuToolHandlers = {
togglePdfExport: revealMenuToolHandler(function () {
PdfExport.togglePdfExport();
}),
toggleScrollView: revealMenuToolHandler(function() {
Reveal.getPlugin("quarto-support").toggleScrollView();
})
};