diff options
Diffstat (limited to '')
-rw-r--r-- | index.php | 42 |
1 files changed, 34 insertions, 8 deletions
@@ -23,6 +23,9 @@ <link rel="stylesheet" href="style/normalize.css"/> <link rel="stylesheet" href="style/main.css"/> + <noscript> + <style>.jsonly{ display: none; }</style> + </noscript> </head> <body> <div id="main"> @@ -50,13 +53,35 @@ <nav id="search_pane"> <form action="/search.php"> <div id="query_wrap"> - <div id="query_icon"></div> - <input id="query" type='search' value='<?php if($action === 'lmmtfy') echo $query;?>' name='query' required autofocus/> - <button id="def" type='submit' value='man' name='action' class="btn-def" aria-hidden="true" tabindex="-1"></button> - <?php - if($action === 'lmmtfy') - echo '<input id="sect" type="hidden" value="' . $section . '" name= "section"/>'; - ?> + <div id="query_icon"></div> + <input id="query" type='search' value='<?php if($action === 'lmmtfy') echo $query;?>' name='query' required autofocus/> + <button id="def" type='submit' value='man' name='action' class="btn-def" aria-hidden="true" tabindex="-1"></button> + <span class="query_opt" title="section">-s</span> + <select id="sect" name='section' title="section" autocomplete="off"> + <option value=""></option> + <?php + for($i = 1; $i <= 9; $i++) + { + $sel = ""; + if((strlen($section) > 0) && ($section[0] == $i)) + $sel = 'selected="selected"'; + echo "<option value='$i' $sel>$i</option>"; + } + ?> + </select> + <span class="query_opt" title="architecture">-S</span> + <select id="arch" name='arch' title="architecture" autocomplete="off"> + <option value=""></option> + <?php + foreach($archs as $a) + { + $sel = ""; + if((strlen($arch) > 0) && ($arch == $a)) + $sel = 'selected="selected"'; + echo "<option value='$a' $sel>$a</option>"; + } + ?> + </select> </div> <div> <button id="mank" type='submit' value='apropos' name='action' title="apropos(1)">man -k</button> @@ -90,8 +115,9 @@ </section> </nav> </div> + <div id="js_tmp"></div> </body> - + <script src="js/query_opts.js"></script> <?php if($action === 'lmmtfy') echo '<script src="js/lmmtfy.js"></script>'; ?> |