diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2018-03-20 19:38:21 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2018-03-21 19:38:56 +0100 |
commit | 4a1008b6ee7043031e9b050adcf836c2f0c88a47 (patch) | |
tree | 475a49411ead3dc89b9dc7db41e7f676a2e12df7 | |
parent | bd71cddd5c343dc894e78bb9809acb94ca1db337 (diff) |
Deploy videos in New Help (WIP)
Add YouTube videos in New help.
add makefile
NOTE: <object> is not rendered in old help.
NOTE2: Removed online objects from offline help
Change-Id: I829fe1858002a454417d36d0651fe49097e008d4
Reviewed-on: https://gerrit.libreoffice.org/51679
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
-rw-r--r-- | AllLangHelp_shared.mk | 1 | ||||
-rw-r--r-- | help3xsl/default.css | 6 | ||||
-rw-r--r-- | help3xsl/online_transform.xsl | 48 | ||||
-rw-r--r-- | source/text/scalc/main0000.xhp | 1 | ||||
-rw-r--r-- | source/text/sdraw/main0000.xhp | 5 | ||||
-rw-r--r-- | source/text/shared/06/youtubevideos.xhp | 23 | ||||
-rw-r--r-- | source/text/simpress/main0000.xhp | 3 | ||||
-rw-r--r-- | source/text/smath/main0000.xhp | 1 | ||||
-rw-r--r-- | source/text/swriter/main0000.xhp | 3 |
9 files changed, 66 insertions, 25 deletions
diff --git a/AllLangHelp_shared.mk b/AllLangHelp_shared.mk index bf76d916b0..dabc98dbe4 100644 --- a/AllLangHelp_shared.mk +++ b/AllLangHelp_shared.mk @@ -513,6 +513,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,shared,\ helpcontent2/source/text/shared/05/00000150 \ helpcontent2/source/text/shared/05/00000160 \ helpcontent2/source/text/shared/05/err_html \ + helpcontent2/source/text/shared/06/youtubevideos \ helpcontent2/source/text/shared/07/09000000 \ helpcontent2/source/text/shared/3dsettings_toolbar \ helpcontent2/source/text/shared/autokorr/01000000 \ diff --git a/help3xsl/default.css b/help3xsl/default.css index bf5bac86f6..1ae99162b6 100644 --- a/help3xsl/default.css +++ b/help3xsl/default.css @@ -255,6 +255,12 @@ h6 { .mediabutton { background-color: cyan; } +.mediadiv{ + padding-bottom:5%; + height:0; + display:inline-block; + border:none; +} .tintro { color: white; background-color: green; diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl index 0e3a64950b..467f093a9b 100644 --- a/help3xsl/online_transform.xsl +++ b/help3xsl/online_transform.xsl @@ -571,7 +571,7 @@ <!-- META, SEE HEADER --> <xsl:template match="meta" /> -<!-- OBJECT (UNUSED) --> +<!-- OBJECT --> <xsl:template match="object"><xsl:call-template name="insertobject"/></xsl:template> <xsl:template match="object" mode="embedded"><xsl:call-template name="insertobject"/></xsl:template> @@ -1071,32 +1071,38 @@ <!-- Insert an object --> <xsl:template name="insertobject"> - <xsl:variable name="data"> - <xsl:value-of select="concat($img_url_prefix,@data)"/> - </xsl:variable> - <p class="debug">Object: <xsl:value-of select="$data"/></p> - <xsl:variable name="type"><xsl:value-of select="@type"/></xsl:variable> - <xsl:variable name="width"> + <xsl:variable name="data"> + <xsl:value-of select="concat($img_url_prefix,@data)"/> + </xsl:variable> + <xsl:variable name="type"><xsl:value-of select="@type"/></xsl:variable> + <xsl:variable name="width"> <xsl:call-template name="convert2px"><xsl:with-param name="value" select="@width"/></xsl:call-template> - </xsl:variable> - <xsl:variable name="height"> + </xsl:variable> + <xsl:variable name="height"> <xsl:call-template name="convert2px"><xsl:with-param name="value" select="@height"/></xsl:call-template> - </xsl:variable> - <xsl:choose> - <xsl:when test="starts-with($type,'video')"> - <div id="mediadiv"> - <video src="{$data}" type="{$type}" width="{$width}" height="{$height}" controls="'1'"></video> - </div> + </xsl:variable> + <xsl:choose> + <xsl:when test="starts-with(@type,'video/youtube')"> + <xsl:if test="$online"> + <div id="mediadiv"> + <iframe id="{@id}" src="{@data}" width="{$width}" height="{$height}" frameborder="0" allowfullscreen="true"></iframe> + </div> + </xsl:if> </xsl:when> - <xsl:when test="starts-with($type,'audio')"> - <div id="mediadiv"> - <audio src="{$data}" type="{$type}" controls="'1'"></audio> - </div> + <xsl:when test="not(starts-with(@type,'video/youtube')) and starts-with(@type,'video')"> + <div id="mediadiv"> + <video src="{$data}" type="{@type}" width="{$width}" height="{$height}" controls="'1'"></video> + </div> + </xsl:when> + <xsl:when test="starts-with(@type,'audio')"> + <div id="mediadiv"> + <audio src="{$data}" type="{@type}" controls="'1'"></audio> + </div> </xsl:when> <xsl:otherwise> - <object width="{$width}" height="{$height}" data="{$data}" type="{$type}"></object> + <object width="{$width}" height="{$height}" data="{$data}" type="{@type}"></object> </xsl:otherwise> - </xsl:choose> + </xsl:choose> </xsl:template> <!-- changing measure to pixel --> diff --git a/source/text/scalc/main0000.xhp b/source/text/scalc/main0000.xhp index eda9ccda3f..c84f614d0e 100644 --- a/source/text/scalc/main0000.xhp +++ b/source/text/scalc/main0000.xhp @@ -31,6 +31,7 @@ <body> <bookmark xml-lang="en-US" branch="hid/SC_HID_SC_WIN_GRIDWIN" id="bm_id3155335" localize="false"/> <bookmark xml-lang="en-US" branch="hid/HID_GLOBAL_FALLBACK" id="bm_id3149255" localize="false"/><paragraph role="heading" id="hd_id3147338" xml-lang="en-US" level="1">Welcome to the $[officename] Calc Help</paragraph> +<embed href="text/shared/06/youtubevideos.xhp#whatisit"/> <paragraph role="heading" id="hd_id3153965" xml-lang="en-US" level="3">How to Work With $[officename] Calc</paragraph> <embed href="text/scalc/guide/main.xhp#main"/> <embed href="text/scalc/main0503.xhp#main0503"/> diff --git a/source/text/sdraw/main0000.xhp b/source/text/sdraw/main0000.xhp index 7405e92e8f..0606d82351 100644 --- a/source/text/sdraw/main0000.xhp +++ b/source/text/sdraw/main0000.xhp @@ -30,9 +30,10 @@ </history> </meta> <body> - - + + <bookmark branch="hid/SD_HID_SDGRAPHICVIEWSHELL" xml-lang="en-US" id="bm_id3155333" localize="false"/><bookmark branch="hid/HID_GLOBAL_FALLBACK" xml-lang="en-US" id="bm_id3154705" localize="false"/><paragraph role="heading" level="1" id="hd_id3155960" xml-lang="en-US">Welcome to the $[officename] Draw Help</paragraph> + <embed href="text/shared/06/youtubevideos.xhp#whatisit"/> <paragraph role="heading" level="3" id="hd_id3154022" xml-lang="en-US">How to Work With $[officename] Draw</paragraph> <embed href="text/sdraw/guide/main.xhp#main"/> <embed href="text/sdraw/main0503.xhp#main0503"/> diff --git a/source/text/shared/06/youtubevideos.xhp b/source/text/shared/06/youtubevideos.xhp new file mode 100644 index 0000000000..4418e95662 --- /dev/null +++ b/source/text/shared/06/youtubevideos.xhp @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<helpdocument version="1.0"> + <!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + --> + + <meta> + <topic id="embedyoutubevideo" indexer="include" status="PUBLISH"> + <title id="tit" xml-lang="en-US">YouTube Videos</title> + <filename>/text/shared/06/youtubevideos.xhp</filename> + </topic> + </meta> + <body> + <section id="whatisit"> + <object data="https://www.youtube-nocookie.com/embed/3KC0ZdcA6s8?rel=0" id="vid_id61521568603544" type="video/youtube" width="560" height="315" /> + </section> + </body> +</helpdocument> diff --git a/source/text/simpress/main0000.xhp b/source/text/simpress/main0000.xhp index ba61543b87..62ccefd7b7 100644 --- a/source/text/simpress/main0000.xhp +++ b/source/text/simpress/main0000.xhp @@ -18,7 +18,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . --> - + <helpdocument version="1.0"> <meta> <topic id="textsimpressmain0000xml" indexer="include" status="PUBLISH"> @@ -33,6 +33,7 @@ <bookmark xml-lang="en-US" branch="hid/SD_HID_SDDRAWVIEWSHELL" id="bm_id3150861" localize="false"/> <bookmark xml-lang="en-US" branch="hid/HID_GLOBAL_FALLBACK" id="bm_id3154560" localize="false"/> <paragraph role="heading" id="hd_id3150746" xml-lang="en-US" level="1">Welcome to the $[officename] Impress Help</paragraph> +<embed href="text/shared/06/youtubevideos.xhp#whatisit"/> <paragraph role="heading" id="hd_id3153000" xml-lang="en-US" level="3">How to Work With $[officename] Impress</paragraph> <embed href="text/simpress/guide/main.xhp#main"/> <embed href="text/simpress/main0503.xhp#main0503"/> diff --git a/source/text/smath/main0000.xhp b/source/text/smath/main0000.xhp index 621fdcb8db..1d5b939687 100644 --- a/source/text/smath/main0000.xhp +++ b/source/text/smath/main0000.xhp @@ -30,6 +30,7 @@ </meta> <body> <paragraph role="heading" id="hd_id3148868" xml-lang="en-US" level="1">Welcome to the $[officename] Math Help</paragraph> +<embed href="text/shared/06/youtubevideos.xhp#whatisit"/> <paragraph role="heading" id="hd_id3153915" xml-lang="en-US" level="3">How to Work With $[officename] Math</paragraph> <embed href="text/smath/guide/main.xhp#main"/> <embed href="text/smath/main0503.xhp#main0503"/> diff --git a/source/text/swriter/main0000.xhp b/source/text/swriter/main0000.xhp index d5f21323c1..2208f6172e 100644 --- a/source/text/swriter/main0000.xhp +++ b/source/text/swriter/main0000.xhp @@ -18,7 +18,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . --> - + <helpdocument version="1.0"> <meta> <topic id="textswritermain0000xml" indexer="include" status="PUBLISH"> @@ -33,6 +33,7 @@ <bookmark xml-lang="en-US" branch="hid/SW_HID_EDIT_WIN" id="bm_id3147244" localize="false"/> <bookmark xml-lang="en-US" branch="hid/HID_GLOBAL_FALLBACK" id="bm_id3147247" localize="false"/> <paragraph role="heading" id="hd_id3147233" xml-lang="en-US" level="1">%PRODUCTNAME Writer Help</paragraph> +<embed href="text/shared/06/youtubevideos.xhp#whatisit"/> <paragraph role="heading" id="hd_id3147258" xml-lang="en-US" level="3">Working With %PRODUCTNAME Writer</paragraph> <embed href="text/swriter/main0503.xhp#main0503"/> <embed href="text/swriter/guide/main.xhp#main"/> |