summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--index.php (renamed from index.html)36
1 files changed, 26 insertions, 10 deletions
diff --git a/index.html b/index.php
index 561746a..23e9ccb 100644
--- a/index.html
+++ b/index.php
@@ -1,3 +1,6 @@
+<?php
+ require 'common.php';
+?>
<!DOCTYPE html>
<html lang="en">
<head>
@@ -26,28 +29,37 @@
</header>
<section id="logo">
<h1>
- <span id="gc-let">Let</span>
- <span id="gc-me">me</span>
- <code id="gc-man">man</code>
- <span id="gc-that">that</span>
- <span id="gc-for">For</span>
- <span id="gc-you">you</span>
+ <span id="logo-let">Let</span>
+ <span id="logo-me">me</span>
+ <code id="logo-man">man</code>
+ <span id="logo-that">that</span>
+ <span id="logo-for">For</span>
+ <span id="logo-you">you</span>
</h1>
- <div id="version_wrap">
- <span id="version">BETA!</span>
+ <div id="logo-ver_wrap">
+ <span id="logo-ver">BETA!</span>
</div>
</section>
<nav id="search_pane">
- <form>
+ <form action="/search.php">
<div id="query_wrap">
<div id="query_icon"></div>
- <input id="query" type='search' value='' name='query' required autofocus/>
+ <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>
<div>
<button id="mank" type='submit' value='apropos' name='action' title="apropos(1)">man -k</button>
<button id="man" type='submit' value='man' name='action' title="Feeling lucky, punk?">man</button>
</div>
</form>
+ <?php
+ if($action === 'lmmtfy')
+ echo '<noscript class="center"><p>No JavaScript means you have to manually press the <code>man</code> button.</p></noscript>';
+ ?>
<p class="hint center">Write "man" if you have no idea what to do...</p>
</nav>
@@ -72,4 +84,8 @@
</nav>
</div>
</body>
+
+<?php
+ if($action === 'lmmtfy') echo '<script src="js/lmmtfy.js"></script>';
+?>
</html>