You've already forked uutils.github.io
mirror of
https://github.com/uutils/uutils.github.io.git
synced 2026-06-10 16:12:28 -07:00
Fix id collision between commands placeholder and section heading
Zola auto-generates id="available-commands" on the "Available commands" <h2>. The placeholder <p> shared that id, so getElementById matched the heading first and the populate-from-WASM_COMMANDS script ended up overwriting the heading text — rendering the command list at h2 size. Rename the placeholder to a non-colliding id.
This commit is contained in:
@@ -37,7 +37,7 @@ template = "page.html"
|
|||||||
}
|
}
|
||||||
// Populate the "Available commands" list from the build-generated list
|
// Populate the "Available commands" list from the build-generated list
|
||||||
if (typeof WASM_COMMANDS !== "undefined" && Array.isArray(WASM_COMMANDS)) {
|
if (typeof WASM_COMMANDS !== "undefined" && Array.isArray(WASM_COMMANDS)) {
|
||||||
var listEl = document.getElementById("available-commands");
|
var listEl = document.getElementById("wasm-commands-list");
|
||||||
if (listEl) {
|
if (listEl) {
|
||||||
listEl.innerHTML = WASM_COMMANDS.slice().sort().map(function(c) {
|
listEl.innerHTML = WASM_COMMANDS.slice().sort().map(function(c) {
|
||||||
return "<code>" + c + "</code>";
|
return "<code>" + c + "</code>";
|
||||||
@@ -113,7 +113,7 @@ Multiple commands can be separated by newlines (`%0A` in the URL):
|
|||||||
|
|
||||||
The following commands run as **real Rust coreutils compiled to WebAssembly**:
|
The following commands run as **real Rust coreutils compiled to WebAssembly**:
|
||||||
|
|
||||||
<p id="available-commands">Loading the list of available commands…</p>
|
<p id="wasm-commands-list">Loading the list of available commands…</p>
|
||||||
|
|
||||||
The following are **shell builtins** implemented in JavaScript:
|
The following are **shell builtins** implemented in JavaScript:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user