[git] gnupg-doc - branch, master, updated. 07e10cc6b24f44d0c4f55c86a0e220f8b2e99214

by Werner Koch cvs at cvs.gnupg.org
Thu Nov 7 20:54:52 CET 2013


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  07e10cc6b24f44d0c4f55c86a0e220f8b2e99214 (commit)
      from  4a02511aa4f85d12ca77964ee21edc83e8a41d39 (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 07e10cc6b24f44d0c4f55c86a0e220f8b2e99214
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Nov 7 20:26:43 2013 +0100

    Indicate the current selection in the navigation menu.

diff --git a/web/share/gpgweb.el b/web/share/gpgweb.el
index 64c22b6..67438e8 100644
--- a/web/share/gpgweb.el
+++ b/web/share/gpgweb.el
@@ -136,29 +136,35 @@
 </html>
 "))
 
-
-;; Our publishing tweaks:
-;;
-;; - Substitute @FNAME@ by the actual file name.
-;; - Substitute @MENU-ACTIVE@ by an empty string.
+;;; Post-process the generated HTML file:
+;;;
+;;; - Insert header and footer
+;;; - Insert "class=selected" into the active menu entry
+;;; - Fixup sitemap.
 (defun gpgweb-postprocess-html (plist orgfile htmlfile)
   (let* ((visitingp (find-buffer-visiting htmlfile))
 	 (work-buffer (or visitingp (find-file-noselect htmlfile))))
     (prog1 (with-current-buffer work-buffer
              (let ((fname (file-name-nondirectory htmlfile))
+                   (fname-2 (replace-regexp-in-string
+                             ".*/stage\\(/.*\\)$" "\\1" htmlfile t))
                    (title (org-publish-find-title orgfile))
-                   (generated-at (org-today)))
+                   (generated-at (org-today))
+                   (tmppnt))
+               ;; Insert the header and mark the active menu
                (gpgweb-insert-header title)
-               (gpgweb-insert-footer)
-               (when (string-match "\\.\\([a-z][a-z]\\.\\)?html$" fname)
-                 (setq fname (substring fname 0 (match-beginning 0))))
-               (goto-char (point-min))
-               (while (search-forward "href=\"@FNAME@" nil t)
-                 (replace-match (concat "href=\"" ) t nil))
+               (setq tmppnt (point))
                (goto-char (point-min))
-               (while (search-forward "@MENU-ACTIVE@" nil t)
-                 (replace-match "" t nil))
-               (when (string-equal fname "sitemap")
+               (while (re-search-forward
+                       (concat "href=\"" (regexp-quote fname-2) "\"")
+                       tmppnt t)
+                 (replace-match "\\& class=\"selected\"" t))
+
+               ; Insert the footer
+               (gpgweb-insert-footer)
+
+               ; Fixup the sitemap
+               (when (string-equal fname "sitemap.html")
                  (goto-char (point-min))
                  (while (re-search-forward
                          "^.*<li>.*>\\(GnuPG - \\).*<span.*$" nil t)
@@ -166,7 +172,9 @@
                (basic-save-buffer))
       (unless visitingp (kill-buffer work-buffer))))))
 
-
+;;;
+;;; The publishing function used by the HTML exporter
+;;;
 (defun gpgweb-org-to-html (plist filename pub-dir)
   (gpgweb-postprocess-html plist filename
                            (org-html-publish-to-html plist filename pub-dir)))
diff --git a/web/share/site.css b/web/share/site.css
index 53e1a34..1e9237d 100644
--- a/web/share/site.css
+++ b/web/share/site.css
@@ -51,6 +51,7 @@ h3:first-letter {
    Links
  */
 
+
 a:link {
   color: #784c6c;
   font-weight: bold;
@@ -73,6 +74,7 @@ a.img:hover {
   background-color: #f0f0fc;
 }
 
+
 /*
    Raise attention
  */
@@ -98,7 +100,7 @@ div.urgent {
    Other elements as commonly used by org-mode
  */
 p {
-    margin-top: 1%;
+  margin-top: 1%;
 }
 
 
@@ -169,6 +171,10 @@ div.entry-qotd
     width: 18%;
 }
 
+
+/*
+   Navigation
+ */
 nav ul {
     list-style: none;
     font-size: 100%;
@@ -180,10 +186,32 @@ nav ul ul {
     font-size: 70%;
 }
 
+nav * li a {
+    color: #784c6c;
+}
+
+
+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;
+}
+
+nav * li a.selected:after {
+    content: " \21d0";
+    color: #784c6c;
+}
+
 nav img {
     border-width: 0;
 }
 
+
+/*
+   Other stuff
+ */
+
 main {
     float: left;
     margin-left: 5%;
@@ -198,6 +226,21 @@ main ul {
 }
 
 
+div.outline-text-2 {
+  padding-top: 5px;
+  padding-right: 3px;
+  border-top: 2px solid #5c6064;
+  border-right: 2px solid #784c6c;
+}
+
+div.outline-text-3 {
+  padding-top: 3px;
+  padding-right: 3px;
+  border-top: 1px solid #5c6064;
+  border-right: 1px solid #784c6c;
+}
+
+
 #rightColumn {
     float: right;
     width: 18%;

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

Summary of changes:
 web/share/gpgweb.el |   40 ++++++++++++++++++++++++----------------
 web/share/site.css  |   45 ++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 68 insertions(+), 17 deletions(-)


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




More information about the Gnupg-commits mailing list