diff --git a/src/css/header.css b/src/css/header.css index d0fd0e9..7f0227e 100644 --- a/src/css/header.css +++ b/src/css/header.css @@ -18,6 +18,12 @@ body { z-index: var(--z-index-navbar); } +.navbar-main-title { + white-space: nowrap; + overflow: hidden; + margin-right: 10px; +} + .navbar a { text-decoration: none; } diff --git a/src/js/07-vshn-search.js b/src/js/07-vshn-search.js index 168ce82..43b7001 100644 --- a/src/js/07-vshn-search.js +++ b/src/js/07-vshn-search.js @@ -2,12 +2,9 @@ 'use strict' // Find the version the user is looking at and store it in a variable - var currentPageVersion = 'master' - var currentPageVersionObjects = document.querySelectorAll('span.version') - if (currentPageVersionObjects && currentPageVersionObjects.length > 0) { - // In Antora 3.x websites, there's a object that shows the value of the current version - currentPageVersion = currentPageVersionObjects[0].innerText - } + // There's a object set in src/partials/header-content.hbs with the current version + var currentPageVersionObject = document.getElementById('search-page-version-filter') + var currentPageVersion = currentPageVersionObject.value // Checks whether a string is empty, blank, null or undefined function isEmptyOrBlank (str) { diff --git a/src/partials/header-content.hbs b/src/partials/header-content.hbs index 044d4cf..fff3517 100644 --- a/src/partials/header-content.hbs +++ b/src/partials/header-content.hbs @@ -1,7 +1,7 @@
-
\ No newline at end of file +