From: Lady Date: Sat, 27 May 2023 00:25:48 +0000 (-0700) Subject: Add links & icons; fix wrapping around code X-Git-Url: https://git.ladys.computer/Blog/commitdiff_plain/56a8fb540aeed84d256b88e310b713bc7e78281e?ds=sidebyside Add links & icons; fix wrapping around code --- diff --git a/#feed.rdf b/#feed.rdf index 94c1196..57c78e8 100644 --- a/#feed.rdf +++ b/#feed.rdf @@ -8,6 +8,8 @@ > Lady’s Weblog - + + + diff --git a/2023-04-30/hello_world/#entry.rdf b/2023-04-30/hello_world/#entry.rdf index a07c9db..6e21cfe 100644 --- a/2023-04-30/hello_world/#entry.rdf +++ b/2023-04-30/hello_world/#entry.rdf @@ -45,7 +45,9 @@ already have a feed reader, I use [NetNewsWire](https://netnewswire.com) on macOS and iOS. ]]> [Webmistress of Lady’s Computer]. +Copyright © 2023 +Lady +[Webmistress of Lady’s Computer]. Some rights reserved. This blogpost is licensed under a [Teddy Bear Appreciator]. Some -rights reserved. +Copyright © 2023 +Lady +[Teddy Bear Appreciator]. +Some rights reserved. This blogpost is licensed under a Creative diff --git a/2023-05-06/touch_grass/#entry.rdf b/2023-05-06/touch_grass/#entry.rdf index 129687e..8ca5827 100644 --- a/2023-05-06/touch_grass/#entry.rdf +++ b/2023-05-06/touch_grass/#entry.rdf @@ -358,7 +358,9 @@ which could be as easy as typing a few words on a command line. Don’t let this be you! Do the easy thing! `make sync`! ]]> [Exquisite Grass‐Toucher]. +Copyright © 2023 +Lady +[Exquisite Grass‐Toucher]. Some rights reserved. This blogpost is licensed under a [Fannish Metadata Nerd]. +Copyright © 2023 +Lady +[Fannish Metadata Nerd]. Some rights reserved. This blogpost is licensed under a "This Week in Fandom: Volume 149" ]]> [Aspirational Fannish Organizer]. +Copyright © 2023 +Lady +[Aspirational Fannish Organizer]. Some rights reserved. This blogpost is licensed under a ` element; wrap it in a `Word-Wrap: Pre` with + // any previous/next characters to prevent line‐breaking due to + // it being rendered as an inline block. + const prev = node.previousSibling; + const prevText = prev?.nodeType == 3 ? prev.textContent : ""; + const prevWrap = prevText.match(/\S*$/u)[0]; + const next = node.nextSibling; + const nextText = next?.nodeType == 3 ? next.textContent : ""; + const nextWrap = nextText.match(/^\S*/u)[0]; + if (prevWrap || nextWrap) { + const span = LMN.span.style("White-Space: Pre")``; + node.parentNode.replaceChild(span, node); + if (prevWrap) { + prev.parentNode.replaceChild( + document.createTextNode( + prevText.substring(0, prevText.length - prevWrap.length), + ), + prev, + ); + span.appendChild( + document.createTextNode( + prevText.substring(prevText.length - prevWrap.length), + ), + ); + } + span.appendChild(node); + if (nextWrap) { + const nexts = [ + document.createTextNode( + nextText.substring(0, nextWrap.length), + ), + document.createTextNode( + nextText.substring(nextWrap.length), + ), + ]; + span.appendChild(nexts[0]); + next.parentNode.replaceChild(nexts[1], next); + for (const nextNode of nexts) { + applyTransforms.call(this, nextNode); + } + } + } + } Array.from(node.childNodes).forEach(applyTransforms.bind(this)); } else if (node.nodeType == 3) { // This is a text node; apply replacements. @@ -110,5 +156,5 @@ globalThis.bjørnTransformEntryHTML = (document, metadata) => { }; await import( - "https://git.ladys.computer/Beorn/blob_plain/0.2.3:/build.js" + "https://git.ladys.computer/Beorn/blob_plain/0.2.4:/build.js" ); diff --git a/style.css b/style.css index 114dbc5..9946962 100644 --- a/style.css +++ b/style.css @@ -18,6 +18,8 @@ nav li[resource] [rel="http://purl.org/dc/elements/1.1/creator"]:Last-Child::aft #entry\.author{ Margin-Block-End: 0; Margin-Inline: -1CH; Border: Thin #700020 Solid; Padding-Inline: 1CH; Color: #000000; Background: #D6B7BF; Box-Shadow: -2PX -2PX #992244, -4PX -4PX #B38A96; Font-Style: Italic } #entry\.author::before{ Content: "A blogpost by " } #entry\.author::after{ Content: "." } +#entry\.author :Any-Link{ Color: Inherit } +#entry\.author [property="http://xmlns.com/foaf/0.1/name"]{ Font-Weight: Bold } #entry\.published,main>article #entry\.updated,nav li[resource] time[property="http://purl.org/dc/elements/1.1/date"]{ Position: Absolute; Inset-Block: -1REM Auto; Inset-Inline: 2CH Auto; Margin: 0; Border-Style: Solid; Border-Block-Color: #E7BD51 #9DFF9D; Border-Inline-Color: #E7BD51 #9DFF9D; Border-Width: 1PX; Padding-Inline: 1CH; Inline-Size: Max-Content; Max-Inline-Size: 80%; Color: #001B5F; Background: #F0E3C0; Box-Shadow: 0 0 0 1PX #8F6600, Inset 0 0 0 1PX #8F6600, -1CH 0 0 1PX #0040E1; Opacity: Calc(23 / 24) } main>article #entry\.updated{ Inset-Block: Auto -1REM; Inset-Inline: Auto 2CH; Border-Block-Color: #9DFF9D #E7BD51; Border-Inline-Color: #9DFF9D #E7BD51 } nav li[resource] time[property="http://purl.org/dc/elements/1.1/date"]::before{ Content: "Published: " } @@ -41,8 +43,8 @@ figure>:First-Child:Nth-Last-Child(2){ Margin-Block-Start: 0; Margin-Block-End: figcaption{ Margin-Block: .5EM 0; Margin-Inline: Auto; Border-Block-Start: Thin Solid; Padding-Block-Start: .25EM; Padding-Inline: 2CH; Max-Inline-Size: Max-Content; Color: #97596B; Font-Size: Smaller; Font-Style: Italic; Text-Align: Center } ol{ List-Style-Type: Decimal; List-Style-Type: Dotnum } pre{ Margin-Block: .5EM; Overflow-X: Auto; Font: Inherit } -code{ Display: Inline-Block; Border: Thin Solid; Border-Radius: .25CH; Padding-Inline: .5CH; Color: /* to match the Shades of Purple theme */ #2D2B57; Background: /* to match the Shades of Purple theme */ #E3DFFF; Font-Size: .75REM; Font-Family: /* to match the Shades of Purple theme */ 'Operator Mono', 'Fira Code', 'Menlo', 'Monaco', 'Courier New', 'monospace'; Line-Height: /* to match the Shades of Purple theme */ 1.45 } -pre>code,pre>code.hljs{ Display: Block; Border: /* to match the Shades of Purple theme */ #2D2B57 Outset; Padding-Block: 1EM; Padding-Inline: 2CH; Color: /* to match the Shades of Purple theme */ #E3DFFF; Background: /* to match the Shades of Purple theme */ #2D2B57; Font-Size: .75REM } +code{ Display: Inline-Block; Box-Sizing: Border-Box; Border: Thin Solid; Border-Radius: .25CH; Padding-Inline: .5CH; Max-Inline-Size: 100%; Overflow-Wrap: Break-Word; Color: /* to match the Shades of Purple theme */ #2D2B57; Background: /* to match the Shades of Purple theme */ #E3DFFF; Font-Size: .75REM; Font-Family: /* to match the Shades of Purple theme */ 'Operator Mono', 'Fira Code', 'Menlo', 'Monaco', 'Courier New', 'monospace'; Line-Height: /* to match the Shades of Purple theme */ 1.45; White-Space: Pre-Wrap } +pre>code,pre>code.hljs{ Display: Block; Border: /* to match the Shades of Purple theme */ #2D2B57 Outset; Padding-Block: 1EM; Padding-Inline: 2CH; Overflow-X: Auto; Color: /* to match the Shades of Purple theme */ #E3DFFF; Background: /* to match the Shades of Purple theme */ #2D2B57; Font-Size: .75REM; White-Space: Pre } p{ Margin-Block: .5EM } :Any-Link{ Color: #3AE6B5 } :Any-Link code{ Text-Decoration: Underline }