diff options
author | nia <nia@pkgsrc.org> | 2021-04-21 10:17:16 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2021-04-21 10:17:16 +0000 |
commit | de50724db872a02206f8233555c9091327bbef6a (patch) | |
tree | d00dee4b8b4bae32300faac6cc0f45fcb3afe45d /templates | |
parent | 39b375edcc69aa97f7df0a1ab8c8674dc4716a9a (diff) | |
download | pkgsrc-de50724db872a02206f8233555c9091327bbef6a.tar.gz |
templates: add DuckDuckGo search box
Diffstat (limited to 'templates')
-rw-r--r-- | templates/README.top | 30 | ||||
-rw-r--r-- | templates/main.css | 19 |
2 files changed, 47 insertions, 2 deletions
diff --git a/templates/README.top b/templates/README.top index 050e8c9478e..3ee45d70ca2 100644 --- a/templates/README.top +++ b/templates/README.top @@ -1,4 +1,4 @@ -<!-- $NetBSD: README.top,v 1.29 2021/04/12 14:02:43 nia Exp $ --> +<!-- $NetBSD: README.top,v 1.30 2021/04/21 10:17:16 nia Exp $ --> <!-- generated by pkgsrc/mk/scripts/mkreadme --> <!doctype html> <html lang="en"> @@ -7,12 +7,40 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="templates/main.css" rel="stylesheet"> <title>The NetBSD Packages Collection</title> +<script type="text/javascript"> +function appendSearch() { + document.x.q.value += ' site:cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc +"NetBSD Packages Collection"' + return true; +} + +window.onload = function() { + var e = document.getElementById('search-box'); + e.style.display = "block"; +}; +</script> </head> <body> <a href="https://pkgsrc.org/"><img src="templates/pkgsrc.png" alt="pkgsrc" id="logo"></a> <h1>The NetBSD Packages Collection</h1> +<!-- based on https://duckduckgo.com/search_box with customizations +to make it more useful for searching pkgsrc --> +<form class="search-box" id="search-box" name="x" style="display: none;" + action="https://duckduckgo.com/" target="_top" onSubmit="return appendSearch()"> + <label for="q">Search:</label> + <input type="text" autocomplete="off" name="q" + placeholder="Search DuckDuckGo" + value=""> + <input id="search_button_homepage" type="submit" value="Go"/> + <!-- don't autoload images --> + <input type="hidden" name="kc" value="-1"/> + <!-- don't show favicons --> + <input type="hidden" name="kf" value="-1"/> + <!-- don't open instant answers --> + <input type="hidden" name="kz" value="-1"/> +</form> + <p> The packages collection is divided into categories of packages. A <a href="index-all.html">complete list of all packages</a> diff --git a/templates/main.css b/templates/main.css index 5b586281728..537ec84dcd6 100644 --- a/templates/main.css +++ b/templates/main.css @@ -1,4 +1,4 @@ -/* $NetBSD: main.css,v 1.12 2021/04/13 15:04:03 nia Exp $ */ +/* $NetBSD: main.css,v 1.13 2021/04/21 10:17:16 nia Exp $ */ body { font-family: sans-serif; @@ -76,6 +76,23 @@ hr { border-bottom: 1px solid #aaa; } +.search-box label { + display: none; +} + +.search-box input { + color: #000; + background-color: #fff; + border: 1px solid #ccc; + border-radius: 2px; + padding: 3px; +} + +.search-box input[type="Submit"] { + padding-left: 1em; + padding-right: 1em; +} + nav { margin-bottom: 1em; } |