Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for a new release #17

Merged
merged 6 commits into from
Mar 22, 2024
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
8 changes: 1 addition & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,4 @@ source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

# Manage our dependency on the version of the github-pages gem here.
gem "jekyll-v4-github-pages", "= 236"

# Explicitly include this gem here.
# It is not directly included in the github-pages gem list of dependencies,
# even though it is included in the original GitHub Pages build infrastructure.
gem "jekyll-include-cache", "= 0.2.1"
gem "jekyll-octicons", "~> 14.2"
gem "jekyll-v4-github-pages", "= 237"
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ inputs:
default: ${{ github.token }}
runs:
using: 'docker'
image: 'docker://ghcr.io/dunkmann00/jekyll-v4-build-pages:v2.1.2'
image: 'docker://ghcr.io/dunkmann00/jekyll-v4-build-pages:v2.2.0'
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<div class="container-lg px-3 my-5 markdown-body">

<h1><a href="https://github.com/pages/dunkmann00/jekyll-v4-build-pages/">jekyll-v4-build-pages</a></h1>


<p>Everything’s coming up Milhouse.</p>

Expand All @@ -51,7 +50,16 @@ <h1><a href="https://github.com/pages/dunkmann00/jekyll-v4-build-pages/">jekyll-
</div>

</div>
<template id=clipboard_template>
<div>
<clipboard-copy aria-label="Copy" class="btn btn-invisible m-2 p-0 tooltipped-no-delay d-flex flex-justify-center flex-items-center" tabindex="0" role="button">
<svg height="16" class="octicon octicon-copy" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg>
<svg height="16" class="octicon octicon-check color-fg-success d-none" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg>
</clipboard-copy>
</div>
</template>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
<script>anchors.add();</script>
<script type="module" src="/pages/dunkmann00/jekyll-v4-build-pages/assets/js/primer-clipboard-copy.js?v=JEKYLL_BUILD_REVISION"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion test_projects/future-false/_expected/assets/css/style.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });

// dist/clipboard.js
function createNode(text) {
const node = document.createElement("pre");
node.style.width = "1px";
node.style.height = "1px";
node.style.position = "fixed";
node.style.top = "5px";
node.textContent = text;
return node;
}
__name(createNode, "createNode");
function copyNode(node) {
if ("clipboard" in navigator) {
return navigator.clipboard.writeText(node.textContent || "");
}
const selection = getSelection();
if (selection == null) {
return Promise.reject(new Error());
}
selection.removeAllRanges();
const range = document.createRange();
range.selectNodeContents(node);
selection.addRange(range);
document.execCommand("copy");
selection.removeAllRanges();
return Promise.resolve();
}
__name(copyNode, "copyNode");
function copyText(text) {
if ("clipboard" in navigator) {
return navigator.clipboard.writeText(text);
}
const body = document.body;
if (!body) {
return Promise.reject(new Error());
}
const node = createNode(text);
body.appendChild(node);
copyNode(node);
body.removeChild(node);
return Promise.resolve();
}
__name(copyText, "copyText");

// dist/clipboard-copy-element.js
async function copy(button) {
const id = button.getAttribute("for");
const text = button.getAttribute("value");
function trigger() {
button.dispatchEvent(new CustomEvent("clipboard-copy", { bubbles: true }));
}
__name(trigger, "trigger");
if (button.getAttribute("aria-disabled") === "true") {
return;
}
if (text) {
await copyText(text);
trigger();
} else if (id) {
const root2 = "getRootNode" in Element.prototype ? button.getRootNode() : button.ownerDocument;
if (!(root2 instanceof Document || "ShadowRoot" in window && root2 instanceof ShadowRoot))
return;
const node = root2.getElementById(id);
if (node) {
await copyTarget(node);
trigger();
}
}
}
__name(copy, "copy");
function copyTarget(content) {
if (content instanceof HTMLInputElement || content instanceof HTMLTextAreaElement) {
return copyText(content.value);
} else if (content instanceof HTMLAnchorElement && content.hasAttribute("href")) {
return copyText(content.href);
} else {
return copyNode(content);
}
}
__name(copyTarget, "copyTarget");
function clicked(event) {
const button = event.currentTarget;
if (button instanceof HTMLElement) {
copy(button);
}
}
__name(clicked, "clicked");
function keydown(event) {
if (event.key === " " || event.key === "Enter") {
const button = event.currentTarget;
if (button instanceof HTMLElement) {
event.preventDefault();
copy(button);
}
}
}
__name(keydown, "keydown");
function focused(event) {
;
event.currentTarget.addEventListener("keydown", keydown);
}
__name(focused, "focused");
function blurred(event) {
;
event.currentTarget.removeEventListener("keydown", keydown);
}
__name(blurred, "blurred");
var ClipboardCopyElement = class extends HTMLElement {
static define(tag = "clipboard-copy", registry = customElements) {
registry.define(tag, this);
return this;
}
constructor() {
super();
this.addEventListener("click", clicked);
this.addEventListener("focus", focused);
this.addEventListener("blur", blurred);
}
connectedCallback() {
if (!this.hasAttribute("tabindex")) {
this.setAttribute("tabindex", "0");
}
if (!this.hasAttribute("role")) {
this.setAttribute("role", "button");
}
}
get value() {
return this.getAttribute("value") || "";
}
set value(text) {
this.setAttribute("value", text);
}
};
__name(ClipboardCopyElement, "ClipboardCopyElement");

// dist/clipboard-copy-element-define.js
var root = typeof globalThis !== "undefined" ? globalThis : window;
try {
root.ClipboardCopyElement = ClipboardCopyElement.define();
} catch (e) {
if (!(root.DOMException && e instanceof DOMException && e.name === "NotSupportedError") && !(e instanceof ReferenceError)) {
throw e;
}
}

// dist/index.js
var dist_default = ClipboardCopyElement;
export {
ClipboardCopyElement,
dist_default as default
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import './github-clipboard-copy-element.js';

function makeCopyButtons() {
const clipboardTemplate = document.getElementById("clipboard_template");

const blocks = document.querySelectorAll('div.highlighter-rouge>div.highlight');
blocks.forEach((block) => {
//Create DOM node
const clipboardNode = clipboardTemplate.content.cloneNode(true);
// Put this block's content into the clipboard-copy element's value
clipboardNode.querySelector("clipboard-copy").setAttribute("value", block.textContent);
// Add it in to the end of the html code block
block.appendChild(clipboardNode);
});
}

makeCopyButtons()

const CLIPBOARD_COPY_TIMER_DURATION = 2000;
function showSVG(svg) {
svg.classList.remove('d-none');
}
function hideSVG(svg) {
svg.classList.add('d-none');
}
function activateTooltip(button) {
button.classList.add("tooltipped");
button.classList.add("tooltipped-w");
button.setAttribute("aria-label", "Copied!");
}
function deactivateTooltip(button) {
button.classList.remove("tooltipped");
button.classList.remove("tooltipped-w");
button.setAttribute("aria-label", "Copy");
}
// Toggle a copy button.
function showCopy(button) {
const [copyIcon, checkIcon] = button.querySelectorAll('.octicon');
if (!copyIcon || !checkIcon)
return;
showSVG(copyIcon);
hideSVG(checkIcon);
}
// Toggle a copy button.
function showCheck(button) {
const [copyIcon, checkIcon] = button.querySelectorAll('.octicon');
if (!copyIcon || !checkIcon)
return;
hideSVG(copyIcon);
showSVG(checkIcon);
}
const clipboardCopyElementTimers = new WeakMap();
document.addEventListener('clipboard-copy', ({ target }) => {
if (!(target instanceof HTMLElement))
return;
const currentTimeout = clipboardCopyElementTimers.get(target);
if (currentTimeout) {
clearTimeout(currentTimeout);
clipboardCopyElementTimers.delete(target);
}
else {
showCheck(target);
activateTooltip(target);
}
clipboardCopyElementTimers.set(target, setTimeout(() => {
showCopy(target);
deactivateTooltip(target);
clipboardCopyElementTimers.delete(target);
}, CLIPBOARD_COPY_TIMER_DURATION));
});
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<div class="container-lg px-3 my-5 markdown-body">

<h1><a href="https://github.com/pages/dunkmann00/jekyll-v4-build-pages/">jekyll-v4-build-pages</a></h1>


<p>Everything’s coming up Milhouse.</p>

Expand All @@ -51,7 +50,16 @@ <h1><a href="https://github.com/pages/dunkmann00/jekyll-v4-build-pages/">jekyll-
</div>

</div>
<template id=clipboard_template>
<div>
<clipboard-copy aria-label="Copy" class="btn btn-invisible m-2 p-0 tooltipped-no-delay d-flex flex-justify-center flex-items-center" tabindex="0" role="button">
<svg height="16" class="octicon octicon-copy" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg>
<svg height="16" class="octicon octicon-check color-fg-success d-none" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg>
</clipboard-copy>
</div>
</template>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
<script>anchors.add();</script>
<script type="module" src="/pages/dunkmann00/jekyll-v4-build-pages/assets/js/primer-clipboard-copy.js?v=JEKYLL_BUILD_REVISION"></script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<div class="container-lg px-3 my-5 markdown-body">

<h1><a href="https://github.com/pages/dunkmann00/jekyll-v4-build-pages/">jekyll-v4-build-pages</a></h1>


<p>And it’s not even the cool hell that [redacted] are afraid of. 😭</p>

Expand All @@ -51,7 +50,16 @@ <h1><a href="https://github.com/pages/dunkmann00/jekyll-v4-build-pages/">jekyll-
</div>

</div>
<template id=clipboard_template>
<div>
<clipboard-copy aria-label="Copy" class="btn btn-invisible m-2 p-0 tooltipped-no-delay d-flex flex-justify-center flex-items-center" tabindex="0" role="button">
<svg height="16" class="octicon octicon-copy" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg>
<svg height="16" class="octicon octicon-check color-fg-success d-none" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg>
</clipboard-copy>
</div>
</template>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
<script>anchors.add();</script>
<script type="module" src="/pages/dunkmann00/jekyll-v4-build-pages/assets/js/primer-clipboard-copy.js?v=JEKYLL_BUILD_REVISION"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion test_projects/future-true/_expected/assets/css/style.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading
Loading