]> Lady’s Gitweb - Blog/commitdiff
Add links & icons; fix wrapping around code
authorLady <redacted>
Sat, 27 May 2023 00:25:48 +0000 (17:25 -0700)
committerLady <redacted>
Sat, 27 May 2023 00:25:48 +0000 (17:25 -0700)
#feed.rdf
2023-04-30/hello_world/#entry.rdf
2023-05-03/blog_highlight/#entry.rdf
2023-05-06/touch_grass/#entry.rdf
2023-05-09/fannish_metadata/#entry.rdf
2023-05-14/end_otw_racism/#entry.rdf
build.js
style.css

index 94c1196619e35b913406e5b83eb9f6e47683519a..57c78e80190e05e9424ca88b086dfc90466020a1 100644 (file)
--- a/#feed.rdf
+++ b/#feed.rdf
@@ -8,6 +8,8 @@
 >
        <dc11:title>Lady’s Weblog</dc11:title>
        <dc11:creator>
 >
        <dc11:title>Lady’s Weblog</dc11:title>
        <dc11:creator>
-               <foaf:Person foaf:name="Lady"/>
+               <foaf:Person rdf:about="https://www.ladys.computer/about/#lady" foaf:name="Lady"/>
        </dc11:creator>
        </dc11:creator>
+       <awol:icon rdf:resource="https://www.ladys.computer/media/icon.png"/>
+       <awol:logo rdf:resource="https://www.ladys.computer/media/logo.png"/>
 </awol:Feed>
 </awol:Feed>
index a07c9dbb934c30401e4f88d4f36b065e7d462fd5..6e21cfecc82ffbcddf634afecc83d77d02b2bdf8 100644 (file)
@@ -45,7 +45,9 @@ already have a feed reader, I use
 [NetNewsWire](https://netnewswire.com) on macOS and iOS.
 ]]></sioc:content>
        <dc11:rights rdf:parseType="Markdown"><![CDATA[
 [NetNewsWire](https://netnewswire.com) on macOS and iOS.
 ]]></sioc:content>
        <dc11:rights rdf:parseType="Markdown"><![CDATA[
-Copyright © 2023 Lady <small>[Webmistress of Lady’s Computer]</small>.
+Copyright © 2023
+<a href="https://www.ladys.computer/about/#lady">Lady</a>
+<small>[Webmistress of Lady’s Computer]</small>.
 Some rights reserved.
 
 This blogpost is licensed under a <a rel="license"
 Some rights reserved.
 
 This blogpost is licensed under a <a rel="license"
index fe14544fb961b2a6878cb6b675a3379ea8c6099a..16c8991be3f755e5f12a0503aa088ff30a022a87 100644 (file)
@@ -97,8 +97,10 @@ bullshit than a lot of the other themes on the highlight.js website;
 ideally at some point I will replace it with a theme of my own.
 ]]></sioc:content>
        <dc11:rights rdf:parseType="Markdown"><![CDATA[
 ideally at some point I will replace it with a theme of my own.
 ]]></sioc:content>
        <dc11:rights rdf:parseType="Markdown"><![CDATA[
-Copyright © 2023 Lady <small>[Teddy Bear Appreciator]</small>. Some
-rights reserved.
+Copyright © 2023
+<a href="https://www.ladys.computer/about/#lady">Lady</a>
+<small>[Teddy Bear Appreciator]</small>.
+Some rights reserved.
 
 This blogpost is licensed under a <a rel="license"
 href="http://creativecommons.org/licenses/by/4.0/"><cite>Creative
 
 This blogpost is licensed under a <a rel="license"
 href="http://creativecommons.org/licenses/by/4.0/"><cite>Creative
index 129687e2c930685c66240a2f1b6c75ed313a4a98..8ca5827327a315e2218d714020254572cfc00486 100644 (file)
@@ -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`!
 ]]></sioc:content>
        <dc11:rights rdf:parseType="Markdown"><![CDATA[
 Don’t let this be you! Do the easy thing! `make sync`!
 ]]></sioc:content>
        <dc11:rights rdf:parseType="Markdown"><![CDATA[
-Copyright © 2023 Lady <small>[Exquisite Grass‐Toucher]</small>.
+Copyright © 2023
+<a href="https://www.ladys.computer/about/#lady">Lady</a>
+<small>[Exquisite Grass‐Toucher]</small>.
 Some rights reserved.
 
 This blogpost is licensed under a <a rel="license"
 Some rights reserved.
 
 This blogpost is licensed under a <a rel="license"
index f7907ccb1bd7fec91c09fa3a808c8785ff04a4ec..89fdd49ca640531e20877063cceadb4111ec374e 100644 (file)
@@ -155,7 +155,9 @@ ideas which came as I was writing this post.
   case, a mirrored version **must not** be used.
 ]]></sioc:content>
        <dc11:rights rdf:parseType="Markdown"><![CDATA[
   case, a mirrored version **must not** be used.
 ]]></sioc:content>
        <dc11:rights rdf:parseType="Markdown"><![CDATA[
-Copyright © 2023 Lady <small>[Fannish Metadata Nerd]</small>.
+Copyright © 2023
+<a href="https://www.ladys.computer/about/#lady">Lady</a>
+<small>[Fannish Metadata Nerd]</small>.
 Some rights reserved.
 
 This blogpost is licensed under a <a rel="license"
 Some rights reserved.
 
 This blogpost is licensed under a <a rel="license"
index 1b772696996ddc2e1ce9f7884c3d881a0a4de18d..139e9104936fa19fc48e1537cf91c233ad2edf79 100644 (file)
@@ -288,7 +288,9 @@ solidarity._**
 [TWIF-149]: <https://web.archive.org/web/20200610165006/https://www.transformativeworks.org/this-week-in-fandom-volume-149/> "This Week in Fandom: Volume 149"
 ]]></sioc:content>
        <dc11:rights rdf:parseType="Markdown"><![CDATA[
 [TWIF-149]: <https://web.archive.org/web/20200610165006/https://www.transformativeworks.org/this-week-in-fandom-volume-149/> "This Week in Fandom: Volume 149"
 ]]></sioc:content>
        <dc11:rights rdf:parseType="Markdown"><![CDATA[
-Copyright © 2023 Lady <small>[Aspirational Fannish Organizer]</small>.
+Copyright © 2023
+<a href="https://www.ladys.computer/about/#lady">Lady</a>
+<small>[Aspirational Fannish Organizer]</small>.
 Some rights reserved.
 
 This blogpost is licensed under a <a rel="license"
 Some rights reserved.
 
 This blogpost is licensed under a <a rel="license"
index 0260323ec3afd2aa253c5c0a15d500b75594340a..be96bcdb52dc0407f61212ae80a8a35085a4a0e2 100755 (executable)
--- a/build.js
+++ b/build.js
@@ -26,6 +26,8 @@ const processContent = function (content) {
 };
 
 const applyTransforms = function (node) {
 };
 
 const applyTransforms = function (node) {
+  const document = node.ownerDocument;
+  const LMN = Lemon.bind(document);
   if (
     node.localName == "pre" && node.childNodes.length == 1 &&
     node.firstChild.localName == "code"
   if (
     node.localName == "pre" && node.childNodes.length == 1 &&
     node.firstChild.localName == "code"
@@ -66,6 +68,50 @@ const applyTransforms = function (node) {
   }
   if (node.nodeType == 1) {
     // This is an element; process its children.
   }
   if (node.nodeType == 1) {
     // This is an element; process its children.
+    if (node.localName == "code") {
+      // This is a `<code>` 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.
     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(
 };
 
 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"
 );
 );
index 114dbc51718e436e3bf1cf6f27455f7328568ee1..99469626feefd981d99f8614f3b022b715ab2993 100644 (file)
--- 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{ 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: " }
 #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 }
 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 }
 p{ Margin-Block: .5EM }
 :Any-Link{ Color: #3AE6B5 }
 :Any-Link code{ Text-Decoration: Underline }
This page took 0.034596 seconds and 4 git commands to generate.