pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/templates
Module Name: pkgsrc
Committed By: nia
Date: Wed Apr 21 10:17:16 UTC 2021
Modified Files:
pkgsrc/templates: README.top main.css
Log Message:
templates: add DuckDuckGo search box
To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 pkgsrc/templates/README.top
cvs rdiff -u -r1.12 -r1.13 pkgsrc/templates/main.css
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/templates/README.top
diff -u pkgsrc/templates/README.top:1.29 pkgsrc/templates/README.top:1.30
--- pkgsrc/templates/README.top:1.29 Mon Apr 12 14:02:43 2021
+++ pkgsrc/templates/README.top Wed Apr 21 10:17:16 2021
@@ -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>
Index: pkgsrc/templates/main.css
diff -u pkgsrc/templates/main.css:1.12 pkgsrc/templates/main.css:1.13
--- pkgsrc/templates/main.css:1.12 Tue Apr 13 15:04:03 2021
+++ pkgsrc/templates/main.css Wed Apr 21 10:17:16 2021
@@ -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;
}
Home |
Main Index |
Thread Index |
Old Index