diff --git a/theme/sass/style.scss b/theme/sass/style.scss index 2c8426813b5566c4e8f862d09b72cde1c9e0048a..51b1f0b07eb1c5a7f3de54e4d6bb593fe0144bce 100644 --- a/theme/sass/style.scss +++ b/theme/sass/style.scss @@ -160,6 +160,7 @@ nav.subnav li { padding: 0 15px; height: 64px; line-height: 64px; + cursor: pointer; } .toplinks > a:hover, .menu-icon:hover { background-color: rgba(0, 0, 0, 0.1); @@ -221,7 +222,7 @@ nav.subnav li { max-width: $p-max-width; margin: 0 auto; } - + h2#title { margin: 0px; } @@ -299,7 +300,7 @@ nav.subnav li { padding: 0; } article ul li {list-style: circle inside} - + @media #{$small-and-down} { #content { width: 100%; diff --git a/theme/templates/partials/search.html.nunj b/theme/templates/partials/search.html.nunj index cd5a5ac21b45b19a142d39e3c5274dbb360900db..41a33f365ee9590b117b954b66d0e3439ab8ccd9 100644 --- a/theme/templates/partials/search.html.nunj +++ b/theme/templates/partials/search.html.nunj @@ -1,11 +1,14 @@ +{% import "partials/svgs.html.nunj" as svgs %} <div class="hidden" id="search" style="display:none"> <div><div><div><div style="background-color: white"> <div id="searchbox" style="padding: 0 60px 0 10px"> <form> <input style="padding: 0 60px 0 10px; margin: 0 -10px; width:100%;" placeholder="Vyhledávejte psanĂm..."> <form> - <div style="right: 0px; position: absolute; top: 0px; width: 50px; height: 50px; line-height: 50px;" class=""> - X + <div style="cursor: pointer; right: 0px; position: absolute; top: 0px; width: 50px; height: 50px; line-height: 50px;" class="close-search"> + <div style="height: 2em; margin: auto 0; position: relative; top: 50%; margin-top: -1em"> + {{ svgs.close("gray",2,"em") }} + </div> </div> </div> <div id="searchresults"></div> @@ -58,11 +61,11 @@ gcse.src = 'https://cse.google.com/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })(); - + $("#searchbox form").submit(function(e) { e.preventDefault(); }); - + $("#searchbox form").on("input", debounce(function(e) { var s = $("#searchbox input").val() if(s == "") { @@ -86,7 +89,7 @@ } // Resize page on searching $("#search > div").bind('DOMSubtreeModified', adjustHeight); - + // Search showing $(".search-icon").on("click", function() { $("#search").show(); @@ -100,8 +103,9 @@ }, 320); },0); }); + // Search hiding on search overlay click - $("#search-overlay").click(function() { + $("#search-overlay, .close-search").click(function() { $("#search-overlay").removeClass("shown"); $("#search").addClass("hidden"); setTimeout(function() { @@ -110,5 +114,5 @@ },320); }); })(); - + </script> diff --git a/theme/templates/partials/svgs.html.nunj b/theme/templates/partials/svgs.html.nunj index 7a52254fa02f3c2c9cdd1af682d2799c84e049be..845f3e927fb1c642c8a3795b21bb3964fd5c722c 100644 --- a/theme/templates/partials/svgs.html.nunj +++ b/theme/templates/partials/svgs.html.nunj @@ -43,3 +43,7 @@ {% macro gplus(color, size=24, unit="px") %} {{ symbol(color, size, unit, "M20,2A2,2 0 0,1 22,4V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V4C2,2.89 2.9,2 4,2H20M20,12H18V10H17V12H15V13H17V15H18V13H20V12M9,11.29V13H11.86C11.71,13.71 11,15.14 9,15.14C7.29,15.14 5.93,13.71 5.93,12C5.93,10.29 7.29,8.86 9,8.86C10,8.86 10.64,9.29 11,9.64L12.36,8.36C11.5,7.5 10.36,7 9,7C6.21,7 4,9.21 4,12C4,14.79 6.21,17 9,17C11.86,17 13.79,15 13.79,12.14C13.79,11.79 13.79,11.57 13.71,11.29H9Z") }} {% endmacro %} + +{% macro close(color, size=24, unit="px") %} + {{ symbol(color, size, unit, "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z") }} +{% endmacro %}