Compare commits

..

No commits in common. "6c22251374b7f6354498786bac6a11a1f3ab093e" and "d6957236a6efd858feacdce53a76da1b76b0c6fe" have entirely different histories.

5 changed files with 16 additions and 40 deletions

View file

@ -33,7 +33,6 @@ padding from the code block above.
pre.torchlight .line { pre.torchlight .line {
padding-left: 1rem; padding-left: 1rem;
padding-right: 1rem; padding-right: 1rem;
width: fit-content;
} }
/* /*
@ -41,9 +40,8 @@ Push the code away from the line numbers and
summary caret indicators. summary caret indicators.
*/ */
pre.torchlight .line-number, pre.torchlight .line-number,
pre.torchlight .summary-caret, pre.torchlight .summary-caret {
pre.torchlight .diff-indicator { margin-right: 1rem;
margin-right: 0.5rem;
} }
/********************************************* /*********************************************

View file

@ -18,11 +18,15 @@ document.querySelectorAll(".highlight").forEach((highlightDiv) => createCopyButt
async function copyCodeToClipboard(button, highlightDiv) { async function copyCodeToClipboard(button, highlightDiv) {
// capture all code lines in the selected block which aren't classed `nocopy` or `line-remove` // capture all code lines in the selected block which aren't classed `nocopy` or `line-remove`
let codeToCopy = highlightDiv.querySelectorAll(":last-child > .torchlight > code > .line:not(.nocopy, .line-remove)"); let codeToCopy = highlightDiv.querySelectorAll(":last-child > .torchlight > code > .line:not(.nocopy, .line-remove)");
// remove child elements with class `line-number` and `diff-indicator diff-indicator-add` // now remove the first-child of each line with class `line-number`
codeToCopy = Array.from(codeToCopy).reduce((accumulator, line) => { codeToCopy = Array.from(codeToCopy).reduce((accumulator, line) => {
if (line.firstChild.className != "line-number") {
return accumulator + line.innerText + "\n"; }
else {
return accumulator + Array.from(line.children).filter( return accumulator + Array.from(line.children).filter(
(child) => child.className != "line-number" && child.className != "diff-indicator diff-indicator-add" (child) => child.className != "line-number").reduce(
).reduce((accumulator, child) => accumulator + child.innerText, "") + "\n"; (accumulator, child) => accumulator + child.innerText, "") + "\n";
}
}, ""); }, "");
try { try {
var result = await navigator.permissions.query({ name: "clipboard-write" }); var result = await navigator.permissions.query({ name: "clipboard-write" });

View file

@ -1,25 +1,20 @@
--- ---
title: "/changelog" title: "/changelog"
date: "2024-05-26T21:19:08Z" date: "2024-05-26T21:19:08Z"
lastmod: "2024-06-21T03:20:04Z" lastmod: "2024-06-18T16:12:15Z"
description: "Maybe I should keep a log of all my site-related tinkering?" description: "Maybe I should keep a log of all my site-related tinkering?"
featured: false featured: false
toc: false toc: false
timeless: true timeless: true
categories: slashes categories: slashes
--- ---
*High-level list of config/layout changes to the site. The full changelog is of course [on GitHub](https://github.com/jbowdre/runtimeterror/commits/main/).* *High-level list of config/layout changes to the site.*
**2024-06-20:**
- Torchlight syntax highlighting tweaks:
- Fix for line highlights not including all content when overflowing
- Display diff indicators alongside line numbers
**2024-06-18:** **2024-06-18:**
- Swap back to [Cabin](https://withcabin.com) analytics - Swap back to [Cabin](https://withcabin.com) analytics
**2024-06-13:** **2024-06-13:**
- Add [Typo](https://neatnik.net/typo/) and a blinking cursor to the random error messages in the sidebar - Add [Typo](https://neatnik.net/typo/) and a blinking cursor to the random taglines in the sidebar
**2024-06-06:** **2024-06-06:**
- Migrate hosting from [Neocities to Bunny CDN](/further-down-the-bunny-hole/) - Migrate hosting from [Neocities to Bunny CDN](/further-down-the-bunny-hole/)
@ -38,30 +33,8 @@ categories: slashes
- Replace "powered by" links with slashpages - Replace "powered by" links with slashpages
**2024-05-26:** **2024-05-26:**
- Begin changelog *(earlier change dates extrapolated from posts)* - Begin changelog
- Simplify logic for displaying kudos and post reply buttons - Simplify logic for displaying kudos and post reply buttons
- Reduce gap for paragraphs followed by lists - Reduce gap for paragraphs followed by lists
**2024-04-30:** The full changelog is of course [on GitHub](https://github.com/jbowdre/runtimeterror/commits/main/).
- Implement [styling for RSS XML](/prettify-hugo-rss-feed-xslt/)
**2024-04-28:**
- Switch to [Berkeley Mono font face](/using-custom-font-hugo/)
**2024-02-19:**
- Dynamically generate [OG images](/dynamic-opengraph-images-with-hugo/)
**2024-01-21:**
- Migrate hosting from Netlify [to Neocities](/deploy-hugo-neocities-github-actions/)
**2023-11-09:**
- [Implement Torchlight](/spotlight-on-torchlight/) for syntax highlighting
**2023-09-13:**
- Rebrand from [virtuallypotato to runtimeterror](/virtuallypotato-runtimeterror/)
**2021-12-19:**
- Switch SSG from [Jekyll to Hugo](/hello-hugo/) and hosting from GitHub Pages to Netlify
**2021-07-20:**
- Migrate from [Hashnode to Jekyll on GitHub Page](/virtually-potato-migrated-to-github-pages/)

View file

@ -284,6 +284,7 @@ form button {
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
grid-gap: 0.5rem; grid-gap: 0.5rem;
margin: 0.5rem 0; margin: 0.5rem 0;
} }
.tagsArchive sup { .tagsArchive sup {

View file

@ -30,7 +30,7 @@ module.exports = {
// If there are any diff indicators for a line, put them // If there are any diff indicators for a line, put them
// in place of the line number to save horizontal space. // in place of the line number to save horizontal space.
diffIndicatorsInPlaceOfLineNumbers: false, diffIndicatorsInPlaceOfLineNumbers: true,
// When lines are collapsed, this is the text that will // When lines are collapsed, this is the text that will
// be shown to indicate that they can be expanded. // be shown to indicate that they can be expanded.