From d34c6d9d75b6849c0642b8eb3f7172c6eae59e4b Mon Sep 17 00:00:00 2001 From: rdrew Date: Fri, 10 Oct 2025 11:28:14 -0300 Subject: [PATCH] added icon --- css/mobile_facets.css | 8 +++++--- js/mobile_facets.js | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/css/mobile_facets.css b/css/mobile_facets.css index bec8836..efed2d2 100755 --- a/css/mobile_facets.css +++ b/css/mobile_facets.css @@ -15,16 +15,18 @@ } #toggle-facets { background-color: var(--color--bdh-red); - transition: filter 0.2s ease; /* Optional: smooth transition */ - font-size:1em; + transition: filter 0.2s ease; + font-size: 1em; color: white; border: none; padding: 10px 15px; border-radius: 4px; cursor: pointer; - /*temp*/ display: block; width: 100%; + display: flex; + justify-content: center; + align-items: center; &:hover { filter: brightness(1.5); /* Lightens by 10% */ } diff --git a/js/mobile_facets.js b/js/mobile_facets.js index f73bbc2..059ce74 100755 --- a/js/mobile_facets.js +++ b/js/mobile_facets.js @@ -1,5 +1,6 @@ (function (Drupal) { // Select the parent container const sidebar = document.querySelector('.region--sidebar'); // Check if the element exists + const buttonText = ' Search the Collection' if (sidebar) { // Get all direct children const children = Array.from(sidebar.children);// Create the wrapper div @@ -22,7 +23,8 @@ // Create the button element const button = document.createElement('button'); button.id = 'toggle-facets'; - button.textContent = 'Search the Collection'; + //button.textContent = 'Search the Collection'; + button.innerHtml = buttonText; // Insert the button before the wrapper sidebar.insertBefore(button, wrapper);