]> git.draconx.ca Git - homepage.git/commitdiff
Add new rarpd-dx project.
authorNick Bowler <nbowler@draconx.ca>
Thu, 27 Jul 2023 05:47:33 +0000 (01:47 -0400)
committerNick Bowler <nbowler@draconx.ca>
Thu, 27 Jul 2023 05:47:33 +0000 (01:47 -0400)
If the iputils folks don't want to package this anymore, I guess I can.

.gitmodules
content/projects.md
content/projects/rarpd-dx.md [new file with mode: 0644]
content/style.scss
gitmodules/rarpd-dx [new submodule]
layouts/default.xsl

index 649ec896c13948ed5174542bfa8c94192713e9de..f24b460ec36277bc41598ea93e6d9ce69100bd7d 100644 (file)
@@ -7,3 +7,6 @@
 [submodule "gitmodules/rrace"]
        path = gitmodules/rrace
        url = https://git.draconx.ca/rrace.git
+[submodule "gitmodules/rarpd-dx"]
+       path = gitmodules/rarpd-dx
+       url = https://git.draconx.ca/rarpd-dx.git
index 90413c9153cd7d64d0c037543d4938ad1e11443d..8db0c429b9203360a652e6afb12c3efdbca05782 100644 (file)
@@ -4,6 +4,9 @@ copyright: 2019 Nick Bowler
 license: cc-by-nd-4.0
 ---
 
+*[RARP]: Reverse Address Resolution Protocol
+*[ARP]: Address Resolution Protocol
+
 Most of the operations here in the workshop are tracked on our local [git
 server](//git.draconx.ca) which can be browsed online.  All the work here is
 [free as in freedom](//www.gnu.org/philosophy/free-sw) which means you are
diff --git a/content/projects/rarpd-dx.md b/content/projects/rarpd-dx.md
new file mode 100644 (file)
index 0000000..ffaf19f
--- /dev/null
@@ -0,0 +1,12 @@
+---
+title: RARP Daemon
+copyright: 2023 Nick Bowler
+license: gpl-2 or (at your option) any later version
+module: rarpd-dx
+---
+
+*[RARP]: Reverse Address Resolution Protocol
+*[ARP]: Address Resolution Protocol
+
+<%= project_readme %>
+
index abc6c490348130834814e23e9baf7f6abc24f406..17aff0ba0352f3a0ccf5ab9117e82c2c6e27e11e 100644 (file)
@@ -67,6 +67,8 @@ h1 { @include header_size(60em, 2em); }
 h2 { @include header_size(60em, 1.5em); }
 h5 { @include header_size(60em, 1em); }
 
+h1, h2 { abbr { text-decoration: none; } }
+
 @supports (display: grid) {
     .gallery {
         display: grid;
@@ -226,8 +228,8 @@ table.cc {
     }
 }
 
-// CSS rules for stortable clicky table headers: Update the display of
-// the /table based on the current state.  Each column has its own set
+// CSS rules for sortable clicky table headers: Update the display of
+// the table based on the current state.  Each column has its own set
 // nearly-identical rules, only the class names differ.
 //
 // The clickytables.xsl stylesheet generates two inputs for each column.
diff --git a/gitmodules/rarpd-dx b/gitmodules/rarpd-dx
new file mode 160000 (submodule)
index 0000000..97a1829
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 97a182920cd28f822aa3fcdd74ace01cf7b0a495
index a9a75df6253bc68ecc0b0c80fb30b2395faab4a7..6bf809440ac0c07b8dd411158ac0551d994ede51 100644 (file)
   </xsl:copy>
 </xsl:template>
 
+<!--
+  Allow abbr to apply to document titles too, since these are generated
+  and kramdown's abbr support won't influence them. We do this by just
+  checking each word of the heading to see if is identical to an existing
+  abbr tag, and just substituting that in its place.
+  -->
+<xsl:key name='abbr' match='xhtml:abbr' use='string(.)' />
+<xsl:template name='insert-abbr' match='xhtml:h1/text()'>
+  <xsl:param name='string' select='normalize-space(.)' />
+
+  <xsl:variable name='head'
+    select='substring-before(concat($string, " "), " ")' />
+  <xsl:variable name='tail' select='substring-after($string, " ")' />
+  <xsl:variable name='match' select='key("abbr", $head)[1]' />
+
+  <xsl:choose>
+    <xsl:when test='$match'><xsl:apply-templates select='$match' /></xsl:when>
+    <xsl:otherwise><xsl:value-of select='$head' /></xsl:otherwise>
+  </xsl:choose>
+  <xsl:if test='$tail'>
+    <xsl:text> </xsl:text>
+    <xsl:call-template name='insert-abbr'>
+      <xsl:with-param name='string' select='$tail' />
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
 <!--
   Convert caption attribute on tables into proper caption elements, to allow
   a simple way to add captions to kramdown tables.