diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 37b3b79b..21023054 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -27,6 +27,9 @@ /> ⨉ + + + @@ -172,12 +175,7 @@ export default { }, onKeyPress(e) { if (e.key === "Enter") { - e.target.blur(); - this.$router.push({ - name: "SearchResults", - query: { search_query: this.searchText }, - }); - return; + this.submitSearch(); } }, onInputFocus() { @@ -195,6 +193,17 @@ export default { this.registrationDisabled = config?.registrationDisabled === true; }); }, + onSearchClick(e) { + this.submitSearch(e); + }, + submitSearch(e) { + e.target.blur(); + this.$router.push({ + name: "SearchResults", + query: { search_query: this.searchText }, + }); + return; + }, }, }; @@ -210,4 +219,10 @@ export default { .mobile-nav div { @apply mx-1; } + +@media screen and (max-width: 848px) { + #search-btn { + display: none; + } +}