Adding search icon to desktop.
This commit is contained in:
parent
3d99dbf1cf
commit
eecaba5131
@ -81,6 +81,12 @@ function addListenersSearch() {
|
|||||||
if (search !== null) {
|
if (search !== null) {
|
||||||
search.addEventListener('change', onSearchChange);
|
search.addEventListener('change', onSearchChange);
|
||||||
}
|
}
|
||||||
|
const searchIconDesktop = document.querySelector('nav.desktop a.search-icon');
|
||||||
|
if (searchIconDesktop !== null) {
|
||||||
|
searchIconDesktop.addEventListener('click', (e) => {
|
||||||
|
onFakeSearchClick(e)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function _port() {
|
function _port() {
|
||||||
|
@ -148,6 +148,18 @@ body {
|
|||||||
display: none; }
|
display: none; }
|
||||||
body nav.desktop a {
|
body nav.desktop a {
|
||||||
vertical-align: middle; }
|
vertical-align: middle; }
|
||||||
|
body nav.desktop a.search-icon {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center; }
|
||||||
|
body nav.desktop a.search-icon img {
|
||||||
|
background: aliceblue;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 10%;
|
||||||
|
width: 60%;
|
||||||
|
height: 60%; }
|
||||||
body nav.mobile-foldable {
|
body nav.mobile-foldable {
|
||||||
display: none;
|
display: none;
|
||||||
background: blueviolet;
|
background: blueviolet;
|
||||||
|
@ -208,6 +208,20 @@ body {
|
|||||||
a {
|
a {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
a.search-icon {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
img {
|
||||||
|
background: aliceblue;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 10%;
|
||||||
|
width: 60%;
|
||||||
|
height: 60%;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nav.mobile-foldable {
|
nav.mobile-foldable {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -20,5 +20,5 @@ for my $category_key (@sorted_categories) {
|
|||||||
my $selected = defined($target_category_slug) && $category->{slug} eq $target_category_slug;
|
my $selected = defined($target_category_slug) && $category->{slug} eq $target_category_slug;
|
||||||
%><a class="<%=$selected && "selected" %>" href="<%= '/'.$category->{slug} %>"><%==$category->{menu_text}%></a><%
|
%><a class="<%=$selected && "selected" %>" href="<%= '/'.$category->{slug} %>"><%==$category->{menu_text}%></a><%
|
||||||
}
|
}
|
||||||
%></nav>
|
%><a href="#" class="search-icon"><img alt="" src="/img/search.svg"/></a></nav>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user