Skip to content

Commit

Permalink
deploy: 042bed7
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Mar 4, 2025
1 parent 9bbfbc5 commit e46f577
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion guide/advanced/javascript_interop.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ <h1 id="javascript-interoperability"><a class="header" href="#javascript-interop
include all JavaScript snippets generated by <code>wasm-bindgen</code> for interfacing with JavaScript functionality.</p>
<p>By default, functions exported from Rust, using <code>wasm-bingen</code>, can be accessed in the JavaScript code through the global
variable <code>window.wasmBindings</code>. This behavior can be disabled, and the name can be customized. For more information
see the <a href="@/assets.html#rust"><code>rust</code> asset type</a>.</p>
see the <a href="../assets/index.html#rust"><code>rust</code> asset type</a>.</p>
<h2 id="order-of-initialization"><a class="header" href="#order-of-initialization">Order of initialization</a></h2>
<p>The bindings will only be available and working when the application initialization has been completed.</p>
<p>If your WebAssembly application renders code into the web page/DOM tree, which then calls from JavaScript into the
Expand Down
13 changes: 4 additions & 9 deletions guide/book.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ function playground_text(playground, hidden = true) {
var sidebar = document.getElementById("sidebar");
var sidebarLinks = document.querySelectorAll('#sidebar a');
var sidebarToggleButton = document.getElementById("sidebar-toggle");
var sidebarToggleAnchor = document.getElementById("sidebar-toggle-anchor");
var sidebarResizeHandle = document.getElementById("sidebar-resize-handle");
var firstContact = null;

Expand All @@ -475,22 +476,16 @@ function playground_text(playground, hidden = true) {
}

// Toggle sidebar
sidebarToggleButton.addEventListener('click', function sidebarToggle() {
if (body.classList.contains("sidebar-hidden")) {
sidebarToggleAnchor.addEventListener('change', function sidebarToggle() {
if (sidebarToggleAnchor.checked) {
var current_width = parseInt(
document.documentElement.style.getPropertyValue('--sidebar-width'), 10);
if (current_width < 150) {
document.documentElement.style.setProperty('--sidebar-width', '150px');
}
showSidebar();
} else if (body.classList.contains("sidebar-visible")) {
hideSidebar();
} else {
if (getComputedStyle(sidebar)['transform'] === 'none') {
hideSidebar();
} else {
showSidebar();
}
hideSidebar();
}
});

Expand Down
7 changes: 5 additions & 2 deletions guide/css/chrome.css
Original file line number Diff line number Diff line change
Expand Up @@ -421,11 +421,14 @@ ul#searchresults span.teaser em {
color: var(--sidebar-fg);
}
.sidebar-iframe-inner {
--padding: 10px;

background-color: var(--sidebar-bg);
color: var(--sidebar-fg);
padding: 10px 10px;
padding: var(--padding);
margin: 0;
font-size: 1.4rem;
color: var(--sidebar-fg);
min-height: calc(100vh - var(--padding) * 2);
}
.sidebar-iframe-outer {
border: none;
Expand Down
6 changes: 4 additions & 2 deletions guide/css/general.css
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,12 @@ sup {
line-height: 0;
}

:not(.footnote-definition) + .footnote-definition,
.footnote-definition + :not(.footnote-definition) {
:not(.footnote-definition) + .footnote-definition {
margin-block-start: 2em;
}
.footnote-definition:not(:has(+ .footnote-definition)) {
margin-block-end: 2em;
}
.footnote-definition {
font-size: 0.9em;
margin: 0.5em 0;
Expand Down
2 changes: 1 addition & 1 deletion guide/css/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
--content-max-width: 750px;
--menu-bar-height: 50px;
--mono-font: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace;
--code-font-size: 0.875em /* please adjust the ace font size accordingly in editor.js */
--code-font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */
}

/* Themes */
Expand Down
3 changes: 3 additions & 0 deletions guide/mdbook-admonish.css
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ details.admonition > summary.admonition-title::after {
details[open].admonition > summary.admonition-title::after {
transform: rotate(90deg);
}
summary.admonition-title::-webkit-details-marker {
display: none;
}

:root {
--md-details-icon: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42Z'/></svg>");
Expand Down
2 changes: 1 addition & 1 deletion guide/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ <h2 id="directives"><a class="header" href="#directives">Directives</a></h2>
include all JavaScript snippets generated by <code>wasm-bindgen</code> for interfacing with JavaScript functionality.</p>
<p>By default, functions exported from Rust, using <code>wasm-bingen</code>, can be accessed in the JavaScript code through the global
variable <code>window.wasmBindings</code>. This behavior can be disabled, and the name can be customized. For more information
see the <a href="advanced/@/assets.html#rust"><code>rust</code> asset type</a>.</p>
see the <a href="advanced/../assets/index.html#rust"><code>rust</code> asset type</a>.</p>
<h2 id="order-of-initialization"><a class="header" href="#order-of-initialization">Order of initialization</a></h2>
<p>The bindings will only be available and working when the application initialization has been completed.</p>
<p>If your WebAssembly application renders code into the web page/DOM tree, which then calls from JavaScript into the
Expand Down
2 changes: 1 addition & 1 deletion guide/toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class MDBookSidebarScrollbox extends HTMLElement {
connectedCallback() {
this.innerHTML = '<ol class="chapter"><li class="chapter-item expanded affix "><a href="introduction.html">Introduction</a></li><li class="chapter-item expanded affix "><li class="spacer"></li><li class="chapter-item expanded "><a href="getting-started/index.html"><strong aria-hidden="true">1.</strong> Getting started</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="getting-started/pre-reqs.html"><strong aria-hidden="true">1.1.</strong> Pre-requisites</a></li><li class="chapter-item expanded "><a href="getting-started/installation.html"><strong aria-hidden="true">1.2.</strong> Installation</a></li><li class="chapter-item expanded "><a href="getting-started/project.html"><strong aria-hidden="true">1.3.</strong> First project</a></li></ol></li><li class="chapter-item expanded "><a href="commands/index.html"><strong aria-hidden="true">2.</strong> Commands</a></li><li class="chapter-item expanded "><a href="configuration/index.html"><strong aria-hidden="true">3.</strong> Configuration</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="configuration/schema.html"><strong aria-hidden="true">3.1.</strong> Schema</a></li></ol></li><li class="chapter-item expanded "><a href="build/hooks.html"><strong aria-hidden="true">4.</strong> Hooks</a></li><li class="chapter-item expanded "><a href="assets/index.html"><strong aria-hidden="true">5.</strong> Assets</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="assets/minification.html"><strong aria-hidden="true">5.1.</strong> Minification</a></li><li class="chapter-item expanded "><a href="assets/sri.html"><strong aria-hidden="true">5.2.</strong> Sub-resource integrity</a></li></ol></li><li class="chapter-item expanded "><a href="advanced/index.html"><strong aria-hidden="true">6.</strong> Advanced</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="advanced/javascript_interop.html"><strong aria-hidden="true">6.1.</strong> JavaScript interoperability</a></li><li class="chapter-item expanded "><a href="advanced/startup_event.html"><strong aria-hidden="true">6.2.</strong> Startup event</a></li><li class="chapter-item expanded "><a href="advanced/initializer.html"><strong aria-hidden="true">6.3.</strong> Application initializer</a></li><li class="chapter-item expanded "><a href="advanced/library.html"><strong aria-hidden="true">6.4.</strong> Library crate</a></li><li class="chapter-item expanded "><a href="advanced/paths.html"><strong aria-hidden="true">6.5.</strong> Base URLs, public URLs, paths &amp; reverse proxies</a></li><li class="chapter-item expanded "><a href="advanced/proxy.html"><strong aria-hidden="true">6.6.</strong> Backend Proxy</a></li></ol></li><li class="chapter-item expanded "><li class="spacer"></li><li class="chapter-item expanded affix "><a href="contributing.html">Contributing</a></li></ol>';
// Set the current, active page, and reveal it if it's hidden
let current_page = document.location.href.toString();
let current_page = document.location.href.toString().split("#")[0];
if (current_page.endsWith("/")) {
current_page += "index.html";
}
Expand Down

0 comments on commit e46f577

Please sign in to comment.