« get me outta code hell

content, client: "no results" message - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateSearchSidebarBox.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-05-06 17:23:36 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-31 12:11:50 -0300
commitc760d9400cf02e830c33749eed3894165b760432 (patch)
tree88a76ae9fc771d51a876399d1f0710d4b847a9ca /src/content/dependencies/generateSearchSidebarBox.js
parentd03045c466da83f96d079eb2552f25984d7c3364 (diff)
content, client: "no results" message
Diffstat (limited to 'src/content/dependencies/generateSearchSidebarBox.js')
-rw-r--r--src/content/dependencies/generateSearchSidebarBox.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/content/dependencies/generateSearchSidebarBox.js b/src/content/dependencies/generateSearchSidebarBox.js
index 6632a4e8..d4d6b4e0 100644
--- a/src/content/dependencies/generateSearchSidebarBox.js
+++ b/src/content/dependencies/generateSearchSidebarBox.js
@@ -1,21 +1,27 @@
 export default {
   contentDependencies: ['generatePageSidebarBox'],
-  extraDependencies: ['html'],
+  extraDependencies: ['html', 'language'],
 
   relations: (relation) => ({
     sidebarBox:
       relation('generatePageSidebarBox'),
   }),
 
-  generate: (relations, {html}) =>
+  generate: (relations, {html, language}) =>
     relations.sidebarBox.slots({
       attributes: {class: 'wiki-search-sidebar-box'},
       collapsible: false,
 
       content: [
         html.tag('input', {class: 'wiki-search-input'},
-          {placeholder: `Search for anything`},
-          {type: 'search'})
+          {
+            placeholder:
+              language.$('misc.search.placeholder').toString(),
+          },
+          {type: 'search'}),
+
+        html.tag('template', {class: 'wiki-search-no-results-string'},
+          language.$('misc.search.noResults')),
       ],
     }),
 };