diff --git a/assets/css/torchlight.css b/assets/css/torchlight.css index f9ce18b..5def64b 100644 --- a/assets/css/torchlight.css +++ b/assets/css/torchlight.css @@ -41,8 +41,9 @@ Push the code away from the line numbers and summary caret indicators. */ pre.torchlight .line-number, -pre.torchlight .summary-caret { - margin-right: 1rem; +pre.torchlight .summary-caret, +pre.torchlight .diff-indicator { + margin-right: 0.5rem; } /********************************************* diff --git a/assets/js/code-copy-button.js b/assets/js/code-copy-button.js index 80ae37c..3da5f47 100644 --- a/assets/js/code-copy-button.js +++ b/assets/js/code-copy-button.js @@ -18,15 +18,11 @@ document.querySelectorAll(".highlight").forEach((highlightDiv) => createCopyButt async function copyCodeToClipboard(button, highlightDiv) { // 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)"); - // now remove the first-child of each line with class `line-number` + // remove child elements with class `line-number` and `diff-indicator diff-indicator-add` 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( - (child) => child.className != "line-number").reduce( - (accumulator, child) => accumulator + child.innerText, "") + "\n"; - } + (child) => child.className != "line-number" && child.className != "diff-indicator diff-indicator-add" + ).reduce((accumulator, child) => accumulator + child.innerText, "") + "\n"; }, ""); try { var result = await navigator.permissions.query({ name: "clipboard-write" }); diff --git a/content/changelog.md b/content/changelog.md index 8e397a1..5981c42 100644 --- a/content/changelog.md +++ b/content/changelog.md @@ -1,20 +1,25 @@ --- title: "/changelog" date: "2024-05-26T21:19:08Z" -lastmod: "2024-06-18T16:12:15Z" +lastmod: "2024-06-21T03:20:04Z" description: "Maybe I should keep a log of all my site-related tinkering?" featured: false toc: false timeless: true categories: slashes --- -*High-level list of config/layout changes to the site.* +*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/).* + +**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:** - Swap back to [Cabin](https://withcabin.com) analytics **2024-06-13:** -- Add [Typo](https://neatnik.net/typo/) and a blinking cursor to the random taglines in the sidebar +- Add [Typo](https://neatnik.net/typo/) and a blinking cursor to the random error messages in the sidebar **2024-06-06:** - Migrate hosting from [Neocities to Bunny CDN](/further-down-the-bunny-hole/) @@ -33,8 +38,30 @@ categories: slashes - Replace "powered by" links with slashpages **2024-05-26:** -- Begin changelog +- Begin changelog *(earlier change dates extrapolated from posts)* - Simplify logic for displaying kudos and post reply buttons - Reduce gap for paragraphs followed by lists -The full changelog is of course [on GitHub](https://github.com/jbowdre/runtimeterror/commits/main/). \ No newline at end of file +**2024-04-30:** +- 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/) \ No newline at end of file diff --git a/torchlight.config.js b/torchlight.config.js index abdbd00..bc799f9 100644 --- a/torchlight.config.js +++ b/torchlight.config.js @@ -30,7 +30,7 @@ module.exports = { // If there are any diff indicators for a line, put them // in place of the line number to save horizontal space. - diffIndicatorsInPlaceOfLineNumbers: true, + diffIndicatorsInPlaceOfLineNumbers: false, // When lines are collapsed, this is the text that will // be shown to indicate that they can be expanded.