« get me outta code hell

data, content, css: Artwork.fileNotes - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-05-31 12:01:15 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-05-31 12:01:15 -0300
commit5b01333cb6bb98842cb5745a4e587d6e7ad7fb9b (patch)
tree005e57ea01f9bbfb35302f0868438e29f6bf957d
parent922b6cd3579abdfc99c479c01f1826b06cd7c712 (diff)
data, content, css: Artwork.fileNotes
-rw-r--r--src/content/dependencies/generateCoverArtworkOriginDetails.js13
-rw-r--r--src/data/things/Artwork.js2
-rw-r--r--src/static/css/features.css7
3 files changed, 17 insertions, 5 deletions
diff --git a/src/content/dependencies/generateCoverArtworkOriginDetails.js b/src/content/dependencies/generateCoverArtworkOriginDetails.js
index c8f51368..7aaa0159 100644
--- a/src/content/dependencies/generateCoverArtworkOriginDetails.js
+++ b/src/content/dependencies/generateCoverArtworkOriginDetails.js
@@ -18,6 +18,9 @@ export default {
     originDetails:
       relation('transformContent', artwork.originDetails),
 
+    fileNotes:
+      relation('transformContent', artwork.fileNotes),
+
     albumLink:
       (artwork.thing.isAlbum
         ? relation('linkAlbum', artwork.thing)
@@ -146,6 +149,15 @@ export default {
                 absorbPunctuationFollowingExternalLinks: false,
               }));
 
+          const fileNotesLine =
+            html.tag('span', {class: 'file-notes-line'},
+              {[html.onlyIfContent]: true},
+
+              relations.fileNotes.slots({
+                mode: 'inline',
+                absorbPunctuationFollowingExternalLinks: false,
+              }));
+
           const filenameLine =
             html.tag('span', {class: 'filename-line'},
               {[html.onlyIfContent]: true},
@@ -165,6 +177,7 @@ export default {
             ], {[html.joinChildren]: html.tag('br')}),
 
             originDetailsLine,
+            fileNotesLine,
             filenameLine,
           ];
         })())),
diff --git a/src/data/things/Artwork.js b/src/data/things/Artwork.js
index d2bd31ba..40f42c5a 100644
--- a/src/data/things/Artwork.js
+++ b/src/data/things/Artwork.js
@@ -89,6 +89,7 @@ export class Artwork extends Thing {
     label: simpleString(),
     source: contentString(),
     originDetails: contentString(),
+    fileNotes: contentString(),
     showFilename: simpleString(),
 
     dateFromThingProperty: simpleString(),
@@ -319,6 +320,7 @@ export class Artwork extends Thing {
       'Label': {property: 'label'},
       'Source': {property: 'source'},
       'Origin Details': {property: 'originDetails'},
+      'File Notes': {property: 'fileNotes'},
       'Show Filename': {property: 'showFilename'},
 
       'Date': {
diff --git a/src/static/css/features.css b/src/static/css/features.css
index 6307da30..f5842704 100644
--- a/src/static/css/features.css
+++ b/src/static/css/features.css
@@ -754,11 +754,8 @@
     margin-bottom: 2px;
   }
 
-  p.image-details.origin-details .origin-details-line {
-    display: block;
-    margin-top: 0.25em;
-  }
-
+  p.image-details.origin-details .origin-details-line,
+  p.image-details.origin-details .file-notes-line,
   p.image-details.origin-details .filename-line {
     display: block;
     margin-top: 0.25em;