[Libreoffice-commits] help.git: help3xsl/default.css help3xsl/get_bookmark.xsl help3xsl/get_tree.xsl help3xsl/xhp2html.sh

Olivier Hallot olivier.hallot at libreoffice.org
Sat Jul 29 14:38:14 UTC 2017


 help3xsl/default.css      |    5 ++++
 help3xsl/get_bookmark.xsl |   50 ++++++++++++++++++++++++----------------------
 help3xsl/get_tree.xsl     |    2 -
 help3xsl/xhp2html.sh      |    2 -
 4 files changed, 34 insertions(+), 25 deletions(-)

New commits:
commit 4d6f86d203814a211eae9dfacd4baf195ca4ff1d
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
Date:   Sat Jul 29 10:59:28 2017 -0300

    tdf#97745 housekeeping
    
    Fix links in bookmarks.js
    Better font size for Index and Contents
    Fix CSS file
    
    Change-Id: I42966be1d88b12393b6dd95adb2719baf76a025c
    Reviewed-on: https://gerrit.libreoffice.org/40549
    Reviewed-by: Olivier Hallot <olivier.hallot at edx.srv.br>
    Tested-by: Olivier Hallot <olivier.hallot at edx.srv.br>

diff --git a/help3xsl/default.css b/help3xsl/default.css
index 3a83d55d4..6fcfc3297 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -389,8 +389,12 @@ header input[type=checkbox],
     top: 2px;
     left: 2px;
 }
+#Index ul {
+    padding-left:15px;
+}
 #Index ul li {
     list-style-type: none;
+    font-size: 11pt;
 }
 #Index p {
     font-size: 16pt;
@@ -478,6 +482,7 @@ header input[type=checkbox],
     padding: 0;
     margin: 0;
     list-style: none;
+    font-size: 11pt;
 }
 .contents-treeview {
     /*    font: normal 11px "Segoe UI", Arial, Sans-serif;*/
diff --git a/help3xsl/get_bookmark.xsl b/help3xsl/get_bookmark.xsl
index 1a153c89e..d0fd8f19a 100644
--- a/help3xsl/get_bookmark.xsl
+++ b/help3xsl/get_bookmark.xsl
@@ -55,22 +55,37 @@ xsltproc get_bookmark.xsl <file.xhp>
         <xsl:variable name="hrefhtml" select="substring-before($filename,'xhp')"/>
         <xsl:variable name="href" select="concat($productversion,'/',$Language,'/',$hrefhtml,'html?DbPAR=',$app,'#', at id)"/>
         <xsl:for-each select="bookmark_value">
-            <xsl:variable name="here1">
-                <xsl:text disable-output-escaping="yes"><![CDATA[<li><a target="_top" href="]]></xsl:text>
-                <xsl:value-of select="$href"/>
-                <xsl:text disable-output-escaping="yes"><![CDATA["</a>]]></xsl:text>
-                <xsl:call-template name="apostrophe"><xsl:with-param name="string">
-                    <xsl:value-of select="."/>
-                </xsl:with-param></xsl:call-template>
-            </xsl:variable>
-                <xsl:call-template name="brand"><xsl:with-param name="string">
-                    <xsl:value-of select="$here1"/>
-                </xsl:with-param></xsl:call-template>
-                <xsl:text disable-output-escaping="yes"><![CDATA[</li>\]]>&#xA;</xsl:text>
+            <xsl:text disable-output-escaping="yes"><![CDATA[<li><a target="_top" href="]]></xsl:text>
+            <xsl:value-of select="$href"/>
+            <xsl:text disable-output-escaping="yes"><![CDATA[">]]></xsl:text>
+            <xsl:call-template name="replace"><xsl:with-param name="text" select="."/></xsl:call-template>
+            <xsl:text disable-output-escaping="yes"><![CDATA[</a></li>\]]>&#xA;</xsl:text>
         </xsl:for-each>
     </xsl:for-each>
 </xsl:template>
 
+<xsl:template name="replace">
+    <xsl:param name="text"/>
+    <xsl:call-template name="brand">
+        <xsl:with-param name="string">
+            <xsl:call-template name="apostrophe">
+                <xsl:with-param name="string">
+                    <xsl:choose>
+                        <xsl:when test="contains($text,';')">
+                            <xsl:value-of select="substring-before($text,';')"/>
+                            <xsl:text disable-output-escaping="yes"><![CDATA[ -- ]]></xsl:text>
+                            <xsl:value-of select="substring-after($text,';')"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:value-of select="$text"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:with-param>
+            </xsl:call-template>
+        </xsl:with-param>
+    </xsl:call-template>
+</xsl:template>
+
 <!-- weird characters inside bookmarks, replace by HTML entities-->
 <xsl:template name="apostrophe">
     <xsl:param name="string"/>
@@ -92,17 +107,6 @@ xsltproc get_bookmark.xsl <file.xhp>
     </xsl:choose>
 </xsl:template>
 
-<!-- Branding -->
-<xsl:template match="text()">
-    <xsl:call-template name="brand">
-        <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="apostrophe">
-        <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
-    </xsl:call-template>
-</xsl:template>
-
-
 <xsl:template name="brand" >
     <xsl:param name="string"/>
 
diff --git a/help3xsl/get_tree.xsl b/help3xsl/get_tree.xsl
index c80ba1b95..4f959ad5a 100644
--- a/help3xsl/get_tree.xsl
+++ b/help3xsl/get_tree.xsl
@@ -8,7 +8,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 -->
 <!--
-Stylesheet to extract tree context and generate a neste list
+Stylesheet to extract tree context and generate a nested list
 Usage:
 xsltproc get_tree.xsl <file.tree>
 -->
diff --git a/help3xsl/xhp2html.sh b/help3xsl/xhp2html.sh
index d4e172c0b..eb2696a6e 100755
--- a/help3xsl/xhp2html.sh
+++ b/help3xsl/xhp2html.sh
@@ -89,7 +89,7 @@ echo 'copy global service files'
 cp index.html $here'/html/'
 cp help.js $here'/html/'$productversion'/'
 cp jquery-3.1.1.min.js $here'/html/'$productversion'/'
-cp normalize.js $here'/html/'$productversion'/'
+cp normalize.css $here'/html/'$productversion'/'
 cp default.css $here'/html/'$productversion'/'
 
 cp -rap ../source/media $here'/html/'$productversion'/'


More information about the Libreoffice-commits mailing list