[Xfce4-commits] <xfce4-docs:ristretto-master> Copy template code from clipman documentation

Stephan Arts noreply at xfce.org
Thu Oct 27 17:28:03 CEST 2011


Updating branch refs/heads/ristretto-master
         to 5c831bc3e97f1d2c14db69c116b81bb7e75fe860 (commit)
       from f0a8e669874953ac2948d995735309057fd50b73 (commit)

commit 5c831bc3e97f1d2c14db69c116b81bb7e75fe860
Author: Stephan Arts <stephan at xfce.org>
Date:   Wed Oct 26 22:44:08 2011 +0200

    Copy template code from clipman documentation

 manual/Makefile.am |  130 +++++++++++++++++++
 manual/index.css   |  355 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 manual/index.page  |   35 +++++
 manual/index.xsl   |  122 ++++++++++++++++++
 4 files changed, 642 insertions(+), 0 deletions(-)

diff --git a/manual/Makefile.am b/manual/Makefile.am
index e69de29..ae59756 100644
--- a/manual/Makefile.am
+++ b/manual/Makefile.am
@@ -0,0 +1,130 @@
+SUBDIRS = media po
+
+MALLARD_PAGE = index.page
+MALLARD_CSS = index.css
+MALLARD_XSL = index.xsl
+
+TARGET_DIR = $(DESTDIR)$(docdir)/html
+LINGUAS = $(shell cd $(srcdir)/po && echo `/bin/ls *.po 2> /dev/null |
+sed 's,[.]po,,g'`)
+
+EXTRA_DIST = $(MALLARD_PAGE) $(MALLARD_CSS) $(MALLARD_XSL)
+CLEANFILES = doc-build.stamp
+
+install-data-local:
+    echo "*** Installing HTML documentation"; \
+    if test -d "$(srcdir)/html"; then \
+        echo "--- $(TARGET_DIR)/$(MALLARD_CSS)"; \
+        $(mkinstalldirs) $(TARGET_DIR); \
+        $(INSTALL_DATA) $(srcdir)/html/$(MALLARD_CSS) $(TARGET_DIR); \
+        for lang in C $(LINGUAS); do \
+            echo "--- $(TARGET_DIR)/$$lang/"; \
+            if test -d "$(srcdir)/html/$$lang"; then \
+                $(mkinstalldirs) $(TARGET_DIR)/$$lang; \
+                $(INSTALL_DATA) $(srcdir)/html/$$lang/index.html
+$(TARGET_DIR)/$$lang; \
+            fi; \
+            if test ! -d "$(TARGET_DIR)/$$lang/media" -o -L
+"$(TARGET_DIR)/$$lang/media"; then \
+                if test -L "$(TARGET_DIR)/$$lang/media"; then \
+                    rm -f $(TARGET_DIR)/$$lang/media; \
+                fi; \
+                $(LN_S) ../C/media $(TARGET_DIR)/$$lang/media; \
+            fi; \
+        done; \
+    else \
+        echo "--- Nothing to install into $(TARGET_DIR)"; \
+    fi
+
+uninstall-local:
+    echo "*** Uninstalling HTML documentation"; \
+    echo "--- $(TARGET_DIR)/$(MALLARD_CSS)"; \
+    rm -f $(TARGET_DIR)/$(MALLARD_CSS); \
+    for lang in C $(LINGUAS); do \
+        echo "--- $(TARGET_DIR)/$$lang/"; \
+        rm -f $(TARGET_DIR)/$$lang/index.html; \
+        if test -L $(TARGET_DIR)/$$lang/media; then \
+            rm -f $(TARGET_DIR)/$$lang/media; \
+        fi; \
+    done
+
+clean-local:
+    rm -rf "$(srcdir)/html"
+
+if GENERATE_DOCUMENTATION
+
+update-po:
+    rm -f "$(srcdir)/po/$(GETTEXT_PACKAGE).pot"
+    $(ITSTOOL) -o "$(srcdir)/po/$(GETTEXT_PACKAGE).pot" $(MALLARD_PAGE)
+    for lang in $(LINGUAS); do \
+        echo -n "$$lang.po... "; \
+        $(MSGMERGE) --backup=none -U "$(srcdir)/po/$$lang.po"
+"$(srcdir)/po/$(GETTEXT_PACKAGE).pot"; \
+    done
+
+doc-build.stamp: $(MALLARD_CSS) $(MALLARD_XSL)
+    @-chmod -R u+w "$(srcdir)"
+    rm -rf "$(srcdir)/html"
+    @echo "*** Building HTML documentation"
+    @echo "--- Generating C documentation"
+    $(GNOME_DOC_TOOL) html -o "$(srcdir)/html/C/" -x
+"$(srcdir)/$(MALLARD_XSL)" -c "../$(MALLARD_CSS)"
+"$(srcdir)/$(MALLARD_PAGE)"
+    cp "$(srcdir)/$(MALLARD_CSS)" "$(srcdir)/html"
+    @rm "$(srcdir)/html/C/index.cache"
+    for lang in $(LINGUAS); do \
+        echo "--- Generating $$lang documentation"; \
+        mkdir -p "$(srcdir)/tmp"; \
+        $(MSGFMT) -o "$(srcdir)/tmp/$$lang.mo" "$(srcdir)/po/$$lang.po";
+\
+        $(ITSTOOL) -l "$$lang" -m "$(srcdir)/tmp/$$lang.mo" -o
+"$(srcdir)/tmp/index.page" "$(srcdir)/$(MALLARD_PAGE)"; \
+        $(GNOME_DOC_TOOL) html -n -o "$(srcdir)/html/$$lang/" -x
+"$(srcdir)/$(MALLARD_XSL)" -c "../$(MALLARD_CSS)"
+"$(srcdir)/tmp/index.page"; \
+        chmod -R u+w "$(srcdir)/html/$$lang"; \
+        rm -rf "$(srcdir)/tmp" "$(srcdir)/html/$$lang/index.cache"; \
+    done
+    touch doc-build.stamp
+
+dist-check-doc: all
+
+else
+
+update-po:
+    @echo "*** You need to compile with --enable-gen-doc in order to run
+make update-po"
+    @false
+
+doc-build.stamp:
+    @if test ! -d "$(srcdir)/html"; then \
+        echo; \
+        echo "*** No generated documenation found. If you want to "; \
+        echo "*** generate the (translated) documentation, run
+configure"; \
+        echo "*** with --enable-gen-doc."; \
+        echo; \
+    fi
+
+dist-check-doc:
+    @echo "*** You need to compile with --enable-gen-doc in order to run
+make dist"
+    @false
+
+endif
+
+all: doc-build.stamp
+
+dist-hook: dist-check-doc doc-build.stamp
+    mkdir -p "$(distdir)/html"; \
+    if test -f "$(srcdir)/html/$(MALLARD_CSS)"; then \
+        cp "$(srcdir)/html/$(MALLARD_CSS)" "$(distdir)/html"; \
+    fi; \
+    for lang in C $(LINGUAS); do \
+        if test -f "$(srcdir)/html/$$lang/index.html"; then \
+            mkdir -p "$(distdir)/html/$$lang"; \
+            cp -t "$(distdir)/html/$$lang/" $(srcdir)/html/$$lang/*; \
+        fi; \
+    done
+
+
diff --git a/manual/index.css b/manual/index.css
new file mode 100644
index 0000000..d1d77da
--- /dev/null
+++ b/manual/index.css
@@ -0,0 +1,355 @@
+
+html { height: 100%; }
+body {
+    margin: 0px;
+    background-color: #f9f9f6;
+    padding: 12px;
+    min-height: 100%;
+    direction: ltr;
+}
+ul, ol, dl, dd { margin: 0; }
+div, pre, p, li, dt { margin: 1em 0 0 0; padding: 0; }
+.first-child { margin-top: 0; }
+li.condensed { margin-top: 0.2em; }
+a {
+    text-decoration: none;
+    color: #1f609f;
+}
+a:visited {
+    color: #9f1f6f;
+}
+a:hover { text-decoration: underline; }
+
+div.headbar {
+    margin: 0;
+    max-width: 48em;
+}
+div.footbar {
+    margin: 0;
+    max-width: 48em;
+}
+div.body {
+    margin: 0;
+    padding: 1em;
+    max-width: 48em;
+    min-height: 20em;
+    -moz-border-radius: 6px;
+    border: solid 1px #e0e0df;
+    background-color: #ffffff;
+}
+div.navbar {
+    margin: 0;
+    float: right;
+}
+a.navbar-prev::before {
+    content: '◀  ';
+    color: #3f3f3f;
+}
+a.navbar-next::after {
+    content: '  ▶';
+    color: #3f3f3f;
+}
+div.copyrights {
+    text-align: center;
+    color: #3f3f3f;
+}
+div.section { margin-top: 2.4em; clear: both; }
+div.section div.section {
+    margin-top: 1.72em;
+    margin-left: 1.72em;
+}
+div.section div.section div.section { margin-top: 1.44em; }
+div.header {
+    margin: 0;
+    color: #3f3f3f;
+    border-bottom: solid 1px #e0e0df;
+}
+h1 {
+    font-size: 1.44em;
+    margin: 0;
+}
+h2, h3, h4, h5, h6, h7 {
+    font-size: 1.2em;
+    margin: 0;
+}
+table { border-collapse: collapse; }
+
+div.autolinks ul { margin: 0; padding: 0; }
+div.autolinks div.title { margin: 1em 0 0 1em; }
+div.autolinks div.title span {
+    border-bottom: solid 1px #e0e0df;
+}
+li.autolink { margin: 0.5em 0 0 0; padding: 0 0 0 1em; list-style-type:
+none; }
+
+div.linktrails {
+    margin: 0;
+}
+div.linktrail {
+    font-size: 0.83em;
+    margin: 0 1px 0.2em 1px;
+    padding-left: 1.2em;
+    color: #3f3f3f;
+}
+
+table.twocolumn { width: 100%; }
+td.twocolumnleft { width: 48%; vertical-align: top; padding: 0; margin:
+0; }
+td.twocolumnright {
+    width: 52%; vertical-align: top;
+    margin: 0; padding: 0;
+    padding-left: 1em;
+}
+
+div.linkdiv div.title {
+    font-size: 1em;
+    color: inherit;
+}
+div.linkdiv {
+    margin: 0;
+    padding: 0.5em;
+    -moz-border-radius: 6px;
+    border: solid 1px #ffffff;
+}
+div.linkdiv:hover {
+    border-color: #c0c9ff;
+    background-color: #f0f9ff;
+}
+div.linkdivsep {
+    margin: 0.5em;
+    list-style-type: none;
+    max-width: 24em;
+    border-bottom: solid 1px #e0e0df;
+}
+
+div.title {
+    margin: 0 0 0.2em 0;
+    font-weight: bold;
+    color: #3f3f3f;
+}
+div.desc { margin: 0 0 0.2em 0; }
+div.desc-listing, div.desc-synopsis { font-style: italic; }
+div.desc-figure { margin: 0.2em 0 0 0; }
+pre.code {
+    /* FIXME: In RTL locales, we really want to align this left, but the
+ * watermark
+     * we have is designed to fit in the top right corner.  Either we need
+     * a new
+     * watermark, or we need a separate RTL version.
+     */
+    background: url('watermark-code.png') no-repeat top right;
+    border: solid 2px #e0e0df;
+    padding: 0.5em 1em 0.5em 1em;
+}
+div.example {
+    border-left: solid 4px #e0e0df;
+    padding-left: 1em;
+}
+div.figure {
+    margin-left: 1.72em;
+    padding: 4px;
+    color: #3f3f3f;
+    border: solid 1px #e0e0df;
+    background-color: #f9f9f6;
+}
+div.figure-contents {
+    margin: 0;
+    padding: 0.5em 1em 0.5em 1em;
+    text-align: center;
+    color: #000000;
+    border: solid 1px #e0e0df;
+    background-color: #ffffff;
+}
+div.listing-contents { margin: 0; padding: 0; }
+div.note {
+    padding: 0.5em 6px 0.5em 6px;
+    border-top: solid 1px #ffc0c0;
+    border-bottom: solid 1px #ffc0c0;
+    background-color: #fffff0;
+}
+div.note-inner {
+    margin: 0;
+    padding-left: 60px;
+    background-position: left top;
+    background-repeat: no-repeat;
+    min-height: 48px;
+    background-image: url("admon-note.png");
+}
+div.note-advanced div.note-inner {  }
+div.note-bug div.note-inner { background-image: url("admon-bug.png"); }
+div.note-important div.note-inner { background-image:
+url("admon-important.png"); }
+div.note-tip div.note-inner { background-image: url("admon-tip.png"); }
+div.note-warning div.note-inner { background-image:
+url("admon-warning.png"); }
+div.note-contents { margin: 0; padding: 0; }
+div.quote-inner {
+    margin: 0;
+    background-image: url('watermark-blockquote-201C.png');
+    background-repeat: no-repeat;
+    background-position: top left;
+    padding: 0.5em;
+    padding-left: 4em;
+}
+div.title-quote {
+    margin-left: 4em;
+}
+blockquote { margin: 0; padding: 0; }
+div.cite-comment {
+    margin-top: 0.5em;
+    color: #3f3f3f;
+}
+div.cite-quote {
+    margin-top: 0.5em;
+    color: #3f3f3f;
+}
+div.cite-quote::before {
+    
+    content: '― ';
+}
+pre.screen {
+    padding: 0.5em 1em 0.5em 1em;
+    background-color: #f9f9f6;
+    border: solid 2px #e0e0df;
+}
+div.synopsis-contents {
+    margin: 0;
+    padding: 0.5em 1em 0.5em 1em;
+    border-top: solid 2px;
+    border-bottom: solid 2px;
+    border-color: #c0c9ff;
+    background-color: #f9f9f6;
+}
+div.synopsis pre.code {
+    background: none;
+    border: none;
+    padding: 0;
+}
+
+div.list-contents { margin: 0; padding: 0; }
+div.title-list { margin-bottom: 0.5em; }
+ol.list, ul.list { margin: 0; padding: 0; }
+li.item-list { margin-left: 1.44em; }
+
+div.steps-contents {
+    margin: 0;
+    padding: 0.5em 1em 0.5em 1em;
+    border-top: solid 2px;
+    border-bottom: solid 2px;
+    border-color: #c0c9ff;
+    background-color: #fffff0;
+}
+div.steps-contents div.steps-contents {
+    padding: 0;
+    border: none;
+    background-color: none;
+}
+ol.steps, ul.steps { margin: 0; padding: 0; }
+li.item-steps { margin-left: 1.44em; }
+
+div.terms-contents { margin: 0; }
+dt.item-next { margin-top: 0; }
+dd.item-terms {
+    margin-top: 0.2em;
+    margin-left: 1.44em;
+}
+
+ul.tree {
+    margin: 0; padding: 0;
+    list-style-type: none;
+}
+li.item-tree { margin: 0; padding: 0; }
+div.item-tree { margin: 0; padding: 0; }
+ul.tree ul.tree { margin-left: 1.44em; }
+div.tree-lines ul.tree { margin-left: 0; }
+
+table.table {
+    border-collapse: collapse;
+    border-color: #555753;
+    border-width: 1px;
+}
+table.table td {
+    padding: 0.1em 0.5em 0.1em 0.5em;
+    border-color: #888a85;
+    border-width: 1px;
+    vertical-align: top;
+}
+
+span.app { font-style: italic; }
+span.cmd {
+    font-family: monospace;
+    background-color: #f9f9f6;
+    padding: 0 0.2em 0 0.2em;
+}
+span.code { font-family: monospace; }
+span.em { font-style: italic; }
+span.email { color: red; }
+span.file { font-family: monospace; }
+span.gui, span.guiseq { color: #3f3f3f; }
+span.input { font-family: monospace; }
+span.hi {
+    background-color: #fffff0;
+}
+span.key {
+    color: #3f3f3f;
+    border: solid 1px #e0e0df;
+    padding: 0 0.2em 0 0.2em;
+}
+span.keyseq {
+    color: #3f3f3f;
+}
+span.output { font-family: monospace; }
+pre.screen span.output {
+    color: #3f3f3f;
+}
+pre.screen span.output-error {
+
+    color: #ff0000;
+}
+pre.screen span.output-prompt { font-weight: bold; }
+span.sys { font-family: monospace; }
+span.var { font-style: italic; }
+
+div.version {
+    position: absolute;
+    right: 12px;
+    opacity: 0.2;
+    margin-top: -1em;
+    padding: 0.5em 1em 0.5em 1em;
+    max-width: 24em;
+    -moz-border-radius: 6px;
+    border: solid 1px #e0e0df;
+    background-color: #fffff0;
+}
+div.version:hover { opacity: 0.8; }
+div.version p.version { margin-top: 0.2em; }
+div.linkdiv div.title span.status {
+    font-size: 0.83em;
+    font-weight: normal;
+    padding-left: 0.2em;
+    padding-right: 0.2em;
+    color: #3f3f3f;
+    border: solid 1px #ffc0c0;
+}
+div.linkdiv div.title span.status-stub { background-color: #fff0f0; }
+div.linkdiv div.title span.status-draft { background-color: #fff0f0; }
+div.linkdiv div.title span.status-incomplete { background-color:
+#fff0f0; }
+div.linkdiv div.title span.status-review { background-color: #fffff0; }
+div.linkdiv div.desc {
+    margin-top: 0.2em;
+    color: #3f3f3f;
+}
+div.comment {
+    padding: 0.5em;
+    border: solid 2px #ffc0c0;
+    background-color: #fff0f0;
+}
+div.comment div.comment {
+    margin: 1em 1em 0 1em;
+}
+div.comment div.cite {
+    margin: 0 0 0.5em 0;
+    font-style: italic;
+}
+
diff --git a/manual/index.page b/manual/index.page
new file mode 100644
index 0000000..98cc708
--- /dev/null
+++ b/manual/index.page
@@ -0,0 +1,35 @@
+<page xmlns="http://projectmallard.org/1.0/"
+      xmlns:e="http://projectmallard.org/experimental/"
+      xmlns:its="http://www.w3.org/2005/11/its"
+      type="topic"
+      id="ristretto">
+
+  <info>
+    <revision pkgversion="0.2.0" date="2011-10-26" />
+    <title type="text">Ristretto</title>
+    <desc>User documentation</desc>
+    <credit type="author" its:translate="no">
+      <name>Stephan Arts</name>
+      <email>stephan at xfce.org</email>
+      <years>2011</years>
+    </credit>
+    <license href="http://www.gnu.org/licenses/fdl-1.3-standalone.html">
+      <p>
+        Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free
+        Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with
+        no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. The complete license text
+        is available from the <link href="http://www.fsf.org/">Free Software Foundation</link>.
+      </p>
+    </license>
+  </info>
+
+  <title>Ristretto</title>
+
+  <section id="introduction">
+
+    <title>Introduction</title>
+
+    </section>
+
+  </section>
+</page>
diff --git a/manual/index.xsl b/manual/index.xsl
new file mode 100644
index 0000000..cb27ba3
--- /dev/null
+++ b/manual/index.xsl
@@ -0,0 +1,122 @@
+<?xml version='1.0'?>
+<!--
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the Free
+Software Foundation; either version 2 of the License, or (at your option) any
+later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this program; see the file COPYING.LGPL.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:mal="http://projectmallard.org/1.0/"
+        xmlns:str="http://exslt.org/strings"
+        xmlns:exsl="http://exslt.org/common"
+        xmlns="http://www.w3.org/1999/xhtml"
+        version="1.0">
+
+<!--!!==========================================================================
+This stylesheet includes text at the top of the page that precises the version
+of the software that it was written for, the license of the documentation and
+includes the table of contents with links.  -->
+
+<!-- = page = -->
+<xsl:template match="mal:page">
+  <div class="header">
+    <xsl:apply-templates mode="mal2html.title.mode" select="mal:title"/>
+    <xsl:apply-templates mode="mal2html.title.mode" select="mal:subtitle"/>
+
+    <p class="p">
+      <xsl:call-template name="l10n.gettext">
+        <xsl:with-param name="msgid" select="'This manual describes'"/>
+      </xsl:call-template>
+      <xsl:text> </xsl:text>
+      <span class="app">
+        <xsl:value-of select="mal:title"/>
+      </span>
+      <xsl:text> </xsl:text>
+      <xsl:call-template name="l10n.gettext">
+        <xsl:with-param name="msgid" select="'version'"/>
+      </xsl:call-template>
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="mal:info/mal:revision/@pkgversion"/>.
+    </p>
+    <xsl:apply-templates mode="mal2html.block.mode" select="mal:info/mal:license/*">
+      <xsl:with-param name="first_child" select="false()"/>
+    </xsl:apply-templates>
+  </div>
+
+  <div class="section toc">
+    <h2 class="title">
+      <xsl:call-template name="l10n.gettext">
+        <xsl:with-param name="msgid" select="'Table of Contents'"/>
+      </xsl:call-template>
+    </h2>
+    <ol>
+      <xsl:for-each select="mal:section[mal:title]">
+        <li>
+          <p>
+            <a>
+              <xsl:attribute name="href">
+                <xsl:value-of select="concat('#', @id)"/>
+              </xsl:attribute>
+              <xsl:value-of select="mal:title"/>
+            </a>
+          </p>
+        <xsl:for-each select="mal:section[mal:title]">
+          <ul>
+            <li>
+              <p>
+                <a>            
+                  <xsl:attribute name="href">
+                    <xsl:value-of select="concat('#', @id)"/>
+                  </xsl:attribute>
+                  <xsl:value-of select="mal:title"/>
+                </a>
+              </p>
+            </li>
+          </ul>
+        </xsl:for-each>
+        </li>
+      </xsl:for-each>
+    </ol>
+  </div>
+
+  <xsl:apply-templates select="mal:section"/>
+  <xsl:call-template name="mal2html.page.autolinks">
+    <xsl:with-param name="node" select="."/>
+  </xsl:call-template>
+</xsl:template>
+
+<!-- = copyright (bottom page) -->
+<xsl:template name="mal2html.page.copyrights">
+  <xsl:param name="node"/>
+  <div class="copyrights">
+    <xsl:for-each select="$node/mal:info/mal:credit[mal:years]">
+      <xsl:if test="contains(concat(' ', @type, ' '), ' author ')">
+        <div class="copyright">
+          Copyright <xsl:value-of select="concat('© ', mal:years, ' ', mal:name)"/>
+        </div>
+      </xsl:if>
+      <xsl:if test="contains(concat(' ', @type, ' '), ' translator ')">
+        <div class="copyright">
+          <xsl:call-template name="l10n.gettext">
+            <xsl:with-param name="msgid" select="'Translation'"/>
+          </xsl:call-template>
+          <xsl:text> </xsl:text>
+          <xsl:value-of select="concat('© ', mal:years, ' ', mal:name)"/>
+        </div>
+      </xsl:if>
+    </xsl:for-each>
+  </div>
+</xsl:template>
+
+</xsl:stylesheet>


More information about the Xfce4-commits mailing list