Add basic build stuff.
authorWerner Koch <wk@gnupg.org>
Tue, 27 Aug 2013 12:58:22 +0000 (14:58 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 6 Nov 2013 11:55:07 +0000 (12:55 +0100)
.gitignore [new file with mode: 0644]
README
web/index.org
web/share/cc-by-sa-3.0_80x15.png [new file with mode: 0644]
web/share/gpgweb.el [new file with mode: 0644]
web/share/logo-gnupg-light-purple-bg.png [new file with mode: 0644]
web/share/site.css [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..4962839
--- /dev/null
@@ -0,0 +1,3 @@
+oldsite/
+stage/
+/web/sitemap.org
diff --git a/README b/README
index 7a5a933..48213aa 100644 (file)
--- a/README
+++ b/README
@@ -1,6 +1,43 @@
+README for the website branch.                           -*- org -*-
+
 This is a separated branch for the gnupg.org website.
 
 The old website was tracked in a CVS repository but we want to start
 the new website form scratch using only the texts from the generated
 HTML files.
 
+** Directory structure
+
+   - web/ :: Source files for the web.  This also include imagages
+             etc.
+   - web/share :: Logos, CSS, macros and elisp for building.
+   - tools/ :: Tools used to build the web site.
+   - stage/ :: staging directory for the site.
+
+** Aliases
+
+www.gnupg.org uses boa to serve the pages, here are the aliases we
+use:
+
+#+BEGIN_EXAMPLE
+# The manuals are maintained outside of the web pages;
+# thus we use an alias to copy them in.
+Alias /documentation/manuals /var/www/shared/manuals
+Alias /gph /var/www/shared/gph
+
+# The FAQ is located in the manuals directory but linked to the faq directory
+Alias /faq/GnuPG-FAQ.html  /var/www/shared/manuals/GnuPG-FAQ.html
+
+
+# Redirect a couple of well-known URLs
+Redirect /gpa.html      http://www.gnupg.org/related_software/gpa/
+Redirect /gpgme.html    http://www.gnupg.org/related_software/gpgme/
+Redirect /docs.html     http://www.gnupg.org/documentation/
+Redirect /download.html http://www.gnupg.org/download/
+Redirect /faq.html      http://www.gnupg.org/documentation/faqs.html
+
+# We use redirect to make language switching work.
+Redirect /why-not-idea.html  http://www.gnupg.org/faq/why-not-idea.html
+
+Redirect /howtos/ch/  http://www.gnupg.org/howtos/zh/
+#+END_EXAMPLE
index ceaf2c8..43b1fbe 100644 (file)
@@ -98,7 +98,7 @@ release: Version 1.4.12 ...
 This is the publishing info used for the GnuPG pages
 #+begin_src emacs-lisp
 (progn
- (require 'gpgweb "../tools/gpgweb.el")
+ (require 'gpgweb "~/s/gnupg-web/web/share/gpgweb.el")
  (setq org-export-html-toplevel-hlevel 1)
  (setq org-export-html-coding-system 'utf-8)
 
@@ -107,6 +107,7 @@ This is the publishing info used for the GnuPG pages
    :base-extension "org"
    :language "en"
    :html-extension "html"
+   :recursive t
    :publishing-directory "../stage"
    :publishing-function gpgweb-org-to-html
    :body-only t
diff --git a/web/share/cc-by-sa-3.0_80x15.png b/web/share/cc-by-sa-3.0_80x15.png
new file mode 100644 (file)
index 0000000..c67509f
Binary files /dev/null and b/web/share/cc-by-sa-3.0_80x15.png differ
diff --git a/web/share/gpgweb.el b/web/share/gpgweb.el
new file mode 100644 (file)
index 0000000..652b364
--- /dev/null
@@ -0,0 +1,87 @@
+;;; gpgweb.el --- elisp helper code for the GnuPG web pages
+
+(require 'org-exp)
+
+(defun gpgweb-insert-header ()
+  (goto-char (point-min))
+  (insert "<?xml version=\"1.0\" encoding=\"utf-8\"?>
+<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"
+               \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">
+<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">
+<head>
+<title>@TITLE@</title>
+<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/>
+<meta name=\"title\" content=\"@TITLE@\"/>
+<meta name=\"generator\" content=\"Org-mode\"/>
+<meta name=\"generated\" content=\"2013-03-22T17:25+0100\"/>
+<meta name=\"author\" content=\"Werner Koch\"/>
+<meta name=\"description\" content=\"\"/>
+<meta name=\"keywords\" content=\"\"/>
+<link rel=\"stylesheet\" href=\"share/site.css\" type=\"text/css\" />
+</head>
+<body>
+<div id=\"content\">
+<div id=\"header\">&nbsp;</div>
+<div id=\"leftColumn\">
+  <div id=\"navigation\">
+  <ul>
+    <li><a href=\"index.html\"   >home</a></li>
+    <li><a href=\"sitemap.html\" >sitemap</a></li>
+    <li><a href=\"contact.html\" >contact</a></li>
+  </ul>
+  </div>
+</div>
+<div id=\"mainText\">
+<p id=\"kicker\">@TITLE@</p>
+"))
+
+(defun gpgweb-insert-footer ()
+  (goto-char (point-max))
+  (insert "<div id=\"cpyright\">
+  <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\"
+    ><img alt=\"CC-BY-SA 3.0\" style=\"border: 0\"
+          src=\"share/cc-by-sa-3.0_80x15.png\"/></a>
+   <br/>These web pages are Copyright 1998--2013 The GnuPG Project and
+  licensed under a
+  <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\"
+   >Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.  See
+   <a href=\"copying.html\">copying<a/> for details.
+</div>
+</div>
+</div>
+</body>
+</html>
+"))
+
+
+(defun gpgweb-postprocess-html ()
+  (gpgweb-insert-header)
+  (gpgweb-insert-footer)
+  (let ((fname (file-name-nondirectory (buffer-file-name))))
+    (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=\"" fname) t nil))
+    (goto-char (point-min))
+    (while (search-forward "@MENU-ACTIVE@" nil t)
+      (replace-match "" t nil))))
+
+(defun gpgweb-org-to-html (plist filename pub-dir)
+  (add-hook 'org-export-html-final-hook
+            'gpgweb-postprocess-html)
+  (org-publish-org-to-html plist filename pub-dir)
+  (remove-hook 'org-export-html-final-hook
+               'gpgweb-postprocess-html))
+
+(defun gpgweb-upload ()
+   ())
+;  (let ((stagedir (plist-get project-plist :publishing-directory)))
+;    (message "gpgweb stagedir '%s'" stagedir)
+;    (shell-command
+;     (concat "rsync -rlt --exclude \"*~\" " stagedir "/ "
+;             "werner@trithemius.gnupg.org:"
+;             "/var/www/all/preview.gnupg.org/htdocs/"))))
+
+
+(provide 'gpgweb)
diff --git a/web/share/logo-gnupg-light-purple-bg.png b/web/share/logo-gnupg-light-purple-bg.png
new file mode 100644 (file)
index 0000000..41264d9
Binary files /dev/null and b/web/share/logo-gnupg-light-purple-bg.png differ
diff --git a/web/share/site.css b/web/share/site.css
new file mode 100644 (file)
index 0000000..52634d2
--- /dev/null
@@ -0,0 +1,335 @@
+/* site.css
+ *
+ * This code is provided "as is" with no warranty.  The exact terms
+ * under which you may use and (re)distribute it are detailed
+ * in the GNU General Public License, in the file COPYING.
+ *
+ * Copyright (C) 2002-2004 Free Software Foundation, Inc.
+ *
+ * Coding:
+ *   Lorenzo Cappelletti <lolo@gnupg.org>, 2002-2004.
+ */
+
+/* Color names as used by lolo:
+ *   gray              #5c6064
+ *   lightblue         #d0dce8
+ *   darkpurple        #784c6c
+ *   lightpurple       #f0f0fc
+ *   grayedlightpurple #ebebf4
+ */
+
+/*
+ * General style
+ */
+
+A:link {
+  color: #784c6c;
+  font-weight: bold;
+  text-decoration: none;
+}
+
+A:hover {
+  background-color: #d0dce8;
+  font-weight: bold;
+  text-decoration: none;
+}
+
+A:visited {
+  color: #5c6064;
+  font-weight: bold;
+  text-decoration: none;
+}
+
+A.img:hover {
+  background-color: #f0f0fc;
+}
+
+
+BLOCKQUOTE {
+  border: 1px solid black;
+  padding: 1em;
+}
+
+
+BODY {
+  margin-left: 0px;
+  margin-right: 0px;
+  text-align: left;
+  color: black;
+  background-color: #f0f0fc;
+  font-family: sans-serif;
+  font-weight: normal;
+  text-decoration: none;
+}
+
+
+DD {
+  padding-bottom: 1em;
+}
+
+
+H1,
+H2 {
+  font-size: large;
+}
+
+H1:first-letter,
+H2:first-letter {
+  font-size: x-large;
+}
+
+H3:first-letter {
+  font-size: large;
+}
+
+H1,
+H2,
+H3 {
+  color: #5c6064;
+  font-weight: bold;
+  font-variant: small-caps;
+  letter-spacing: 0.1em;
+}
+
+H1:first-letter,
+H2:first-letter,
+H3:first-letter {
+  color: #784c6c;
+}
+
+
+IMG {
+  border: none;
+}
+
+
+LI.important {
+  color: red;
+}
+
+
+P.out-of-date {
+  font-style: italic;
+  font-size: small;
+}
+
+
+PRE,
+DIV.samp {
+  background-color: #ebebf4;
+  margin: 1em;
+  border: 1px solid black;
+  padding: 1em;
+  font-size: small;
+}
+
+
+SPAN.important {
+  color: red;
+}
+
+
+DIV.urgent {
+  width: 85%;
+  text-align: center;
+  border: solid red;
+  font-weight: bold;
+}
+
+
+
+/*
+ * Invisible layout table
+ */
+
+TABLE.layout {
+  background-color: transparent;
+  border-collapse: separate;
+  border: none;
+}
+
+
+TD.layout {
+  /* Change `none' to `dotted' to see the layout table */
+  border: 1px none black;
+  padding: 0px;
+  text-align: right;
+  vertical-align: top;
+}
+
+
+
+/*
+ * Frame with Borders
+ */
+
+TABLE.frame {
+  background-color: transparent;
+  border-collapse: collapse;
+  /* Change `none' to `dotted' to see the layout table */
+  border: 1px none black;
+}
+
+
+TD.frame-right {
+  border-left: 2px solid #784c6c;
+}
+
+
+TD.frame-bottom,
+TD.frame-bottom-lang,
+TD.frame-bottom-mirror {
+  color: #5c6064;
+  border-top: 2px solid #5c6064;
+  text-align: left;
+  font-size: small;
+  font-weight: bold;
+}
+
+TD.frame-bottom-lang,
+TD.frame-bottom-mirror {
+  font-size: x-small;
+}
+
+TD.frame-bottom-mirror {
+  text-align: right;
+}
+
+
+TD.frame-corner {
+  border-top:  2px solid #5c6064;
+  border-left: 2px solid #784c6c;
+}
+
+
+TD.frame-spacing {
+  border: none;
+  height: 30px;
+}
+
+
+
+/*
+ * Head Frame
+ */
+
+TD.frame-head {
+  padding: 0px 0px 1em 0px;
+  border: none;
+  text-align: center;
+  vertical-align: middle;
+  font-size: large;
+  font-variant: small-caps;
+  font-weight: bold;
+  letter-spacing: 0.3em;
+}
+
+TD.frame-head-blockquote {
+  padding: 0px 1em 1em 1em;
+  border-bottom: 2px solid #5c6064;
+  vertical-align: middle;
+  font-family: sans-serif;
+  text-align: center;
+  text-decoration: none;
+  font-size: x-small;
+  font-variant: small-caps;
+  letter-spacing: 0.3em;
+}
+
+
+SPAN.g {
+  color: #784c6c;
+  font-size: x-large;
+}
+
+
+SPAN.nu {
+  color: #784c6c;
+}
+
+
+SPAN.pg {
+  color: #5c6064;
+  font-size: x-large;
+}
+
+
+A.lang {
+  font-size: x-small;
+}
+
+A.lang:visited {
+  color: #784c6c;
+}
+
+
+
+/*
+ * Navigation Bar Frame
+ */
+
+TD.frame-navb {
+  padding: 0px 0.3em 0.5em 0.3em;
+  text-align: left;
+  font-size: small;
+}
+
+UL.frame-navb {
+  margin: 0px;
+  margin-left: 1em;
+  padding-left: 1em;
+}
+
+UL.frame-navb:first-line {
+  margin: 0px;
+  padding-left: 1em;
+}
+
+LI.frame-navb {
+}
+
+
+
+/*
+ * Contents Frame
+ */
+
+TD.frame-cont {
+  padding: 0px 1em 1.5em 1em;
+  text-align: left;
+  vertical-align: top;
+}
+
+
+
+/*
+ * Foot Frame
+ */
+
+DIV.frame-foot {
+  text-align: center;
+  font-size: x-small;
+  color: #5c6064;
+}
+
+A.foot:link {
+  color: #5c6064;
+  font-size: x-small;
+  font-weight: normal;
+  text-decoration: underline;
+}
+
+A.foot:visited {
+  color: #5c6064;
+  font-size: x-small;
+  font-weight: normal;
+  text-decoration: underline;
+}
+
+A.foot:hover {
+  font-size: x-small;
+  font-weight: normal;
+}
+
+
+/* EOF */
\ No newline at end of file