Skip to content

Commit 0b9f2f9

Browse files
Deploying to gh-pages from @ 5f061b5 🚀
1 parent f7d97c1 commit 0b9f2f9

494 files changed

Lines changed: 209785 additions & 622 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 108 additions & 123 deletions
Large diffs are not rendered by default.

de/assets/fonts/Cutive.woff2

31 KB
Binary file not shown.

de/assets/images/brutus-256.png

20.3 KB
Loading

de/assets/images/bumble-small.png

17.6 KB
Loading

de/assets/images/bumble.png

29 KB
Loading

de/assets/images/favicon.png

1.83 KB
Loading

de/assets/javascripts/bundle.79ae519e.min.js

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

de/assets/javascripts/bundle.79ae519e.min.js.map

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
const codeblocks = document.querySelectorAll("div.highlight pre code");
2+
3+
codeblocks.forEach((pre) => {
4+
const template = document.createElement("template");
5+
template.innerHTML = `
6+
<div class="copy-button">
7+
<svg class="copy-icon" viewBox="0 0 448 512">
8+
<path d="M208 0H332.1c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9V336c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V48c0-26.5 21.5-48 48-48zM48 128h80v64H64V448H256V416h64v48c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48z" />
9+
</svg>
10+
</div>
11+
`.replace(/^\s+/gm, '');
12+
const copyButton = template.content.firstElementChild;
13+
copyButton.addEventListener("click", handleCopyClick);
14+
pre.prepend(copyButton);
15+
});
16+
17+
// Excludes the button div, and the Pygments-tagged spans that are the console/doscon
18+
// shell prompt and the code output of a given command.
19+
const exclude = ["div.copy-button", "div.copy-button-copied", "span.gp", "span.go"]
20+
21+
function filterText(target, exclusions) {
22+
// Clone as to not modify the live DOM.
23+
const clone = target.cloneNode(true);
24+
clone.querySelectorAll(exclusions).forEach(node => node.remove());
25+
// The space between the venv name and the prompt is not tagged, so it is included
26+
// in the copied content. The newlines present in code output in codeblocks also
27+
// isn't tagged, and therefore is also included in the copied content. Managing
28+
// both of these issues is the purpose of the following.
29+
return clone.innerText.replace(/^ /gm, "").trim();
30+
}
31+
32+
function handleCopyClick(event) {
33+
// Target is walked back to the code tag.
34+
const code_node = event.target.parentElement.parentElement.parentElement
35+
navigator.clipboard.writeText(filterText(code_node, exclude));
36+
this.classList.add("copy-button-copied")
37+
this.classList.remove("copy-button")
38+
this.firstChild.textContent = "Copied!"
39+
setTimeout(() => {
40+
this.classList.remove("copy-button-copied")
41+
this.classList.add("copy-button")
42+
this.firstChild.textContent = ""
43+
}, 2000);
44+
}

de/assets/javascripts/lunr/min/lunr.ar.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)