[Libreoffice-commits] help.git: 2 commits - help3xsl/default.css help3xsl/online_transform.xsl

Olivier Hallot olivier.hallot at libreoffice.org
Thu Apr 26 11:49:21 UTC 2018


 help3xsl/default.css          |   34 +++++++++++++++++++-----
 help3xsl/online_transform.xsl |   58 ++++++++++++++++++------------------------
 2 files changed, 53 insertions(+), 39 deletions(-)

New commits:
commit 7d7b5977dd278ac994a09f935ba43684cdab199a
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
Date:   Tue Apr 24 23:16:02 2018 -0300

    Replace note,tip,warning with CSS flexbox
    
    Replace <table> by <div>'s with CSS flexbox property.
    Independent CSS classes for each div for easier tweaking
    
    Change-Id: Idedcebc7d9d7b28738c25f4fe11314209e92576c
    Reviewed-on: https://gerrit.libreoffice.org/53427
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/help3xsl/default.css b/help3xsl/default.css
index 3a6ec79c2..50023f5fc 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -116,6 +116,23 @@ pre,
 .keycode {
     font-weight: bold;
 }
+/* div's for warning, tip and note */
+.note,
+.tip,
+.warning{
+    display:flex;
+    align-items: center;
+    padding:0.3em;
+}
+.noteicon{
+    padding:0.3em;
+}
+.notetext{
+    padding:0.3em;
+}
+
+/* Table related classes */
+
 table {
     box-shadow: rgba(0,0,0,0.1) 0px 1px 3px 0px;
     border-collapse: collapse;
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 4cf2b4d6b..39b656ef0 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -986,14 +986,9 @@
         <xsl:variable name="doc" select="document($href)"/>
         <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
     </xsl:variable>
-    <!-- 	<p class="debug">image source: <xsl:value-of select="$imgsrc"/></p> -->
     <div class="{$type}">
-        <table border="0" class="{$type}" cellspacing="0" cellpadding="5">
-            <tr>
-                <td><img src="{$imgsrc}" alt="{$alt}" title="{$alt}"/></td>
-                <td><xsl:apply-templates /></td>
-            </tr>
-        </table>
+        <div class="noteicon"><img src="{$imgsrc}" alt="{$alt}" title="{$alt}"/></div>
+        <div class="notetext"><p><xsl:apply-templates /></p></div>
     </div>
     <br/>
 </xsl:template>
commit d5e4c4c48f6d132ee8e4c48c804809ec44e376f6
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
Date:   Wed Apr 25 08:29:49 2018 -0300

    Replace "howtoget" table by div + CSS flexdoc
    
    Change-Id: Ie79c7345af176edcae3ec99a36a466e8b9978d07
    Reviewed-on: https://gerrit.libreoffice.org/53444
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/help3xsl/default.css b/help3xsl/default.css
index 0fb0b9670..3a6ec79c2 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -139,12 +139,6 @@ table, th, td {
     vertical-align:top;
 }
 
-.howtogetheader {
-    font-weight: bold;
-    border: 1px solid #999999;
-    background: #FFFFFF;
-    padding: 3px;
-}
 h1,
 h2,
 h3,
@@ -192,9 +186,18 @@ h6 {
 }
 .howtoget {
     background: #CCF4C6;
+    padding: 0.3em;
+    display: flex;
+    flex-direction: column;
+    border: 1px #999999 solid;
+}
+.howtogetheader {
+    font-weight: bold;
+    border: 1px solid #999999;
+    background: #FFFFFF;
+    padding: 0.3em;
 }
 .howtogetbody {
-    background: #CCF4C6;
     margin: 0px;
 }
 .wide {
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index e6d6838b7..4cf2b4d6b 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -928,30 +928,27 @@
     <xsl:variable name="archive" select="'shared'"/>
     <xsl:variable name="tmp_href"><xsl:value-of select="concat($urlpre,'text/shared/00/00000004.xhp')"/></xsl:variable>
     <xsl:variable name="tmp_doc" select="document($tmp_href)"/>
-    <table class="howtoget" width="100%" border="1" cellpadding="3" cellspacing="0">
-        <tr>
-            <td>
-                <p class="howtogetheader"><xsl:apply-templates select="$tmp_doc//variable[@id='wie']"/></p>
-                <div class="howtogetbody">
-                    <xsl:choose>
-                        <xsl:when test="$linkhref = ''"> <!-- new style -->
-                            <xsl:apply-templates/>
-                        </xsl:when>
-                        <xsl:otherwise> <!-- old style -->
-                            <xsl:variable name="href"><xsl:value-of select="concat($urlpre,substring-before($linkhref,'#'))"/></xsl:variable>
-                            <xsl:variable name="anc"><xsl:value-of select="substring-after($linkhref,'#')"/></xsl:variable>
-                            <xsl:variable name="docum" select="document($href)"/>
-
-                            <xsl:call-template name="insertembed">
-                                <xsl:with-param name="doc" select="$docum" />
-                                <xsl:with-param name="anchor" select="$anc" />
-                            </xsl:call-template>
-                        </xsl:otherwise>
-                    </xsl:choose>
-                </div>
-            </td>
-        </tr>
-    </table>
+    <div class="howtoget">
+        <div>
+            <p class="howtogetheader"><xsl:apply-templates select="$tmp_doc//variable[@id='wie']"/></p>
+        </div>
+        <div class="howtogetbody">
+            <xsl:choose>
+                <xsl:when test="$linkhref = ''"> <!-- new style -->
+                    <xsl:apply-templates/>
+                </xsl:when>
+                <xsl:otherwise> <!-- old style -->
+                    <xsl:variable name="href"><xsl:value-of select="concat($urlpre,substring-before($linkhref,'#'))"/></xsl:variable>
+                    <xsl:variable name="anc"><xsl:value-of select="substring-after($linkhref,'#')"/></xsl:variable>
+                    <xsl:variable name="docum" select="document($href)"/>
+                    <xsl:call-template name="insertembed">
+                        <xsl:with-param name="doc" select="$docum" />
+                        <xsl:with-param name="anchor" select="$anc" />
+                    </xsl:call-template>
+                </xsl:otherwise>
+            </xsl:choose>
+        </div>
+    </div>
     <br/>
 </xsl:template>
 
@@ -1246,21 +1243,23 @@
             <table border="1" class="{@class}" cellpadding="0" cellspacing="0" width="100%" >
                 <xsl:apply-templates />
             </table>
+            <br/>
         </xsl:when>
 
         <xsl:when test="not(@class='')">
             <table border="1" class="{@class}" cellpadding="0" cellspacing="0" >
                 <xsl:apply-templates />
             </table>
+            <br/>
         </xsl:when>
 
         <xsl:otherwise>
             <table border="1" class="border" cellpadding="0" cellspacing="0" >
                 <xsl:apply-templates />
             </table>
+            <br/>
         </xsl:otherwise>
     </xsl:choose>
-    <br/>
 </xsl:template>
 
 <xsl:template name="resolveembed">


More information about the Libreoffice-commits mailing list