pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/templates genreadme: Reorganize information for clarity.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d68a221ad3f8
branches:  trunk
changeset: 448473:d68a221ad3f8
user:      nia <nia%pkgsrc.org@localhost>
date:      Mon Mar 08 16:37:59 2021 +0000

description:
genreadme: Reorganize information for clarity.

Move the navigation to the top and reword it slightly. This makes it
more immediately visible. I'm not sure if this justifies a "Skip to content"
button yet.

Give the binary package table headers.

diffstat:

 mk/scripts/genreadme.awk  |   8 ++++----
 templates/README.all      |  16 ++++++++++------
 templates/README.category |  24 ++++++++++++++----------
 templates/README.pkg      |  44 +++++++++++++++++++++++++++++++-------------
 templates/README.top      |  17 +++++++----------
 templates/main.css        |   6 +++++-
 6 files changed, 71 insertions(+), 44 deletions(-)

diffs (245 lines):

diff -r fe6d83848cc7 -r d68a221ad3f8 mk/scripts/genreadme.awk
--- a/mk/scripts/genreadme.awk  Mon Mar 08 15:26:40 2021 +0000
+++ b/mk/scripts/genreadme.awk  Mon Mar 08 16:37:59 2021 +0000
@@ -1,5 +1,5 @@
 #!/usr/bin/awk -f
-# $NetBSD: genreadme.awk,v 1.47 2021/02/24 08:16:32 nia Exp $
+# $NetBSD: genreadme.awk,v 1.48 2021/03/08 16:37:59 nia Exp $
 #
 # Copyright (c) 2002-2021 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -724,9 +724,9 @@
   binpkgs_file = TMPDIR "/binpkgs";
   spipe = SORT " > " binpkgs_file;
   for(i=1 ; i<=pkg_count[d]; i=i+1) {
-    printf("<tr><td>%s:<td><a href=\"%s/%s\">%s</a><td>(%s %s)\n",
-      march_list[d, i], PKG_URL, pkgfile_list[d, i], pkgnm_list[d, i],
-      opsys_list[d, i], osver_list[d, i]) | spipe;
+    printf("<tr><td>%s %s</td><td>%s</td><td><a href=\"%s/%s\">%s</a></td></tr>\n",
+      opsys_list[d, i], osver_list[d, i], march_list[d, i],
+      PKG_URL, pkgfile_list[d, i], pkgnm_list[d, i]) | spipe;
   }
   if( pkg_count[d] == 0 ) {
        printf("<tr><td><em>(none)</em></td></tr>\n") | spipe;
diff -r fe6d83848cc7 -r d68a221ad3f8 templates/README.all
--- a/templates/README.all      Mon Mar 08 15:26:40 2021 +0000
+++ b/templates/README.all      Mon Mar 08 16:37:59 2021 +0000
@@ -1,4 +1,4 @@
-<!-- $NetBSD: README.all,v 1.10 2021/02/24 08:16:32 nia Exp $ -->
+<!-- $NetBSD: README.all,v 1.11 2021/03/08 16:37:59 nia Exp $ -->
 <!-- generated by pkgsrc/mk/scripts/mkreadme -->
 <!doctype html>
 <html lang="en">
@@ -14,6 +14,15 @@
 </a>
 <h1>The NetBSD Packages Collection</h1>
 
+<nav>
+<p>
+[
+<a href="README.html"> Go to top of packages tree</a>
+]
+</p>
+<p></p> <!-- spacing hack for older browsers -->
+</nav>
+
 <p>
 The following list contains all
 %%NPKGS%%
@@ -26,10 +35,5 @@
 <dl>
 %%PKGS%%
 </dl>
-
-<hr>
-[
-<a href="README.html"> Go to top of packages tree</a>
-]
 </body>
 </html>
diff -r fe6d83848cc7 -r d68a221ad3f8 templates/README.category
--- a/templates/README.category Mon Mar 08 15:26:40 2021 +0000
+++ b/templates/README.category Mon Mar 08 16:37:59 2021 +0000
@@ -1,4 +1,4 @@
-<!-- $NetBSD: README.category,v 1.15 2021/02/22 09:40:48 nia Exp $ -->
+<!-- $NetBSD: README.category,v 1.16 2021/03/08 16:37:59 nia Exp $ -->
 <!-- generated by pkgsrc/mk/scripts/mkreadme -->
 <!doctype html>
 <html lang="en">
@@ -14,24 +14,28 @@
 </a>
 <h1><em>%%CATEGORY%%</em> - The NetBSD Packages Collection</h1>
 
+<nav>
+<p>
+[
+<a href="../README.html"> Back to list of categories</a>
+|
+<a href="../README-all.html"> List all packages</a>
+]
+</p>
+<p></p> <!-- spacing hack for older browsers -->
+</nav>
+
 <p>
 %%DESCR%%
 </p>
 
-<p>Here are the one-line descriptions for each of the
+<p>There are
 %%NUMITEMS%%
-items in this directory:</p>
+packages in this category:</p>
 
 <hr>
 <dl>
 %%SUBDIR%%
 </dl>
-
-<hr>
-[
-<a href="../README.html"> Go to top of packages tree</a>
-|
-<a href="../README-all.html"> List all packages</a>
-]
 </body>
 </html>
diff -r fe6d83848cc7 -r d68a221ad3f8 templates/README.pkg
--- a/templates/README.pkg      Mon Mar 08 15:26:40 2021 +0000
+++ b/templates/README.pkg      Mon Mar 08 16:37:59 2021 +0000
@@ -1,10 +1,12 @@
-<!-- $NetBSD: README.pkg,v 1.37 2021/02/22 09:40:48 nia Exp $ -->
+<!-- $NetBSD: README.pkg,v 1.38 2021/03/08 16:37:59 nia Exp $ -->
 <!-- generated by pkgsrc/mk/scripts/mkreadme -->
 <!doctype html>
 <html lang="en">
 <head>
 <meta charset="utf-8">
 <link href="../../templates/main.css" rel="stylesheet">
+<!-- make tables not look terrible on mobile... -->
+<meta name="viewport" content="width=device-width, initial-scale=1">
 <title>%%PORT%% - The NetBSD Packages Collection</title>
 </head>
 <body>
@@ -14,9 +16,22 @@
 </a>
 <h1><em>%%PORT%%</em> - The NetBSD Packages Collection</h1>
 
+<nav>
+<p>
+[
+<a href="../README.html"> Back to category</a>
+|
+<a href="../../README.html"> List of categories</a>
+|
+<a href="../../README-all.html"> List all packages</a>
+]
+</p>
+<p></p> <!-- spacing hack for older browsers -->
+</nav>
+
 <details open>
 <summary><em>%%COMMENT%%</em></summary>
-<p></p> <!-- spacing hack for older browsers with no details support -->
+<p></p> <!-- spacing hack for older browsers -->
 <pre>
 %%DESCR%%
 </pre>
@@ -44,14 +59,25 @@
 </section>
 
 <section>
-<h2>Available binary packages</h2>
+<h2>Binary packages</h2>
 <table>
+<thead>
+<tr>
+<th>OS</th><th>Architecture</th><th>Version</th>
+</tr>
+</thead>
+<tbody>
 %%BIN_PKGS%%
+</tbody>
 </table>
 
 <p>
-Binary packages can be installed with
-<a href="../../pkgtools/pkgin/README.html">pkgin</a> or pkg_add(1).
+Binary packages can be installed with the high-level tool
+<a href="../../pkgtools/pkgin/README.html">pkgin</a>
+(which can be installed with pkg_add)
+or
+<a href="//man.NetBSD.org/pkg_add.1">pkg_add(1)</a>
+(installed by default).
 
 The NetBSD packages collection is also designed to permit
             easy <a href="../../doc/pkgsrc.html">installation from source</a>.
@@ -87,13 +113,5 @@
 reported with
 <a href="http://www.NetBSD.org/support/send-pr.html";>send-pr.</a></p>
 
-<hr>
-[
-<a href="../README.html"> Go up one level</a>
-|
-<a href="../../README.html"> Go to top of packages tree</a>
-|
-<a href="../../README-all.html"> List all packages</a>
-]
 </body>
 </html>
diff -r fe6d83848cc7 -r d68a221ad3f8 templates/README.top
--- a/templates/README.top      Mon Mar 08 15:26:40 2021 +0000
+++ b/templates/README.top      Mon Mar 08 16:37:59 2021 +0000
@@ -1,4 +1,4 @@
-<!-- $NetBSD: README.top,v 1.23 2021/02/22 09:40:48 nia Exp $ -->
+<!-- $NetBSD: README.top,v 1.24 2021/03/08 16:37:59 nia Exp $ -->
 <!-- generated by pkgsrc/mk/scripts/mkreadme -->
 <!doctype html>
 <html lang="en">
@@ -21,6 +21,12 @@
 </p>
 
 <p>
+Prebuilt binary packages can be installed using the high level tool
+<a href="pkgtools/pkgin/README.html">pkgin</a> or the default
+<a href="//man.NetBSD.org/pkg_add.1">pkg_add(1)</a>.
+</p>
+
+<p>
 %%DESCR%%
 </p>
 
@@ -28,15 +34,6 @@
 <dl>
 %%SUBDIR%%
 </dl>
-<hr>
-
-Prebuilt binary packages can be installed using
-<a href="pkgtools/pkgin/README.html">pkgin</a> or pkg_add(8).
-For more information on how to build packages from pkgsrc, see the
-<a href="doc/pkgsrc.html">doc/pkgsrc.html</a> document.
-
-pkgsrc and binary packages for NetBSD are available on
-<a href="https://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/";>the NetBSD mirrors</a>.
 
 </body>
 </html>
diff -r fe6d83848cc7 -r d68a221ad3f8 templates/main.css
--- a/templates/main.css        Mon Mar 08 15:26:40 2021 +0000
+++ b/templates/main.css        Mon Mar 08 16:37:59 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.css,v 1.5 2021/02/22 09:43:58 nia Exp $ */
+/* $NetBSD: main.css,v 1.6 2021/03/08 16:37:59 nia Exp $ */
 
 body {
        font-family: sans-serif;
@@ -63,3 +63,7 @@
        border-top: 1px solid #aaa;
        border-bottom: 1px solid #aaa;
 }
+
+nav {
+       margin-bottom: 1em;
+}



Home | Main Index | Thread Index | Old Index