diff --git a/catalog-dita.xml b/catalog-dita.xml index c355554..caaa787 100644 --- a/catalog-dita.xml +++ b/catalog-dita.xml @@ -2,36 +2,18 @@ - - - - - - - - - - - - - - - - - - diff --git a/framework/css/edit/style-slide-helper.css b/framework/css/edit/style-slide-helper.css index 1e39f21..e130f64 100644 --- a/framework/css/edit/style-slide-helper.css +++ b/framework/css/edit/style-slide-helper.css @@ -15,7 +15,9 @@ *[class~='slide/slide'][data-background-repeat]:before(277), *[class~='slide/slide'][data-background-opacity]:before(275), *[class~='slide/slide'][data-background-video]:before(273), -*[class~='slide/slide'][data-background-video-loop]:before(271) { +*[class~='slide/slide'][data-background-video-loop]:before(271), +*[class~='slide/slide'][data-background-video-muted]:before(269), +*[class~='slide/slide'][data-auto-animate-unmatched]:before(267){ margin-bottom: 0.5em; font-size: 0.8em; color: gray; @@ -97,4 +99,7 @@ content: "Background video mute." } - +/* @data-auto-animate-unmatched */ +*[class~='slide/slide'][data-auto-animate-unmatched]:before(267) { + content: "Auto animate unmatched." +} diff --git a/framework/css/edit/style-slide.css b/framework/css/edit/style-slide.css index 7ce5390..4b9dbfa 100644 --- a/framework/css/edit/style-slide.css +++ b/framework/css/edit/style-slide.css @@ -161,7 +161,8 @@ *[class~='slide/slide'][data-background-opacity]:before(276), *[class~='slide/slide'][data-background-video]:before(274), *[class~='slide/slide'][data-background-video-loop]:before(272), -*[class~='slide/slide'][data-background-video-muted]:before(270) { +*[class~='slide/slide'][data-background-video-muted]:before(270), +*[class~='slide/slide'][data-auto-animate-unmatched]:before(268) { display: block } @@ -280,6 +281,13 @@ oxy_textfield(edit, '@data-background-video-muted', columns, 40); } +/* @data-auto-animate-unmatched */ +*[class~='slide/slide'][data-auto-animate-unmatched]:before(268) { + content: + oxy_label(text, "data-auto-animate-unmatched", width, 10em, color, inherit) + oxy_textfield(edit, '@data-auto-animate-unmatched', columns, 40); +} + *[class~='topic/table'] { border: none !important; padding-top: 2px; diff --git a/framework/templates/Slide.dita b/framework/templates/Slide.dita index 08c3fb7..9a777de 100644 --- a/framework/templates/Slide.dita +++ b/framework/templates/Slide.dita @@ -3,6 +3,6 @@ Title of slide - - + + diff --git a/rng/dataFragmentIndexAttDomain.rng b/rng/dataFragmentIndexAttDomain.rng deleted file mode 100755 index 6732543..0000000 --- a/rng/dataFragmentIndexAttDomain.rng +++ /dev/null @@ -1,64 +0,0 @@ - - - - - DITA Data Fragment Index Attribute Domain - -======================================================================================================================== - HEADER -======================================================================================================================== - MODULE: DITA Data Fragment Index Attribute Domain - VERSION: 1.3 - DATE: October 2018 - -======================================================================================================================== - PUBLIC DOCUMENT TYPE DEFINITION TYPICAL INVOCATION - - Refer to this file by the following public identifier or an appropriate system identifier - PUBLIC "-//Stefan Jung//ENTITIES DITA Data Fragment Index Domain//EN" - - Delivered as file "dataFragmentIndexAttDomain.rng" - -======================================================================================================================== - - SYSTEM: Darwin Information Typing Architecture (DITA) - - PURPOSE: Declaring the substitution context and domain entity - declarations for the Data Fragment Index Attribute Domain - - ORIGINAL CREATION DATE: - October 2018 - - (C) Copyright Stefan Jung 2023 - All Rights Reserved. - -======================================================================================================================== - - - attributedomain - dataFragmentIndexAtt-d - - -//Stefan Jung//ENTITIES DITA Data Fragment Index Domain//EN - urn:jung:dita:xsd:dataFragmentIndexAttDomain.xsd - urn:jung:dita:rnc:dataFragmentIndexAttDomain.rnc - urn:jung:dita:rng:dataFragmentIndexAttDomain.rng - - a(base data-fragment-index) - - - - - - Defines the sequence of slide fragments. - - - - - - - - \ No newline at end of file diff --git a/rng/fragmentAttDomain.rng b/rng/fragmentAttDomain.rng deleted file mode 100755 index 0e0c9aa..0000000 --- a/rng/fragmentAttDomain.rng +++ /dev/null @@ -1,75 +0,0 @@ - - - - - DITA Fragment Attribute Domain - -======================================================================================================================== - HEADER -======================================================================================================================== - MODULE: DITA Fragment Attribute Domain - VERSION: 1.3 - DATE: October 2018 - -======================================================================================================================== - PUBLIC DOCUMENT TYPE DEFINITION TYPICAL INVOCATION - - Refer to this file by the following public identifier or an appropriate system identifier - PUBLIC "-//Stefan Jung//ENTITIES DITA Fragment Domain//EN" - - Delivered as file "fragmentAttDomain.rng" - -======================================================================================================================== - - SYSTEM: Darwin Information Typing Architecture (DITA) - - PURPOSE: Declaring the substitution context and domain entity - declarations for the Fragment Attribute Domain - - ORIGINAL CREATION DATE: - October 2018 - - (C) Copyright Stefan Jung 2023 - All Rights Reserved. - -======================================================================================================================== - - - attributedomain - fragmentAtt-d - - -//Stefan Jung//ENTITIES DITA Fragment Domain//EN - urn:jung:dita:xsd:fragmentAttDomain.xsd - urn:jung:dita:rnc:fragmentAttDomain.rnc - urn:jung:dita:rng:fragmentAttDomain.rng - - a(base fragment) - - - - - - Slide fragment. - - grow - shrink - fade-out - fade-up - fade-in-then-out - fade-in-then-semi-out - highlight-current-blue - highlight-red - highlight-green - highlight-blue - - - - - - - - \ No newline at end of file diff --git a/rng/slide.rng b/rng/slide.rng index c1bcced..f35262f 100644 --- a/rng/slide.rng +++ b/rng/slide.rng @@ -81,9 +81,7 @@ (topic sw-d) (topic ui-d) (topic ut-d) - a(props deliveryTarget) - a(base data-fragment-index) - a(base fragment)"/> + a(props deliveryTarget)"/> @@ -114,8 +112,6 @@ - -
diff --git a/rng/slideMod.rng b/rng/slideMod.rng index b477c7a..39d9f39 100644 --- a/rng/slideMod.rng +++ b/rng/slideMod.rng @@ -27,10 +27,10 @@ SYSTEM: Darwin Information Typing Architecture (DITA) - PURPOSE: Define elements and specialization atttributes for Termentries + PURPOSE: Define elements and attributes for Slides ORIGINAL CREATION DATE: - March 2017 + March 2023 (C) Copyright Stefan Jung 2023 All Rights Reserved. @@ -57,9 +57,6 @@ - - -
@@ -67,11 +64,11 @@ - - + + - - + + @@ -92,7 +89,7 @@
COMMON ELEMENT SETS - + @@ -105,16 +102,16 @@ Elements common to slide body-like contexts - + - + - - + + @@ -139,7 +136,7 @@ - + @@ -272,15 +269,15 @@
LONG NAME: Slide Body - + - + - + - + @@ -291,40 +288,40 @@ - - - The <slideBody> element contains the body of a term. + + + The <slide-body> element contains the body of a term. Category: Slide elements - - + + - - + +
LONG NAME: Speaker Notes - + - + - - + + Category: Slide elements - - + + - - + +
@@ -409,6 +406,9 @@ + + + preserve @@ -417,6 +417,7 @@ + @@ -427,7 +428,6 @@ - @@ -556,6 +556,9 @@ + + + @@ -573,10 +576,10 @@
SPECIALIZATION ATTRIBUTE DECLARATIONS - + - + @@ -585,10 +588,10 @@ - + - + @@ -600,7 +603,7 @@ - + diff --git a/samples/auto-animate/auto-animate.ditamap b/samples/auto-animate/auto-animate.ditamap index 1eb25f2..c5ab76a 100644 --- a/samples/auto-animate/auto-animate.ditamap +++ b/samples/auto-animate/auto-animate.ditamap @@ -3,4 +3,7 @@ + + + diff --git a/samples/auto-animate/slide01.dita b/samples/auto-animate/slide01.dita index c159a27..22df270 100644 --- a/samples/auto-animate/slide01.dita +++ b/samples/auto-animate/slide01.dita @@ -1,15 +1,15 @@ - + Auto-Animate Example - -

This will fade out

- - + + This will fade out + + function Example() { const [count, setCount] = useState(0); } -
+
diff --git a/samples/auto-animate/slide02.dita b/samples/auto-animate/slide02.dita index 9dc5f16..b7b1ffe 100644 --- a/samples/auto-animate/slide02.dita +++ b/samples/auto-animate/slide02.dita @@ -1,9 +1,18 @@ - + Title of slide - -

-
+ + Auto-Animate Example + This will fade out + This element is unmatched + + + function Example() { + New line! + const [count, setCount] = useState(0); + } + +
diff --git a/samples/auto-animate/slide03.dita b/samples/auto-animate/slide03.dita new file mode 100644 index 0000000..108a1b4 --- /dev/null +++ b/samples/auto-animate/slide03.dita @@ -0,0 +1,9 @@ + + + + + + <slide-body> + <slide-p style="background: #555; line-height: 1em; letter-spacing: 0em;" data-id="text-props">Line Height & Letter Spacing</slide-p> + </slide-body> +</slide> diff --git a/samples/auto-animate/slide04.dita b/samples/auto-animate/slide04.dita new file mode 100644 index 0000000..3069297 --- /dev/null +++ b/samples/auto-animate/slide04.dita @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-model href="urn:jung:dita:rng:slide.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> +<?xml-model href="urn:jung:dita:rng:slide.rng" schematypens="http://purl.oclc.org/dsdl/schematron"?> +<slide id="ui_xvm_wwx_11c" data-auto-animate=""> + <title/> + <slide-body> + <slide-p style="background: #555; line-height: 3em; letter-spacing: 0.2em;" data-id="text-props">Line Height & Letter Spacing</slide-p> + </slide-body> +</slide> diff --git a/samples/auto-animate/slide05.dita b/samples/auto-animate/slide05.dita new file mode 100644 index 0000000..8c2fb06 --- /dev/null +++ b/samples/auto-animate/slide05.dita @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-model href="urn:jung:dita:rng:slide.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> +<?xml-model href="urn:jung:dita:rng:slide.rng" schematypens="http://purl.oclc.org/dsdl/schematron"?> +<slide id="slide05" data-auto-animate=""> + <title/> + <slide-body> + <slide-pre data-id="code"><slide-codeblock data-line-numbers="" outputclass="hljs" data-trim="">import React, { useState } from 'react'; + +function Example() { + const [count, setCount] = useState(0); + + return ( + ... + ); +} </slide-codeblock></slide-pre> + </slide-body> + <slide id="slide05-02" data-auto-animate=""> + <title/> + <slide-body> + <slide-pre data-id="code"><slide-codeblock data-line-numbers="" outputclass="hljs" data-trim="">function Example() { + const [count, setCount] = useState(0); + + return ( + <div> + <p>You clicked {count} times</p> + <button onClick={() => setCount(count + 1)}> + Click me + </button> + </div> + ); +} </slide-codeblock></slide-pre> + </slide-body> + </slide> +</slide> diff --git a/xsl/reveal.xsl b/xsl/reveal.xsl index ebf027c..25cb8e9 100644 --- a/xsl/reveal.xsl +++ b/xsl/reveal.xsl @@ -172,6 +172,25 @@ <xsl:variable name="allSlidesAsFirstLevel"> <!-- The slide which contains other slides, copied to output but ignoring sub-slides --> <section> + <!--<xsl:attribute name="HELLO3">WORLD3</xsl:attribute>--> + <xsl:copy-of select=" + @data-auto-animate + | @data-auto-animate-duration + | @data-auto-animate-easing + | @data-auto-animate-unmatched + | @data-background + | @data-background-color + | @data-background-gradient + | @data-background-image + | @data-background-size + | @data-background-position + | @data-background-repeat + | @data-background-opacity + | @data-transition + | @data-background-video + | @data-background-video-loop + | @data-background-video-muted + "/> <xsl:apply-templates mode="reveal-slide-attributes"/> <!--<xsl:attribute name="test" select="'value'"/>--> <xsl:apply-templates mode="all-but-topicContainer"/> @@ -179,6 +198,26 @@ <!-- For each subslide, copy to output but ignore sub-slides --> <xsl:for-each select=".//topicContainer"> <section> + <xsl:attribute name="HELLO4">WORLD4</xsl:attribute> + <!-- This works --> + <xsl:copy-of select=" + @data-auto-animate + | @data-auto-animate-duration + | @data-auto-animate-easing + | @data-auto-animate-unmatched + | @data-background + | @data-background-color + | @data-background-gradient + | @data-background-image + | @data-background-size + | @data-background-position + | @data-background-repeat + | @data-background-opacity + | @data-transition + | @data-background-video + | @data-background-video-loop + | @data-background-video-muted + "/> <xsl:apply-templates mode="all-but-topicContainer"/> </section> </xsl:for-each> @@ -187,6 +226,25 @@ <xsl:when test="$reveal.generate.vertical.slides = 'true'"> <!-- Generate vertical slides, so wrap in a <section> element --> <section> + <!--<xsl:attribute name="HELLO5">WORLD5</xsl:attribute>--> + <xsl:copy-of select=" + @data-auto-animate + | @data-auto-animate-duration + | @data-auto-animate-easing + | @data-auto-animate-unmatched + | @data-background + | @data-background-color + | @data-background-gradient + | @data-background-image + | @data-background-size + | @data-background-position + | @data-background-repeat + | @data-background-opacity + | @data-transition + | @data-background-video + | @data-background-video-loop + | @data-background-video-muted + "/> <xsl:copy-of select="$allSlidesAsFirstLevel"/> </section> </xsl:when> @@ -373,6 +431,7 @@ <!-- Process slides - Override template from dita2xhtml-util.xsl --> <xsl:template match="nav | section | figure | article" mode="add-xhtml-ns" priority="20"> <xsl:element name="section" namespace="http://www.w3.org/1999/xhtml"> + <xsl:attribute name="HELLO">WORLD</xsl:attribute> <xsl:apply-templates select="@* except @role | node()" mode="add-xhtml-ns"/> </xsl:element> </xsl:template> @@ -388,6 +447,7 @@ <xsl:call-template name="commonattributes"/> <xsl:call-template name="gen-toc-id"/> <xsl:call-template name="setidaname"/> + <xsl:attribute name="HELLO2">WORLD2</xsl:attribute> <xsl:apply-templates select="*[contains(@class, ' ditaot-d/ditaval-startprop ')]" mode="out-of-line"/> <xsl:apply-templates select="*[not(contains(@class, ' topic/title '))] | text() | comment() | processing-instruction()"/> <xsl:apply-templates select="*[contains(@class, ' ditaot-d/ditaval-endprop ')]" mode="out-of-line"/> @@ -426,7 +486,7 @@ </xsl:template> <!-- reveal.js fragment elements --> - <xsl:template match="*[contains(@class, ' topic/p ')]" name="topic.p"> + <!--<xsl:template match="*[contains(@class, ' topic/p ')]" name="topic.p"> <xsl:choose> <xsl:when test="descendant::*[dita-ot:is-block(.)]"> <div class="p"> @@ -449,7 +509,7 @@ </p> </xsl:otherwise> </xsl:choose> - </xsl:template> + </xsl:template>--> <xsl:template match="*[contains(@class, ' slide/slide-div ')]"> <div> @@ -468,7 +528,7 @@ </xsl:template> <xsl:template match="*[contains(@class, ' slide/slide-image ')]"> - <img> + <img src="{@href}"> <xsl:copy-of select="@style"/> <xsl:apply-templates/> </img> @@ -495,14 +555,13 @@ @data-trim | @data-line-numbers "/> - <xsl:call-template name="commonattributes"/> <xsl:apply-templates/> </code> </xsl:template> - <xsl:template match="@data-transition" mode="reveal-slide-attributes"> + <!--<xsl:template match="@data-transition" mode="reveal-slide-attributes"> <xsl:value-of select="."/> - </xsl:template> + </xsl:template>--> </xsl:stylesheet>