File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed
Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,12 @@ body {
1818 z-index : var (--z-index-navbar );
1919}
2020
21+ .navbar-main-title {
22+ white-space : nowrap;
23+ overflow : hidden;
24+ margin-right : 10px ;
25+ }
26+
2127.navbar a {
2228 text-decoration : none;
2329}
Original file line number Diff line number Diff line change 22 'use strict'
33
44 // Find the version the user is looking at and store it in a variable
5- var currentPageVersion = 'master'
6- var currentPageVersionObjects = document . querySelectorAll ( 'span.version' )
7- if ( currentPageVersionObjects && currentPageVersionObjects . length > 0 ) {
8- // In Antora 3.x websites, there's a <SPAN> object that shows the value of the current version
9- currentPageVersion = currentPageVersionObjects [ 0 ] . innerText
10- }
5+ // There's a <INPUT> object set in src/partials/header-content.hbs with the current version
6+ var currentPageVersionObject = document . getElementById ( 'search-page-version-filter' )
7+ var currentPageVersion = currentPageVersionObject . value
118
129 // Checks whether a string is empty, blank, null or undefined
1310 function isEmptyOrBlank ( str ) {
Original file line number Diff line number Diff line change 11<header class =" header" >
22 <nav class =" navbar" >
33 <div class =" navbar-brand" >
4- <div class =" navbar-item" >
4+ <div class =" navbar-item navbar-main-title " >
55 <div class =" k8up_logo" ></div >
66 <a href =" {{ or site.url (or siteRootUrl siteRootPath )}} " >{{ site.title }}
77 {{ #unless (eq page.componentVersion.displayVersion " master" )}}{{ #unless (eq page.layout ' 404' )}} –
1717 <div class =" navbar-end" >
1818 <div class =" navbar-item" >
1919 <div class =" search-field" >
20+ {{!-- This hidden INPUT object holds the currently displayed version of the documentation
21+ and is used by the search engine code in src/js/07-vshn-search.js to filter search results --}}
22+ <input id =" search-page-version-filter" type =" hidden" value =" {{ page.componentVersion.displayVersion }} " >
2023 <input id =" search-input" class =" search-input" type =" search" placeholder =" Search" >
2124 <button type =" submit" class =" search-button" >
2225 <i class =" fa fa-search" ></i >
3134 </div >
3235 </div >
3336 </nav >
34- </header >
37+ </header >
You can’t perform that action at this time.
0 commit comments