Skip to content

Commit

Permalink
Add more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-jung committed Jan 20, 2024
1 parent 78b016d commit 9177a89
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 24 deletions.
112 changes: 96 additions & 16 deletions framework/css/edit/style-slide.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,48 @@
}


/* ============================================================
* Block element border
*/
*[class~='slide/slide']:before(300),
*[class~='slide/slide-div']:before(300),
*[class~='slide/slide-p']:before(300) {
display: block;
padding-bottom: 10px;
padding-top: 10px;
border-left: 1px solid lightgray;
border-right: 1px solid lightgray;
border-top: 1px solid lightgray;
width: 740px;
padding-left: 10px;
}
*[class~='slide/slide'],
*[class~='slide/slide-div'],
*[class~='slide/slide-p'] {
display: block;
padding-bottom: 10px;
padding-top: 10px;
border: 1px solid lightgray;
width: 740px;
padding-right: 10px;
padding-left: 10px;
}
*[class~='slide/slide']:before,
*[class~='slide/slide-div']:before,
*[class~='slide/slide-p']:before {
content: ' ';
width: 750px;
display: block;
border-left: 1px solid lightgray;
border-right: 1px solid lightgray;
border-bottom: 1px solid lightgray;
}
*[class~='slide/slide']:not(:last-child)
*[class~='slide/slide-div']:not(:last-child),
*[class~='slide/slide-p']:not(:last-child) {
margin-bottom: 1.5em;
}


/* ============================================================
* Attributes
Expand Down Expand Up @@ -242,14 +284,6 @@
/* ============================================================
* <slide>
*/
*[class~='slide/slide']:before {
content: ' ';
width: 750px;
display: block;
border-left: 1px solid lightgray;
border-right: 1px solid lightgray;
border-bottom: 1px solid lightgray;
}

*[class~='slide/slide']:before(300) {
content:
Expand Down Expand Up @@ -391,14 +425,6 @@
)
)
);
display: block;
padding-bottom: 10px;
padding-top: 10px;
border-left: 1px solid lightgray;
border-right: 1px solid lightgray;
border-top: 1px solid lightgray;
width: 740px;
padding-left: 10px;
}


Expand Down Expand Up @@ -494,6 +520,60 @@
}


/* ============================================================
* <div>
*/
*[class~='topic/div'][class~='slide/slide-div']:before(300) {
content:
oxy_buttonGroup(
label, '<div>',
tooltip, 'Division',
actions,
oxy_action_list(
oxy_action(
name, 'outputclass',
description, 'outputclass',
operation, 'ro.sync.ecss.extensions.commons.operations.ChangeAttributeOperation',
arg-name, 'outputclass',
arg-value, ' '
),
oxy_action(
name, 'Delete',
description, 'Deletes the current element',
operation, 'ro.sync.ecss.extensions.commons.operations.DeleteElementOperation'
)
)
);
}


/* ============================================================
* <p>
*/
*[class~='topic/p'][class~='slide/slide-p']:before(300) {
content:
oxy_buttonGroup(
label, '<p>',
tooltip, 'Paragraph',
actions,
oxy_action_list(
oxy_action(
name, 'outputclass',
description, 'outputclass',
operation, 'ro.sync.ecss.extensions.commons.operations.ChangeAttributeOperation',
arg-name, 'outputclass',
arg-value, ' '
),
oxy_action(
name, 'Delete',
description, 'Deletes the current element',
operation, 'ro.sync.ecss.extensions.commons.operations.DeleteElementOperation'
)
)
);
}


/* ============================================================
* <h2>
*/
Expand Down
14 changes: 7 additions & 7 deletions rng/slideMod.rng
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,13 @@
<div>
<a:documentation>LONG NAME: Custom Slide Div</a:documentation>
<define name="slide-div.content">
<choice>
<ref name="div.cnt"/>
<oneOrMore>
<oneOrMore>
<choice>
<ref name="div.cnt"/>
<ref name="slide-div"/>
</oneOrMore>
<text/>
</choice>
<text/>
</choice>
</oneOrMore>
</define>
<define name="slide-div.attributes">
<ref name="univ-atts"/>
Expand Down Expand Up @@ -442,7 +442,7 @@
<choice>
<text/>
<ref name="basic.ph.notm"/>
<ref name="coderef"/>
<!--<ref name="coderef"/>-->
<ref name="data.elements.incl"/>
<ref name="foreign.unknown.incl"/>
<ref name="txt.incl"/>
Expand Down
3 changes: 2 additions & 1 deletion samples/layout-helpers/layout-helpers.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<topicref href="slide04.dita"/>
<topicref href="slide05.dita" keys="stretch"/>
<topicref href="slide06.dita"/>
<topicref href="slide02.dita" keys="stack"/>
<topicref href="slide07.dita" keys="stack"/>
<topicref href="slide08.dita"/>
<topicref href="slide02.dita" keys="hstack"/>
<topicref href="slide02.dita" keys="vstack"/>
</map>
13 changes: 13 additions & 0 deletions samples/layout-helpers/slide07.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?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="slide07">
<title>Stack</title>
<body>
<p>Stacks multiple elements on top of each other, for use with fragments.</p>
<pre><codeblock outputclass="language-html" data-trim=" " data-line-numbers=" ">&lt;div class="r-stack">
&lt;img class="fragment" width="450" height="350" src="..."/>
&lt;img class="fragment" width="350" height="450" src="..."/>
&lt;img class="fragment" width="400" height="400" src="..."/></codeblock></pre>
</body>
</slide>
14 changes: 14 additions & 0 deletions samples/layout-helpers/slide08.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?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="slide08">
<title>Stack Example</title>
<body>
<div outputclass=" r-stack">
<p outputclass="fragment fade-in-then-out">One</p>
<p outputclass="fragment fade-in-then-out">Two</p>
<p outputclass="fragment fade-in-then-out">Three</p>
<p outputclass="fragment fade-in-then-out">Four</p>
</div>
</body>
</slide>

0 comments on commit 9177a89

Please sign in to comment.