]> git.plutz.net Git - shellwiki/commitdiff
make search fields type=search
authorPaul Hänsch <paul@plutz.net>
Wed, 11 Oct 2023 16:22:57 +0000 (18:22 +0200)
committerPaul Hänsch <paul@plutz.net>
Wed, 11 Oct 2023 16:22:57 +0000 (18:22 +0200)
macros/wikiform
themes/default.css
themes/default.sh

index be6e4be0dae26c19e0122f82f34417d279b86aa9..257a22ed6e1ca430d62cdc627f7406f8d5078074 100755 (executable)
@@ -38,11 +38,11 @@ case $action in
   search)
     if [ "$LANGUAGE_DEFAULT" ]; then
       printf '<form class="search" method="GET" action="./:%s/[search]">
-        <input class="search" placeholder="%s" name="q" value=""><button type="submit" class="search">%s</button>
+        <input type="search" placeholder="%s" name="q" value=""><button type="submit" class="search">%s</button>
       </form>' "$LANGUAGE" "$(_ Search)" "$(_ Search)"
     else
       printf '<form class="search" method="GET" action="./[search]">
-        <input class="search" placeholder="%s" name="q" value=""><button type="submit" class="search">%s</button>
+        <input type="search" placeholder="%s" name="q" value=""><button type="submit" class="search">%s</button>
       </form>' "$(_ Search)" "$(_ Search)"
     fi
     ;;
index ae1cdf9ec0376bc16d4c85a99da232b0c335efd9..e7d5091a088600cfba92110b369af6aaed44a833 100644 (file)
@@ -168,7 +168,7 @@ form.newpage, form.search {
   margin-bottom: 1em;
 }
 form.search { text-align: center; }
-input.search {
+input.search, input[type="search"] {
   min-width: 50%;
   max-width: 80%;
   max-width: calc(100%  - 2.5em);
@@ -224,8 +224,8 @@ table {
     width: 100%;
   }
 
-  .left  input.search,
-  .right input.search {
+  .left  input.search, .left  input[type="search"],
+  .right input.search, .right input[type="search"] {
     width: 80%;
     width: calc(100% - 2.5em);
   }
index 23b03f25552b86ba2e6e3fc03a2c46d322e4cbba..5979f207895e2f9586abd29947902f160a93d0b9 100755 (executable)
@@ -143,7 +143,7 @@ theme_search(){
        <article>
          <h1>$([ "$words" ] && _ "Search results" || _ "Search" )</h1>
          <form class="search" method="GET">
-           <input class="search" name="q" value="$(HTML $words)"><button class="search" type="submit">$(_ Search)</button>
+           <input type="search" name="q" value="$(HTML $words)"><button class="search" type="submit">$(_ Search)</button>
          </form>
          <ol class="searchresults">
            $( while read p; do