diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2020-04-28 15:51:38 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2020-04-29 14:29:05 +0200 |
commit | 4d6b5e5f74c50cc440a46fada8fa89ad2f946749 (patch) | |
tree | dde33b82291a3a9cf8c4709e5c1bbfe5e8d86a6e /help3xsl | |
parent | 20c5b52a8cff1781e01e2aaaf7860752474d4b8f (diff) |
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@gmail.com
Change-Id: Ia855872185a9c5ff6bcf3c351cc78e57e5a7901c
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/93100
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl')
-rw-r--r-- | help3xsl/default.css | 2 | ||||
-rw-r--r-- | help3xsl/help2.js | 27 |
2 files changed, 27 insertions, 2 deletions
diff --git a/help3xsl/default.css b/help3xsl/default.css index f9a1edd4a7..ceb5912538 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 8c2b60d725..9eb35c003c 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; |