From 0bb5ab5a35923fa2183d22be80e041ff4d2c306d Mon Sep 17 00:00:00 2001 From: Martin Goik <goik@hdm-stuttgart.de> Date: Fri, 27 Oct 2017 12:32:35 +0200 Subject: [PATCH] HdM logo in slides, minor CSS head related fix. --- ws/Docbook/CustomLayer/slide/reveal.css.patch | 44 +++---- .../webhelp/common/images/hdmlogo.svg | 2 +- .../CustomLayer/webhelp/hdmextensions.xsl | 108 +++++++++++++++++- .../CustomLayer/webhelp/positioning.css.patch | 22 +++- ws/Docbook/Preprocess/make.rules | 2 +- 5 files changed, 147 insertions(+), 31 deletions(-) diff --git a/ws/Docbook/CustomLayer/slide/reveal.css.patch b/ws/Docbook/CustomLayer/slide/reveal.css.patch index bac8958e9..b5a784645 100644 --- a/ws/Docbook/CustomLayer/slide/reveal.css.patch +++ b/ws/Docbook/CustomLayer/slide/reveal.css.patch @@ -1,27 +1,5 @@ -diff -Naur css.orig/reveal.css css/reveal.css ---- css.orig/reveal.css 2017-10-05 10:43:50.374350875 +0200 -+++ css/reveal.css 2017-10-05 10:35:10.913623343 +0200 -@@ -1,3 +1,8 @@ -+/* -+ * patched by: /usr/share/hdm-docbook-xsl/CustomLayer/slide/reveal.css.patch -+ * source file: /usr/share/reveal.js/css/reveal.css -+ */ -+ - /*! - * reveal.js - * http://lab.hakim.se/reveal-js -@@ -26,7 +31,7 @@ - border: 0; - font-size: 100%; - font: inherit; -- vertical-align: baseline; } -+ vertical-align: top; } - - .reveal article, .reveal aside, .reveal details, .reveal figcaption, .reveal figure, - .reveal footer, .reveal header, .reveal hgroup, .reveal menu, .reveal nav, .reveal section { -diff -Naur css.orig/theme/serif.css css/theme/serif.css ---- css.orig/theme/serif.css 2017-10-05 10:43:50.366350987 +0200 -+++ css/theme/serif.css 2017-10-05 10:41:33.424269074 +0200 +--- serif.css.orig 2017-10-27 11:56:33.011245531 +0200 ++++ serif.css 2017-10-27 11:56:15.883467607 +0200 @@ -1,3 +1,8 @@ +/* + * patched by: /usr/share/hdm-docbook-xsl/CustomLayer/slide/reveal.css.patch @@ -31,7 +9,23 @@ diff -Naur css.orig/theme/serif.css css/theme/serif.css /** * A simple theme for reveal.js presentations, similar * to the default theme. The accent color is brown. -@@ -206,7 +211,7 @@ +@@ -11,7 +16,14 @@ + * GLOBAL STYLES + *********************************************/ + body { +- background: #F0F1EB; ++ ++ ++ background-image: url('../../../common/images/hdmlogo.svg'); ++ background-repeat: no-repeat; ++ background-position: bottom left; ++ background-size: auto 10%, 7% 7%; ++ ++ und: #F0F1EB; + background-color: #F0F1EB; } + + .reveal { +@@ -211,7 +223,7 @@ *********************************************/ .reveal a { color: #51483D; diff --git a/ws/Docbook/CustomLayer/webhelp/common/images/hdmlogo.svg b/ws/Docbook/CustomLayer/webhelp/common/images/hdmlogo.svg index 1c1b8ccfb..e0935e39e 100644 --- a/ws/Docbook/CustomLayer/webhelp/common/images/hdmlogo.svg +++ b/ws/Docbook/CustomLayer/webhelp/common/images/hdmlogo.svg @@ -4,7 +4,7 @@ <svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="100px" height="91.818px" viewBox="0 0 100 91.818" enable-background="new 0 0 100 91.818" xml:space="preserve"> <g> - <rect fill="#FFFFFF" width="100" height="91.818"/> + <rect fill="#FFFFFF" fill-opacity="0.0" width="100" height="91.818"/> <polygon fill="#3F4847" points="93.961,80.963 90.646,71.482 87.981,71.482 87.981,85.843 89.849,85.843 89.849,74.484 93.9,85.843 95.852,85.843 95.852,71.482 93.961,71.482 "/> <g> diff --git a/ws/Docbook/CustomLayer/webhelp/hdmextensions.xsl b/ws/Docbook/CustomLayer/webhelp/hdmextensions.xsl index a0addc318..d39c6b6c0 100644 --- a/ws/Docbook/CustomLayer/webhelp/hdmextensions.xsl +++ b/ws/Docbook/CustomLayer/webhelp/hdmextensions.xsl @@ -26,7 +26,7 @@ <!-- No logo related parameter on offer, sigh! --> <xsl:template name="webhelpheader.logo"> <a href="index.html"> - <img style='margin-right: 2px; height: 59px; padding-right: 25px; padding-top: 8px' align="right" + <img style='margin-right: 2px; height: 35px; padding-right: 25px; padding-top: 0px' align="right" src='{$webhelp.common.dir}images/hdmlogo.svg' alt="{$brandname} Documentation"/> </a> </xsl:template> @@ -57,7 +57,7 @@ </video> </xsl:template> - <!-- Modifying Docbooc's standard --> + <!-- Modifying Docbook's standard --> <xsl:template match="d:qandaset"> <xsl:variable name="title" select="(d:blockinfo/d:title|d:info/d:title|d:title)[1]"/> @@ -106,4 +106,108 @@ </div> </xsl:template> + <!-- Modify navigation bar from webhelp-common.xsl --> + + <!-- The Header with the company logo --> + <xsl:template name="webhelpheader"> + <xsl:param name="prev"/> + <xsl:param name="next"/> + <xsl:param name="nav.context"/> + + <xsl:variable name="home" select="/*[1]"/> + <xsl:variable name="up" select="parent::*"/> + + <div id="header"> + <xsl:call-template name="webhelpheader.logo"/> + <!-- Display the page title and the main heading(parent) of it--> + <h1><!-- No top level info --> + <xsl:choose> + <xsl:when + test="count($up) > 0 and generate-id($up) != generate-id($home)"> + <xsl:apply-templates select="$up" mode="object.title.markup"/> + </xsl:when> + <xsl:when test="not(generate-id(.) = generate-id(/*))"> + <xsl:apply-templates select="." mode="object.title.markup"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="/*[1]" mode="title.markup"/> + </xsl:otherwise> + </xsl:choose> + </h1> + <!-- Prev and Next links generation--> + <div id="navheader"> + <xsl:call-template name="user.webhelp.navheader.content"/> + <xsl:comment> + <!-- KEEP this code. In case of neither prev nor next links are available, this will help to + keep the integrity of the DOM tree--> + </xsl:comment> + <!--xsl:with-param name="prev" select="$prev"/> + <xsl:with-param name="next" select="$next"/> + <xsl:with-param name="nav.context" select="$nav.context"/--> + <table class="navLinks"> + <tr> + <td> + <a id="showHideButton" href="#" onclick="myLayout.toggle('west')" + class="pointLeft" tabindex="5" title="Hide TOC tree">Sidebar + </a> + </td> + <xsl:if test="count($prev) > 0 + or (count($up) > 0 + and generate-id($up) != generate-id($home) + and $navig.showtitles != 0) + or count($next) > 0"> + <td> + <xsl:if test="count($prev)>0"> + <a accesskey="p" class="navLinkPrevious" tabindex="5"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$prev"/> + </xsl:call-template> + </xsl:attribute> + <xsl:call-template name="navig.content"> + <xsl:with-param name="direction" select="'prev'"/> + </xsl:call-template> + </a> + </xsl:if> + + <!-- "Up" link--> + <xsl:choose> + <xsl:when test="count($up)>0 + and generate-id($up) != generate-id($home)"> + | + <a accesskey="u" class="navLinkUp" tabindex="5"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$up"/> + </xsl:call-template> + </xsl:attribute> + <xsl:call-template name="navig.content"> + <xsl:with-param name="direction" select="'up'"/> + </xsl:call-template> + </a> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> + + <xsl:if test="count($next)>0"> + | + <a accesskey="n" class="navLinkNext" tabindex="5"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$next"/> + </xsl:call-template> + </xsl:attribute> + <xsl:call-template name="navig.content"> + <xsl:with-param name="direction" select="'next'"/> + </xsl:call-template> + </a> + </xsl:if> + </td> + </xsl:if> + </tr> + </table> + </div> + </div> + </xsl:template> + </xsl:stylesheet> diff --git a/ws/Docbook/CustomLayer/webhelp/positioning.css.patch b/ws/Docbook/CustomLayer/webhelp/positioning.css.patch index 748750954..811fd97d2 100644 --- a/ws/Docbook/CustomLayer/webhelp/positioning.css.patch +++ b/ws/Docbook/CustomLayer/webhelp/positioning.css.patch @@ -1,5 +1,5 @@ ---- positioning.css.orig 2017-10-14 09:40:46.682122317 +0200 -+++ positioning.css 2017-10-14 09:39:32.787147200 +0200 +--- /usr/share/hdm-docbook-xsl/docbook-xsl-1.79.2/webhelp/template/common/css/positioning.css 2016-12-09 23:39:10.000000000 +0100 ++++ positioning.css 2017-10-27 10:54:42.120627997 +0200 @@ -1,3 +1,8 @@ +/* + * patched by: /usr/share/hdm-docbook-xsl/CustomLayer/webhelp/positioning.css.patch @@ -9,6 +9,24 @@ tr th .added { color: #E6E6FA; } tr th .changed {color: #99ff99; } div.added tr, div.added { background-color: #E6E6FA; } +@@ -24,7 +29,7 @@ + background: url("../images/header-bg.png") scroll top left repeat-x #4d8c83; + position: fixed; + width: 100%; +- height: 99px; ++ height: 50px !important; + top: 0; + right: 0; + bottom: auto; +@@ -36,7 +41,7 @@ + #header h1 { + margin-left: 310px; + position: fixed; +- top: 20px; ++ top: 10px; + left: -15px; + color: #404040 !important; + } @@ -328,11 +333,23 @@ div#toolbar-left img {vertical-align: text-top;} diff --git a/ws/Docbook/Preprocess/make.rules b/ws/Docbook/Preprocess/make.rules index f6794e5ae..e255d939a 100644 --- a/ws/Docbook/Preprocess/make.rules +++ b/ws/Docbook/Preprocess/make.rules @@ -139,7 +139,7 @@ SAXONCMD=java -cp "${DBOOK_XSL}/tools/lib/saxon9he.jar:/usr/share/java/xercesImp %.slide: %.slide.xml ${SAXON6CMD} $< ${DBOOK_XSL_CUSTOM}/slide/slideHdm.xsl ${dbookXslSlideParam} rsync -a /usr/share/reveal.js . - cd reveal.js; patch -p0 < ${DBOOK_XSL_CUSTOM}/slide/reveal.css.patch + cd reveal.js/css/theme; patch -p0 < ${DBOOK_XSL_CUSTOM}/slide/reveal.css.patch touch $*.slide # PDF -- GitLab