Skip to content

Commit 41dc3f0

Browse files
authored
Align HTML to specialized documentation (#310)
2 parents 921f14f + 2976558 commit 41dc3f0

30 files changed

Lines changed: 2940 additions & 959 deletions

sample/accordion.dita

Lines changed: 79 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
32
<!--
43
Within the sample documentation, where necessary, the texts describing the usage of each component have been copied
54
directly from the official Bootstrap 5.3 documentation (found at https://getbootstrap.com/docs/5.3), however DITA
@@ -8,6 +7,7 @@
87
This work is a derivative of "Bootstrap 5.3 docs" by Twitter, Inc. and the Bootstrap Authors,
98
and used under CC BY 3.0. See the accompanying LICENSE file for applicable licenses.
109
-->
10+
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
1111
<topic id="accordion">
1212
<title>Accordion</title>
1313
<shortdesc>Build vertically collapsing accordions in combination with Bootstrap’s Collapse JavaScript
@@ -20,6 +20,8 @@
2020
<indexterm><xmlatt>outputclass</xmlatt></indexterm>
2121
</indexterm>
2222
<indexterm><xmlelement>bodydiv</xmlelement></indexterm>
23+
<indexterm><xmlelement>accordion</xmlelement></indexterm>
24+
<indexterm><xmlelement>accordion-item</xmlelement></indexterm>
2325
</keywords>
2426
</metadata>
2527
</prolog>
@@ -32,13 +34,13 @@
3234
format="html"
3335
scope="external"
3436
>collapse</xref> internally to make it collapsible. To render an accordion that’s expanded, add
35-
<xmlatt>outputclass="show"</xmlatt> to expand the relevant <xmlelement>section</xmlelement> .</p>
37+
<xmlatt>open="yes"</xmlatt> to expand the relevant <xmlelement>accordion-item</xmlelement> .</p>
3638
</section>
3739
<section>
3840
<title>Example</title>
3941
<p>Click the accordions below to expand/collapse the accordion content.</p>
4042
</section>
41-
<bodydiv outputclass="bd-example" deliveryTarget="html">
43+
<bodydiv outputclass="p-3 border">
4244
<bodydiv outputclass="accordion">
4345
<section id="accordion1" outputclass="show">
4446
<title>Accordion Item #1</title>
@@ -66,7 +68,10 @@
6668
</section>
6769
</bodydiv>
6870
</bodydiv>
69-
<codeblock>&lt;bodydiv outputclass="accordion"&gt;
71+
<bodydiv outputclass="nav-pills mt-3">
72+
<section>
73+
<title><xmlatt>outputclass</xmlatt></title>
74+
<codeblock>&lt;bodydiv outputclass="accordion"&gt;
7075
&lt;section id="accordion1" outputclass="show"&gt;
7176
&lt;title&gt;Accordion Item #1&lt;/title&gt;
7277
&lt;p&gt;
@@ -98,47 +103,91 @@
98103
&lt;/p&gt;
99104
&lt;/section&gt;
100105
&lt;/bodydiv&gt;</codeblock>
106+
</section>
107+
<section>
108+
<title>Specialization</title>
109+
<codeblock>&lt;accordion&gt;
110+
&lt;accordion-item id="accordion1" open="yes"&gt;
111+
&lt;title&gt;Accordion Item #1&lt;/title&gt;
112+
&lt;p&gt;
113+
&lt;b&gt;This is the first item’s accordion body.&lt;/b&gt; It is shown by default,
114+
until the collapse plugin adds the appropriate classes that we use to style each element.
115+
These classes control the overall appearance, as well as the showing and hiding via CSS
116+
transitions. You can modify any of this with custom CSS or overriding Bootstrap’s default
117+
variables.
118+
&lt;/p&gt;
119+
&lt;/accordion-item&gt;
120+
&lt;accordion-item id="accordion2"&gt;
121+
&lt;title&gt;Accordion Item #2&lt;/title&gt;
122+
&lt;p&gt;
123+
&lt;b&gt;This is the second item’s accordion body.&lt;/b&gt; It is hidden by default,
124+
until the collapse plugin adds the appropriate classes that we use to style each element.
125+
These classes control the overall appearance, as well as the showing and hiding via CSS
126+
transitions. You can modify any of this with custom CSS or overriding Bootstrap’s default
127+
variables.
128+
&lt;/p&gt;
129+
&lt;/accordion-item&gt;
130+
&lt;accordion-item id="accordion3"&gt;
131+
&lt;title&gt;Accordion Item #3&lt;/title&gt;
132+
&lt;p&gt;
133+
&lt;b&gt;This is the third item’s accordion body.&lt;/b&gt; It is hidden by default,
134+
until the collapse plugin adds the appropriate classes that we use to style each element.
135+
These classes control the overall appearance, as well as the showing and hiding via CSS
136+
transitions. You can modify any of this with custom CSS or overriding Bootstrap’s default
137+
variables.
138+
&lt;/p&gt;
139+
&lt;/accordion-item&gt;
140+
&lt;/accordion&gt;</codeblock>
141+
</section>
142+
</bodydiv>
101143
<section>
102144
<title>Flush</title>
103-
<p>Add <xmlatt>outputclass="accordion-flush"</xmlatt> to remove the default
145+
<p>Set <xmlatt>flush="yes"</xmlatt> to remove the default
104146
background-color, some borders, and some rounded corners to render accordions edge-to-edge with their parent
105147
container.</p>
106148
</section>
107-
<bodydiv outputclass="bd-example" deliveryTarget="html">
149+
<bodydiv outputclass="p-3 border">
108150
<bodydiv outputclass="accordion-flush">
109151
<section id="accordion4">
110152
<title>Accordion Item #1</title>
111153
<p>
112-
Placeholder content for this accordion, which is intended to demonstrate <xmlatt
113-
>outputclass="accordion-flush"</xmlatt>.
154+
Placeholder content for this accordion, which is intended to demonstrate the use of <xmlatt>flush</xmlatt>
114155
This is the first item's accordion body.</p>
115156
</section>
116157
<section id="accordion5">
117158
<title>Accordion Item #2</title>
118-
<p>Placeholder content for this accordion, which is intended to demonstrate <xmlatt
119-
>outputclass="accordion-flush"</xmlatt>.
159+
<p>Placeholder content for this accordion, which is intended to demonstrate the use of <xmlatt>flush</xmlatt>
120160
This is the second item's accordion body. Let's imagine this being filled with some actual content.</p>
121161
</section>
122162
<section id="accordion6">
123163
<title>Accordion Item #3</title>
124164
<p>
125-
Placeholder content for this accordion, which is intended to demonstrate <xmlatt
126-
>outputclass="accordion-flush"</xmlatt>.
165+
Placeholder content for this accordion, which is intended to demonstrate the use of <xmlatt>flush</xmlatt>
127166
This is the third item's accordion body. Nothing more exciting happening here in terms of content, but just filling up the space
128167
to make it look, at least at first glance, a bit more representative of how this would look in a real-world application.</p>
129168
</section>
130169
</bodydiv>
131170
</bodydiv>
132-
<codeblock>&lt;bodydiv outputclass="accordion-flush"&gt;
171+
<bodydiv outputclass="nav-pills mt-3">
172+
<section>
173+
<title><xmlatt>outputclass</xmlatt></title>
174+
<codeblock>&lt;bodydiv outputclass="accordion-flush"&gt;
133175
...etc
134-
&lt;bodydiv&gt;</codeblock>
176+
&lt;/bodydiv&gt;</codeblock>
177+
</section>
178+
<section>
179+
<title>Specialization</title>
180+
<codeblock>&lt;accordion flush="yes"&gt;
181+
...etc
182+
&lt;/accordion&gt;</codeblock>
183+
</section>
184+
</bodydiv>
135185

136186
<section>
137187
<title>Always open</title>
138-
<p>Set <xmlelement
139-
>bodydiv outputclass="accordion-open"</xmlelement> to make accordion items stay open when another item is opened.</p>
188+
<p>Set <xmlatt>open="yes"</xmlatt> to make accordion items stay open when another item is opened.</p>
140189
</section>
141-
<bodydiv outputclass="bd-example" deliveryTarget="html">
190+
<bodydiv outputclass="p-3 border">
142191
<bodydiv outputclass="accordion-open">
143192
<section id="accordion7" outputclass="show">
144193
<title>Accordion Item #1</title>
@@ -166,8 +215,19 @@
166215
</section>
167216
</bodydiv>
168217
</bodydiv>
169-
<codeblock>&lt;bodydiv outputclass="accordion-open"&gt;
218+
<bodydiv outputclass="nav-pills mt-3">
219+
<section>
220+
<title><xmlatt>outputclass</xmlatt></title>
221+
<codeblock>&lt;bodydiv outputclass="accordion-open"&gt;
170222
...etc
171-
&lt;bodydiv&gt;</codeblock>
223+
&lt;/bodydiv&gt;</codeblock>
224+
</section>
225+
<section>
226+
<title>Specialization</title>
227+
<codeblock>&lt;accordion open="yes"&gt;
228+
...etc
229+
&lt;/accordion&gt;</codeblock>
230+
</section>
231+
</bodydiv>
172232
</body>
173233
</topic>

0 commit comments

Comments
 (0)