[git] gnupg-doc - branch, master, updated. 96e9b9a86bff1d0c55fae6b65f2c68b667a03628

by Werner Koch cvs at cvs.gnupg.org
Thu Aug 28 14:05:51 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  96e9b9a86bff1d0c55fae6b65f2c68b667a03628 (commit)
       via  7069098bc2e5d7317e5736b761b7e7c87dddc824 (commit)
      from  a36e78cbb12cd8c4c2403864e025bc638b5454df (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 96e9b9a86bff1d0c55fae6b65f2c68b667a03628
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Aug 28 14:06:09 2014 +0200

    web: Minor CSS changes.
    
    - Removed use of italic if already a smaller font is used.
    - Made submenus larger now that there is only one shown.

diff --git a/web/share/site.css b/web/share/site.css
index 6f0e373..e7b0ea5 100644
--- a/web/share/site.css
+++ b/web/share/site.css
@@ -183,12 +183,12 @@ div.entry-qotd
 nav ul {
     list-style: none;
     font-size: 100%;
-    font-family: verdana,arial,helvetica;
+    font-family: verdana,helvetica;
     margin-bottom: 1em;
 }
 
 nav ul ul {
-    font-size: 70%;
+    font-size: 80%;
 }
 
 nav * li a {
@@ -261,13 +261,11 @@ div.outline-text-3 {
 }
 
 #cpyright {
-    font-style: italic;
     font-size: 0.6em;
     padding-top: 4em;
 }
 
 #smallnote {
-    font-style: italic;
     font-size: 0.8em;
 }
 
@@ -279,7 +277,6 @@ div.outline-text-3 {
 }
 
 #footer p {
-    font-style: italic;
     font-size: 0.3em;
     padding: 2em 0;
 }

commit 7069098bc2e5d7317e5736b761b7e7c87dddc824
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Aug 28 11:59:42 2014 +0200

    web: Open only the active submenu.

diff --git a/web/share/gpgweb.el b/web/share/gpgweb.el
index e91a198..19d5a55 100644
--- a/web/share/gpgweb.el
+++ b/web/share/gpgweb.el
@@ -118,24 +118,43 @@ Or set a new date only if the file really changed. "
      ()))
   "The definition of the gnupg.org menu structure.")
 
+(defun gpgweb--any-selected-menu-p (menu selected-file)
+  "Return t if any item in MENU has been selected."
+  (let ((item (car menu))
+        res)
+    (when menu
+      (when item
+        (when (string= (car item) selected-file)
+            (setq res t))
+        (when (caddr item)
+          (when (gpgweb--any-selected-menu-p (caddr item) selected-file)
+            (setq res t))))
+      (when (gpgweb--any-selected-menu-p (cdr menu) selected-file)
+        (setq res t)))
+    res))
 
-(defun gpgweb--insert-menuitem (item lvl selected-file)
-  (when item
-    (dotimes (i lvl) (insert "  "))
-    (insert "    <li><a href=\"" (car item) "\"")
-    (when (string= (car item) selected-file)
-      (insert " class=\"selected\""))
-    (insert  ">" (cadr item) "</a></li>\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"))))
 
 (defun gpgweb--insert-menu (menu lvl selected-file)
+  "Helper function to insert the menu."
   (when menu
-    (gpgweb--insert-menuitem (car menu) lvl selected-file)
+    (let ((item (car menu))
+          sel)
+      (when item
+        (dotimes (i lvl) (insert "  "))
+        (insert "    <li><a href=\"" (car item) "\"")
+        (when (string= (car item) selected-file)
+          (setq sel t)
+          (insert " class=\"selected\""))
+        (insert  ">" (cadr item) "</a></li>\n")
+        (when (and (caddr item)
+                   (or
+                    sel
+                    (gpgweb--any-selected-menu-p (caddr item) selected-file)))
+          (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"))))
     (gpgweb--insert-menu (cdr menu) lvl selected-file)))
 
 (defun gpgweb-insert-menu (selected-file)

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

Summary of changes:
 web/share/gpgweb.el |   47 +++++++++++++++++++++++++++++++++--------------
 web/share/site.css  |    7 ++-----
 2 files changed, 35 insertions(+), 19 deletions(-)


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




More information about the Gnupg-commits mailing list