guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/04: hydra/goggles: Replace search button label with icon.


From: Ricardo Wurmus
Subject: 03/04: hydra/goggles: Replace search button label with icon.
Date: Fri, 8 May 2020 01:26:40 -0400 (EDT)

rekado pushed a commit to branch master
in repository maintenance.

commit 5124594433a4484a5744301a41069b198994a165
Author: Ricardo Wurmus <address@hidden>
AuthorDate: Fri May 8 07:24:59 2020 +0200

    hydra/goggles: Replace search button label with icon.
    
    * hydra/goggles.scm (looking-glass): New variable.
    (index, search-results): Use it.
---
 hydra/goggles.scm | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/hydra/goggles.scm b/hydra/goggles.scm
index 5116ef9..aae593a 100755
--- a/hydra/goggles.scm
+++ b/hydra/goggles.scm
@@ -233,6 +233,24 @@ ul {
 }
 ")
 
+(define looking-glass
+  ;; This SVG is part of Bootstrap and is available
+  ;; under the Expat license.
+  '(svg
+    (@ (class "bi bi-search")
+       (width "1em")
+       (height "1em")
+       (viewBox "0 0 16 16")
+       (fill "currentColor")
+       (xmlns "http://www.w3.org/2000/svg";))
+    (title "Search")
+    (path (@ (fill-rule "evenodd")
+             (d "M10.442 10.442a1 1 0 011.415 0l3.85 3.85a1 1 0 01-1.414 
1.415l-3.85-3.85a1 1 0 010-1.415z")
+             (clip-rule "evenodd")) "")
+    (path (@ (fill-rule "evenodd")
+             (d "M6.5 12a5.5 5.5 0 100-11 5.5 5.5 0 000 11zM13 6.5a6.5 6.5 0 
11-13 0 6.5 6.5 0 0113 0z")
+             (clip-rule "evenodd")) "")))
+
 (define colors
   (circular-list "#389600" "#8dd3c7" "#2e2a4a" "#6b8072"
                  "#80b1d3" "#6d2462" "#234e69" "#6c3d55"
@@ -352,7 +370,7 @@ freenode." channel))
       (@ (action ,(string-append channel "/search")))
       (input (@ (name "query")
                 (placeholder "nick:rekado frobnicate")) "")
-      (button (@ (type "submit")) "Search!"))
+      (button (@ (type "submit")) ,looking-glass))
      (div
       (@ (class "years"))
       ,@(map (lambda (files)
@@ -380,7 +398,7 @@ freenode." channel))
       (@ (action "search"))
       (input (@ (name "query")
                 (placeholder "nick:rekado frobnicate")) "")
-      (button (@ (type "submit")) "Search!"))
+      (button (@ (type "submit")) ,looking-glass))
      ,@(if (and query (not (string-null? query)))
            (let* ((results (search (format #f "channel:~a ~a" channel query))))
              `((p "These are the channel logs matching your query " (code 
,query))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]