]> Lady’s Gitweb - GitWikiWeb/commitdiff
Don’t show date on old recent changes 0.1.1
authorLady <redacted>
Fri, 28 Jul 2023 05:09:21 +0000 (22:09 -0700)
committerLady <redacted>
Fri, 28 Jul 2023 05:09:21 +0000 (22:09 -0700)
If `recency` is `0`, then we don’t actually know when the change was
  made; this is a grab‐bag for everything else within the past week.

build.js

index 8eab7f426f0b6922e5839785e01108141e9b470e..5c8bd39c54f317780bcab94f79a2f4f0f56d45c1 100644 (file)
--- a/build.js
+++ b/build.js
@@ -707,14 +707,16 @@ class GitWikiWebPage {
                             refs,
                           } = result;
                           yield* listOfInternalLinks(refs, (link) => ({
-                            tag: index ? "strong" : "span",
+                            tag: index == 0 ? "span" : "strong",
                             attributes: { "data-recency": `${index}` },
                             children: [
                               link,
-                              str` `,
-                              rawInline`<small>(<time dateTime="${dateTime}">`,
-                              str`${humanReadable}`,
-                              rawInline`</time>)</small>`,
+                              ...(index == 0 ? [] : [
+                                str` `,
+                                rawInline`<small>(<time dateTime="${dateTime}">`,
+                                str`${humanReadable}`,
+                                rawInline`</time>)</small>`,
+                              ]),
                             ],
                           })).children;
                         } else {
This page took 0.052962 seconds and 4 git commands to generate.