« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/content/dependencies/generateTrackInfoPageOtherReleaseTooltip.js13
-rw-r--r--src/static/css/site.css8
2 files changed, 15 insertions, 6 deletions
diff --git a/src/content/dependencies/generateTrackInfoPageOtherReleaseTooltip.js b/src/content/dependencies/generateTrackInfoPageOtherReleaseTooltip.js
index 92ab52ba..fcb2e2fa 100644
--- a/src/content/dependencies/generateTrackInfoPageOtherReleaseTooltip.js
+++ b/src/content/dependencies/generateTrackInfoPageOtherReleaseTooltip.js
@@ -43,11 +43,12 @@ export default {
           }),
 
           data.otherDate && data.currentDate &&
-            language.formatRelativeDate(data.otherDate, data.currentDate, {
-              considerRoundingDays: true,
-              approximate: true,
-              absolute: false,
-            }),
+            html.tag('span', {class: 'when'},
+              language.formatRelativeDate(data.otherDate, data.currentDate, {
+                considerRoundingDays: true,
+                approximate: true,
+                absolute: false,
+              })),
         ],
       })),
-};
\ No newline at end of file
+};
diff --git a/src/static/css/site.css b/src/static/css/site.css
index 9cfa4417..765ec87d 100644
--- a/src/static/css/site.css
+++ b/src/static/css/site.css
@@ -1518,6 +1518,14 @@ label > input[type=checkbox]:not(:checked) + span {
   font-size: 0.9em;
 }
 
+.other-release-tooltip .tooltip-content .when {
+  /* technically just putting this in a <span> was enough
+   * to keep it from wrapping all tight-like, for some
+   * reason, but im not taking any chances...
+   */
+  white-space: nowrap;
+}
+
 .rerelease-tooltip .not-credited-on-first-release {
   opacity: 0.9;
 }