Skip to content

Commit

Permalink
Deploying to gh-pages from @ a3fc652 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
coatless committed Feb 11, 2024
1 parent 14bd680 commit 988e4f9
Show file tree
Hide file tree
Showing 26 changed files with 1,030 additions and 201 deletions.
File renamed without changes.
File renamed without changes.
45 changes: 18 additions & 27 deletions examples/readme/index.html → demos/readme/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.523">
<meta name="generator" content="quarto-1.5.9">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down Expand Up @@ -63,7 +63,8 @@ <h1 class="title">pyodide in Quarto HTML Documents</h1>


<p>This is a pyodide-enabled code cell in a Quarto HTML document.</p>
<pre class="{pyodide-python}"><code>print("Hello Quarto-Pyodide World!")</code></pre>
<div id="qpyodide-insertion-location-1"></div>
<noscript>Please enable JavaScript to experience the dynamic code cell content on this page.</noscript>
<p>Return to the <a href="https://quarto.thecoatlessprofessor.com/pyodide">documentation website</a> or <a href="https://github.com/coatless-quarto/pyodide">GitHub Repository</a>.</p>

</main>
Expand Down Expand Up @@ -196,27 +197,6 @@ <h1 class="title">pyodide in Quarto HTML Documents</h1>
}
}
stripColumnClz(note)
const typesetMath = (el) => {
if (window.MathJax) {
// MathJax Typeset
window.MathJax.typeset([el]);
} else if (window.katex) {
// KaTeX Render
var mathElements = el.getElementsByClassName("math");
var macros = [];
for (var i = 0; i < mathElements.length; i++) {
var texText = mathElements[i].firstChild;
if (mathElements[i].tagName == "SPAN") {
window.katex.render(texText.data, mathElements[i], {
displayMode: mathElements[i].classList.contains('display'),
throwOnError: false,
macros: macros,
fleqn: false
});
}
}
}
}
if (id === null || id.startsWith('sec-')) {
// Special case sections, only their first couple elements
const container = document.createElement("div");
Expand All @@ -231,10 +211,14 @@ <h1 class="title">pyodide in Quarto HTML Documents</h1>
break;
}
}
typesetMath(container);
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(container);
}
return container.innerHTML
} else {
typesetMath(note);
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(note);
}
return note.innerHTML;
}
} else {
Expand All @@ -243,8 +227,15 @@ <h1 class="title">pyodide in Quarto HTML Documents</h1>
if (anchorLink) {
anchorLink.remove();
}
typesetMath(note);
return note.innerHTML;
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(note);
}
// TODO in 1.5, we should make sure this works without a callout special case
if (note.classList.contains("callout")) {
return note.outerHTML;
} else {
return note.innerHTML;
}
}
}
for (var i=0; i<xrefs.length; i++) {
Expand Down
File renamed without changes.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const layoutMarginEls = () => {
// Find any conflicting margin elements and add margins to the
// top to prevent overlap
const marginChildren = window.document.querySelectorAll(
".column-margin.column-container > * "
".column-margin.column-container > *, .margin-caption, .aside"
);

let lastBottom = 0;
Expand All @@ -19,7 +19,9 @@ const layoutMarginEls = () => {
marginChild.style.marginTop = null;
const top = marginChild.getBoundingClientRect().top + window.scrollY;
if (top < lastBottom) {
const margin = lastBottom - top;
const marginChildStyle = window.getComputedStyle(marginChild);
const marginBottom = parseFloat(marginChildStyle["marginBottom"]);
const margin = lastBottom - top + marginBottom;
marginChild.style.marginTop = `${margin}px`;
}
const styles = window.getComputedStyle(marginChild);
Expand Down
55 changes: 20 additions & 35 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.523">
<meta name="generator" content="quarto-1.5.9">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">


<title>quarto-pyodide - Greetings from quarto-pyodide Wonderland!</title>
<title>quarto-pyodide Greetings from quarto-pyodide Wonderland!</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
Expand Down Expand Up @@ -195,7 +195,7 @@
</nav>
<div id="quarto-sidebar-glass" class="quarto-sidebar-collapse-item" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item"></div>
<!-- margin-sidebar -->
<div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
<div id="quarto-margin-sidebar" class="sidebar margin-sidebar zindex-bottom">

</div>
<!-- main -->
Expand Down Expand Up @@ -223,13 +223,8 @@ <h1 class="title">Greetings from quarto-pyodide Wonderland!</h1>

<p>Welcome to the documentation portal for the <a href="https://github.com/coatless-quarto/pyodide"><code>quarto-pyodide</code></a> extension – your key to unlocking the endless possibilities of <a href="https://pyodide.org/en/stable/">pyodide</a> within various <a href="https://quarto.org/">Quarto</a> formats, including <a href="https://quarto.org/docs/output-formats/html-basics.html">HTML</a>, <a href="https://quarto.org/docs/presentations/revealjs/">RevealJS</a>, <a href="https://quarto.org/docs/websites/">Websites</a>, <a href="https://quarto.org/docs/websites/website-blog.html">Blogs</a>, and <a href="https://quarto.org/docs/books">Books</a>.</p>
<p>Ready for an exciting journey into the world of Pyodide’s interactive code cells? Click the “Run Code” button below to experience it firsthand:</p>
<pre class="{pyodide-python}"><code># Welcome to Python!

print("Hello, Quarto-Pyodide!")
print("You've just entered the world of Python programming.")
print("Let's start coding and exploring the amazing possibilities!")

# Feel free to add your own code below and have fun with Python!</code></pre>
<div id="qpyodide-insertion-location-1"></div>
<noscript>Please enable JavaScript to experience the dynamic code cell content on this page.</noscript>
<p>At its core, the <a href="https://github.com/coatless-quarto/pyodide"><code>quarto-pyodide</code> extension</a> is designed to empower you to run <em>Python</em> code directly in your web browser using familiar reporting tools, all without the need for an external Python server. Moreover, the extension abstracts away the need to know HTML or JavaScript to use Pyodide. However, it’s worth noting that you can also choose to unlock the full potential of Pyodide and create more complex applications independently by directly using <a href="https://pyodide.org/en/stable/">Pyodide’s JavaScript API</a>, granting you unparalleled freedom to harness the power of Python in innovative ways.</p>


Expand Down Expand Up @@ -363,27 +358,6 @@ <h1 class="title">Greetings from quarto-pyodide Wonderland!</h1>
}
}
stripColumnClz(note)
const typesetMath = (el) => {
if (window.MathJax) {
// MathJax Typeset
window.MathJax.typeset([el]);
} else if (window.katex) {
// KaTeX Render
var mathElements = el.getElementsByClassName("math");
var macros = [];
for (var i = 0; i < mathElements.length; i++) {
var texText = mathElements[i].firstChild;
if (mathElements[i].tagName == "SPAN") {
window.katex.render(texText.data, mathElements[i], {
displayMode: mathElements[i].classList.contains('display'),
throwOnError: false,
macros: macros,
fleqn: false
});
}
}
}
}
if (id === null || id.startsWith('sec-')) {
// Special case sections, only their first couple elements
const container = document.createElement("div");
Expand All @@ -398,10 +372,14 @@ <h1 class="title">Greetings from quarto-pyodide Wonderland!</h1>
break;
}
}
typesetMath(container);
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(container);
}
return container.innerHTML
} else {
typesetMath(note);
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(note);
}
return note.innerHTML;
}
} else {
Expand All @@ -410,8 +388,15 @@ <h1 class="title">Greetings from quarto-pyodide Wonderland!</h1>
if (anchorLink) {
anchorLink.remove();
}
typesetMath(note);
return note.innerHTML;
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(note);
}
// TODO in 1.5, we should make sure this works without a callout special case
if (note.classList.contains("callout")) {
return note.outerHTML;
} else {
return note.innerHTML;
}
}
}
for (var i=0; i<xrefs.length; i++) {
Expand Down
48 changes: 19 additions & 29 deletions qpyodide-acknowledgements.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.523">
<meta name="generator" content="quarto-1.5.9">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

<meta name="dcterms.date" content="2023-08-12">

<title>quarto-pyodide - Acknowledgments and Collaborations</title>
<title>quarto-pyodide Acknowledgments and Collaborations</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
Expand Down Expand Up @@ -231,7 +231,7 @@ <h1 class="title">Acknowledgments and Collaborations</h1>
<div>
<div class="quarto-title-meta-heading">Modified</div>
<div class="quarto-title-meta-contents">
<p class="date-modified">December 8, 2023</p>
<p class="date-modified">February 11, 2024</p>
</div>
</div>

Expand Down Expand Up @@ -401,27 +401,6 @@ <h1>Fin</h1>
}
}
stripColumnClz(note)
const typesetMath = (el) => {
if (window.MathJax) {
// MathJax Typeset
window.MathJax.typeset([el]);
} else if (window.katex) {
// KaTeX Render
var mathElements = el.getElementsByClassName("math");
var macros = [];
for (var i = 0; i < mathElements.length; i++) {
var texText = mathElements[i].firstChild;
if (mathElements[i].tagName == "SPAN") {
window.katex.render(texText.data, mathElements[i], {
displayMode: mathElements[i].classList.contains('display'),
throwOnError: false,
macros: macros,
fleqn: false
});
}
}
}
}
if (id === null || id.startsWith('sec-')) {
// Special case sections, only their first couple elements
const container = document.createElement("div");
Expand All @@ -436,10 +415,14 @@ <h1>Fin</h1>
break;
}
}
typesetMath(container);
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(container);
}
return container.innerHTML
} else {
typesetMath(note);
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(note);
}
return note.innerHTML;
}
} else {
Expand All @@ -448,8 +431,15 @@ <h1>Fin</h1>
if (anchorLink) {
anchorLink.remove();
}
typesetMath(note);
return note.innerHTML;
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(note);
}
// TODO in 1.5, we should make sure this works without a callout special case
if (note.classList.contains("callout")) {
return note.outerHTML;
} else {
return note.innerHTML;
}
}
}
for (var i=0; i<xrefs.length; i++) {
Expand Down Expand Up @@ -675,4 +665,4 @@ <h1>Fin</h1>



</body></html>
<footer class="footer"><div class="nav-footer"><div class="nav-footer-center"><div class="toc-actions d-sm-block d-md-none"><ul><li><a href="https://github.com/coatless-quarto/pyodide/edit/main/docs/qpyodide-acknowledgements.md" class="toc-action"><i class="bi bi-github"></i>Edit this page</a></li><li><a href="https://github.com/coatless-quarto/pyodide/issues/new" class="toc-action"><i class="bi empty"></i>Report an issue</a></li></ul></div></div></div></footer></body></html>
Loading

0 comments on commit 988e4f9

Please sign in to comment.