From 8d83f9b3736dd879b3ee77a5481dc67b49a0bdc6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Sko=C5=99epa?= <jakub@skorepa.info>
Date: Wed, 9 Mar 2016 18:41:40 +0100
Subject: [PATCH] =?UTF-8?q?Opraveny=20n=C3=A1sleduj=C3=ADc=C3=AD=20chyby?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

1. V základní (horní) liště při přejetí šipkou přes odkazy O nás a
Články se šipka změní v klasický textový kurzor. Neměla by se spíše
změnit jako všude jinde v ruku s ukazováčkem?
2. Po kliknutí na lupu vyhledávání se otevře vyhledávací okno, ale nejde
zavřít, pokud se neklikne mimo něj. křížek nefunguje.

DĂ­ky OK1FIK ;)
---
 theme/sass/style.scss                     |  5 +++--
 theme/templates/partials/search.html.nunj | 18 +++++++++++-------
 theme/templates/partials/svgs.html.nunj   |  4 ++++
 3 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/theme/sass/style.scss b/theme/sass/style.scss
index 2c842681..51b1f0b0 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 cd5a5ac2..41a33f36 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 7a52254f..845f3e92 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 %}
-- 
GitLab