From: Dan Allen Date: Fri, 17 Dec 2021 22:23:05 +0000 (-0700) Subject: add search input behind a flag X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=279fedaf7a2bcb456d244da2efb7c4e7005a8407;p=working%2Feg-antora.git add search input behind a flag - revise CSS to accomodate search input - show search input if SITE_SEARCH_ENABLED env var is set - remove Resources item in navbar --- diff --git a/src/css/header.css b/src/css/header.css index 6044296..3914010 100644 --- a/src/css/header.css +++ b/src/css/header.css @@ -23,6 +23,7 @@ body { .navbar-brand { display: flex; + flex: auto; padding-left: 1rem; } @@ -44,6 +45,22 @@ body { padding-right: 0.375rem; } +.navbar-brand .navbar-item.search { + flex: auto; + justify-content: flex-end; +} + +#search-input { + color: #333; + font-family: inherit; + font-size: 0.95rem; + width: 150px; + border: 1px solid #dbdbdb; + border-radius: 0.1em; + line-height: 1.5; + padding: 0 0.25em; +} + .navbar-burger { background: none; border: none; @@ -51,12 +68,12 @@ body { line-height: 1; position: relative; width: 3rem; - margin-left: auto; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; + margin-left: auto; min-width: 0; } @@ -143,6 +160,19 @@ body { white-space: nowrap; } +@media screen and (max-width: 768.5px) { + .navbar-brand .navbar-item.search { + padding-left: 0; + padding-right: 0; + } +} + +@media screen and (min-width: 769px) { + #search-input { + width: 200px; + } +} + @media screen and (max-width: 1023.5px) { .navbar-brand { height: inherit; @@ -182,14 +212,6 @@ body { display: flex; } - .navbar-menu { - flex: auto; - } - - .navbar-end { - margin-left: auto; - } - .navbar-item, .navbar-link { display: flex; diff --git a/src/partials/header-content.hbs b/src/partials/header-content.hbs index 6973507..e8d3ad0 100644 --- a/src/partials/header-content.hbs +++ b/src/partials/header-content.hbs @@ -2,6 +2,13 @@