[Libreoffice-commits] help.git: help3xsl/default.css help3xsl/help2.js

Olivier Hallot (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 29 12:29:24 UTC 2020


 help3xsl/default.css |    2 --
 help3xsl/help2.js    |   27 +++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 2 deletions(-)

New commits:
commit 4d6b5e5f74c50cc440a46fada8fa89ad2f946749
Author:     Olivier Hallot <olivier.hallot at libreoffice.org>
AuthorDate: Tue Apr 28 15:51:38 2020 -0300
Commit:     Olivier Hallot <olivier.hallot at libreoffice.org>
CommitDate: Wed Apr 29 14:29:05 2020 +0200

    Apply module brand color to Help page
    
    Change page header and headings to module colors
    Module colors from branding wiki page
    https://wiki.documentfoundation.org/Marketing/Branding#Colors
    
    Based on ideas of Beatriz Fonseca (@beatorizu)
    betrizaf at gmail.com
    
    Change-Id: Ia855872185a9c5ff6bcf3c351cc78e57e5a7901c
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/93100
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/help3xsl/default.css b/help3xsl/default.css
index f9a1edd4a..ceb591253 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -210,7 +210,6 @@ table, th, td {
     margin-top: 0px;
 }
 .tableheadcell {
-    background: #148603;
     color: white;
     vertical-align:top;
 }
@@ -349,7 +348,6 @@ h6 {
 }
 header {
     color: #fff;
-    background-color: #18A303;
     height: 64px;
     padding: 8px 8px 8px 16px;
 }
diff --git a/help3xsl/help2.js b/help3xsl/help2.js
index 8c2b60d72..9eb35c003 100644
--- a/help3xsl/help2.js
+++ b/help3xsl/help2.js
@@ -66,6 +66,32 @@ function setSystemSpan(spanZ) {
     }
 }
 
+// paint headers and headings with appl color
+
+function moduleColor (module) {
+    switch (module){
+        case "WRITER" : {color="#0369A3"; break;}
+        case "CALC"   : {color="#43C330"; break;}
+        case "CHART"  : {color="darkcyan"; break;}
+        case "DRAW"   : {color="#A33E03"; break;}
+        case "IMPRESS": {color="#C99C00"; break;}
+        case "BASE"   : {color="#8E03A3"; break;}
+        case "BASIC"  : {color="black"; break;}
+        case "MATH"   : {color="darkslategray"; break;}
+        case "SHARED" : {color="gray"; break;}
+        default : {color="#18A303"; break;}
+    }
+    document.getElementById("TopLeftHeader").style.background = color;
+    document.getElementById("SearchFrame").style.background = color;
+    document.getElementById("DonationFrame").style.background = color;
+    var cols = document.getElementsByClassName('tableheadcell');
+    for(i = 0; i < cols.length; i++) {cols[i].style.backgroundColor = color;};
+    for (j of [1,2,3,4,5,6]) {
+        var hh = document.getElementsByTagName("H" + j);
+        for(i = 0; i < hh.length; i++) {hh[i].style.color = color;}
+    }
+}
+
 // Find spans that need the switch treatment and give it to them
 var spans = document.querySelectorAll("[class^=switch]");
 var n = spans.length;
@@ -205,6 +231,7 @@ if (document.body.getElementsByTagName('meta')) {
 var module = getParameterByName("DbPAR");
 var helpID = getParameterByName("HID");
 fixURL(module,system);
+moduleColor(module);
 
 function debugInfo(dbg) {
     if (dbg == null) return;


More information about the Libreoffice-commits mailing list