set autofocus only for startpage, and center the search input field

This commit is contained in:
Wolfram Schneider 2017-08-27 17:46:27 +00:00
parent eb52ed1032
commit f7fb769d15
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=50744

View file

@ -969,7 +969,7 @@ i { color: #008000; }
-->
span.footer_links { font-size: small; }
input, button { font-size: large; }
input[name='query'] { text-align: right; }
input[name='query'] { text-align: center; }
</style>
|;
@ -1717,11 +1717,14 @@ sub formquery {
$bstring = q{ checked="checked"};
}
# set focus if the input field is empty
my $autofocus = $query ? "" : "autofocus";
print <<ETX;
<form method="get" action="$BASE">
<!-- Manual Page or Keyword Search: -->
<!-- &nbsp; &nbsp; &nbsp; -->
<input id="query" value="$query" name="query" size="36" autofocus />
<input id="query" value="$query" name="query" size="36" $autofocus />
<button type="submit" name="man" value="man">man</button>
<button type="submit" name="apropos" value="1">apropos</button>
<br class="second_row" />