[git] gnupg-doc - branch, master, updated. 4d041c746de894c15ecdf728dd9d8bb9b7f716b2

by Werner Koch cvs at cvs.gnupg.org
Wed Oct 22 18:04:31 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GnuPG website and other docs".

The branch, master has been updated
       via  4d041c746de894c15ecdf728dd9d8bb9b7f716b2 (commit)
       via  c40840527a04f7e42b2fe1df5d5780ab99e6dd6b (commit)
      from  963c8c078713bdbd1abc8174fff6075031152943 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4d041c746de894c15ecdf728dd9d8bb9b7f716b2
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Oct 22 17:53:36 2014 +0200

    web: Changed layout to use a drop-down menu.

diff --git a/web/share/gpgweb.el b/web/share/gpgweb.el
index 17897f4..a4cfdc4 100644
--- a/web/share/gpgweb.el
+++ b/web/share/gpgweb.el
@@ -136,45 +136,73 @@ if not available."
     res))
 
 
+(defun gpgweb--selected-top-menu (menu selected-file)
+  "Return the selected top menu or nil."
+  (when menu
+    (let ((item (car menu)))
+      (if (and item
+               (or (string= (car item) selected-file)
+                   (gpgweb--any-selected-menu-p (caddr item) selected-file)))
+          menu
+        (gpgweb--selected-top-menu (cdr menu) selected-file)))))
+
 (defun gpgweb--insert-menu (menu lvl selected-file)
   "Helper function to insert the menu."
   (when menu
-    (let ((item (car menu))
-          sel)
+    (let ((item (car menu)))
       (when item
-        (dotimes (i lvl) (insert "  "))
-        (insert "    <li><a href=\"" (car item) "\"")
-        (when (string= (car item) selected-file)
-          (setq sel t)
+        (dotimes (i (1+ lvl)) (insert "  "))
+        (insert "  <li><a href=\"" (car item) "\"")
+        (when (or (string= (car item) selected-file)
+                  (gpgweb--any-selected-menu-p (caddr item) selected-file))
           (insert " class=\"selected\""))
-        (insert  ">" (cadr item) "</a></li>\n")
-        (when (and (caddr item)
-                   (or
-                    sel
-                    (gpgweb--any-selected-menu-p (caddr item) selected-file)))
+        (insert  ">" (cadr item) "</a>\n")
+        (when (caddr item)
           (dotimes (i (1+ lvl)) (insert "  "))
           (insert "  <ul>\n")
           (gpgweb--insert-menu (caddr item) (1+ lvl) selected-file)
           (dotimes (i (1+ lvl)) (insert "  "))
-          (insert "  </ul>\n"))))
+          (insert "  </ul>\n"))
+        (dotimes (i (1+ lvl)) (insert "  "))
+        (insert "  </li>\n")))
     (gpgweb--insert-menu (cdr menu) lvl selected-file)))
 
+
+(defun gpgweb--insert-submenu (menu selected-file)
+   "Helper function to insert the sub-menu."
+   (when menu
+     (let ((item (car menu)))
+       (when item
+         (insert "    <li><a href=\"" (car item) "\"")
+         (when (or (string= (car item) selected-file)
+                   (gpgweb--any-selected-menu-p (caddr item) selected-file))
+           (insert " class=\"selected\""))
+         (insert ">" (cadr item) "</a></li>\n")))
+     (gpgweb--insert-submenu (cdr menu) selected-file)))
+
+
 (defun gpgweb-insert-menu (selected-file)
   "Insert the menu structure into the HTML file."
   (goto-char (point-min))
   (when (re-search-forward "^<body>\n" nil t)
     (insert "<div id=\"header\"> </div>
-<div id=\"leftColumn\">
-  <nav>
+<nav>
   <ul>
 ")
     (gpgweb--insert-menu gpgweb-gnupg-menu-alist 0 selected-file)
     (insert "  </ul>
-  </nav>
-</div>
-<main>
+</nav>
+")
+    (let ((m (caddr (car (gpgweb--selected-top-menu
+                          gpgweb-gnupg-menu-alist selected-file)))))
+      (when m
+          (insert "<nav class=\"subnav\">\n  <ul>\n")
+          (gpgweb--insert-submenu m selected-file)
+          (insert "  </ul>\n</nav>\n")))
+    (insert "<main>
 ")))
 
+
 (defun gpgweb-insert-footer ()
   (goto-char (point-max))
   (insert "</main>
diff --git a/web/share/site.css b/web/share/site.css
index 5402f3d..9a90447 100644
--- a/web/share/site.css
+++ b/web/share/site.css
@@ -51,7 +51,6 @@ h3:first-letter {
    Links
  */
 
-
 a:link {
   color: #784c6c;
   font-weight: bold;
@@ -170,48 +169,152 @@ div.entry-qotd
     padding-right: 2%;
 }
 
-#leftColumn {
-    float: left;
-    text-align: right;
-    width: 18%;
-}
-
 
 /*
    Navigation
  */
+
+/* Reset the link attributes for nav except for hover  */
+nav * a:visited, a:link {
+    color: #757575;
+    font-weight: bold;
+    text-decoration: none;
+}
+
+
+/* The menu bar is centered.  */
+nav {
+    text-align: left;
+    line-height: 0.4em;
+    margin-left: 5%;
+    margin-right: 5%;
+}
+
+/* Main menu list.  */
 nav ul {
+    display: inline-table;
     list-style: none;
-    font-size: 100%;
-    font-family: verdana,helvetica;
-    margin-bottom: 1em;
+    position: relative;
+    box-shadow: 0px 0px 9px rgba(0,0,0,0.15);
+    padding: 0 20px;
+    border-radius: 10px;
+    background: #efefef;
+}
+
+nav ul:after {
+    display: block;
+    clear: both;
+    content: "";
+}
+
+/* Main menu items.  */
+nav ul li {
+    float: left;
+}
+
+nav ul li:hover {
+    background: #4b545f;
+}
+
+nav ul li:hover a {
+    color: #fff;
+}
+
+nav ul li a {
+    display: block;
+    color: #757575;
+    font-weight: bold;
+    text-decoration: none;
+    padding: 20px 30px;
 }
 
+/* Sub-menu lists.
+   Hide unless we over hover them.  */
 nav ul ul {
-    font-size: 80%;
+    display: none;
+    background: #5f6975;
+    border-radius: 0px;
+    padding: 0;
+    position: absolute;
+    z-index: 5;
+    top: 100%;
 }
 
-nav * li a {
-    color: #784c6c;
+nav ul li:hover > ul {
+    display: block;
 }
 
 
-nav * li a:after {
-    content: " \21d0";
-    /* FIXME: Hide the arrow using the background color.  We should use
-       width or something similar to get it aligned.  */
-    color: #f0f0fc;
+/* Sub-menu items.  */
+nav ul ul li {
+    float: none;
+    border-top: 1px solid #6b727c;
+    border-bottom: 1px solid #575f6a;
+    position: relative;
 }
 
-nav * li a.selected:after {
-    content: " \21d0";
-    color: #784c6c;
+nav ul ul li a {
+    font-weight: bold;
+    color: #fff;
+    padding: 20px 30px;
 }
 
-nav img {
-    border-width: 0;
+nav ul ul li a:hover {
+    background: #4b545f;
+}
+
+
+
+/* Sub-sub-menu lists.
+   Put right to the sub-menus.  */
+nav ul ul ul {
+    position: absolute;
+    z-index: 10;
+    left: 100%;
+    top: 0;
+}
+
+
+
+/* The second menu line for stop menu with sub-menus.
+   This is a non-nested list.  */
+nav.subnav {
+    margin-top: -1.5em;
 }
 
+nav.subnav ul {
+    display: inline-table;
+    list-style: none;
+    color: #757575;
+    position: relative;
+    box-shadow: 0px 0px 5px rgba(0,0,0,0.15);
+    border-radius: 6px;
+    background-color: #efefef;
+}
+
+nav.subnav ul li a {
+    display: block;
+    font-weight: normal;
+    text-decoration: none;
+    padding: 10px 20px;
+}
+
+
+/* Put selection markers arount a selected items.
+   \2009 is a    \21d2 and \21d0 are arrows.  */
+nav * li a.selected:before {
+    content: "\21d2\2009";
+}
+
+nav * li a.selected:after {
+    content: "\2009\21d0";
+}
+
+
+
+/*
+    The bottom menu
+ */
 
 #nav_bottom ul {
     list-style: none;
@@ -244,7 +347,6 @@ main {
     float: left;
     margin-left: 5%;
     margin-right: 5%;
-    width: 72%;
 }
 
 main ul {
@@ -269,6 +371,7 @@ div.outline-text-3 {
 }
 
 
+/* Not anymore used:
 #rightColumn {
     float: right;
     width: 18%;
@@ -282,6 +385,8 @@ div.outline-text-3 {
     padding-left: 0;
     margin-left: 1em;
 }
+*/
+
 
 #cpyright {
     padding-top: 4em;

commit c40840527a04f7e42b2fe1df5d5780ab99e6dd6b
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Oct 22 17:53:08 2014 +0200

    web: Minor fixes.

diff --git a/web/donate/donate-thanks.org b/web/donate/donate-thanks.org
index 4edf62e..b53e3a0 100644
--- a/web/donate/donate-thanks.org
+++ b/web/donate/donate-thanks.org
@@ -6,7 +6,7 @@
 
   *Thank you very much for your donation to our work on GnuPG.*
 
-  Note that the [[file:/donate/kudos.org][list of donors]] is only updated every 30 minutes, thus
+  Note that the [[/donate/kudos.html][list of donors]] is updated every 30 minutes, thus
   have some patience until you see your name.  If you did not give a
   name you won’t be listed at all.
 
diff --git a/web/download/index.org b/web/download/index.org
index 7ed4df1..b67d72f 100644
--- a/web/download/index.org
+++ b/web/download/index.org
@@ -14,7 +14,14 @@
   the *gnupg* directory; to locate a /binary package/ (indicated by a
   `B') follow the link to the *binary*.
 
-  [[../donate/index.org][file:../share/btn-donate.png]]
+#+BEGIN_HTML
+  <div class="buttonbox">
+    <form action="/cgi-bin/procdonate.cgi" method="POST">
+      <input type="submit" class="donate-button" value="Donate" />
+    </form>
+  </div>
+  <div style="clear: both"></div>
+#+END_HTML
 
   The table below provides links to the location of the files on the
   primary server only.

-----------------------------------------------------------------------

Summary of changes:
 web/donate/donate-thanks.org |    2 +-
 web/download/index.org       |    9 ++-
 web/share/gpgweb.el          |   62 ++++++++++++-----
 web/share/site.css           |  153 +++++++++++++++++++++++++++++++++++-------
 4 files changed, 183 insertions(+), 43 deletions(-)


hooks/post-receive
-- 
The GnuPG website and other docs
http://git.gnupg.org




More information about the Gnupg-commits mailing list