Skip to content

Commit ee9ca41

Browse files
committed
Merge branch 'release/5.3.1'
* release/5.3.1: (79 commits) Update remaining references to collapsible ToC Bump plug-in version to 5.3.1 Edit README to fix minor formatting issues Fix icons header file reference Switch nav-toc to collapsible for CI builds Formatting Bump icons to 1.8.1 © Update footer copyright ranges Run Prettier in CI check Bump devDependencies Reformat Fix indentation Reformat Re-run Prettier More frame options: Additional table frame support Update CSS, improve accessibility Amend padding Add collapse support Correct text. ...
2 parents 34f1338 + 8a642ec commit ee9ca41

File tree

135 files changed

+4704
-304
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+4704
-304
lines changed

.github/dita-ot/favicon.svg

Lines changed: 15 additions & 0 deletions
Loading

.github/dita-ot/footer.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</p>
2929
<p class="p-3">
3030
<small>
31-
© 2021
31+
© 2017–2022
3232
<a class="text-dark" href="https://infotexture.net/">infotexture</a>
3333
</small>
3434
</p>

.github/dita-ot/header.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<nav class="navbar navbar-expand-lg navbar-dark bg-primary mb-4">
1+
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
22

33
<div class="container">
44
<a class="navbar-brand" href="https://infotexture.github.io/dita-bootstrap">
@@ -53,7 +53,7 @@
5353
<li class="nav-item">
5454
<a
5555
class="nav-link"
56-
href="https://getbootstrap.com/docs/5.0"
56+
href="https://getbootstrap.com/docs/5.1"
5757
>Bootstrap Docs</a>
5858
</li>
5959
</ul>

.github/dita-ot/html.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@
1515
<param name="args.css" value="theme.css"/>
1616
<param name="args.csspath" value="css"/>
1717
<param name="args.cssroot" path="."/>
18+
<param name="args.favicon" value="favicon.svg"/>
19+
<param name="args.faviconpath" value="favicon"/>
20+
<param name="args.faviconroot" path="."/>
1821
<param name="args.hdr" href="header.xml"/>
1922
<param name="args.ftr" href="footer.xml"/>
2023
<param name="html5.toc.generate" value="no"/>
2124
<param name="args.rellinks" value="none"/>
22-
<param name="nav-toc" value="list-group-full"/>
25+
<param name="nav-toc" value="collapsible"/>
2326
<param name="processing-mode" value="strict"/>
2427
<param name="icons.include" value="yes"/>
28+
<param name="popovers.include" value="yes"/>
2529
</publication>
2630
</deliverable>
2731
</project>

.github/dita-ot/theme.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77

88
/* ↓ Additional custom overrides ↓ */
99

10-
.list-group-item-dark {
11-
background-color: #e7f1ff;
12-
}
13-
1410
footer {
1511
background-color: #e7f1ff;
1612
border-top: 1px solid rgba(0, 0, 0, 0.125);

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ jobs:
2121
apt-get install -qy --no-install-recommends nodejs
2222
nodejs -v
2323
plugins: |
24-
https://github.com/jason-fox/fox.jason.extend.css/archive/master.zip
24+
fox.jason.extend.css
2525
https://github.com/infotexture/dita-bootstrap/archive/develop.zip
26-
https://github.com/jason-fox/fox.jason.prismjs/archive/master.zip
26+
fox.jason.prismjs
27+
fox.jason.favicon
2728
project: .github/dita-ot/html.xml
2829
- name: Deploy HTML 🚀
2930
uses: JamesIves/github-pages-deploy-action@3.7.1

.github/workflows/prettier.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow checks code formatting
2+
3+
name: Run Prettier
4+
5+
# This action works with pull requests and pushes
6+
7+
on:
8+
pull_request:
9+
push:
10+
branches:
11+
# Push events on development branch
12+
- develop
13+
14+
jobs:
15+
prettier:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
with:
22+
# Make sure the actual branch is checked out when running on pull requests
23+
ref: ${{ github.ref }}
24+
25+
- name: Prettify code
26+
uses: creyD/prettier_action@v3.3
27+
with:
28+
# This part is also where you can pass other options, for example:
29+
prettier_options: --write **/*.{css,dita*,json,md,xml,yml}
30+
# Install Prettier XML plugin
31+
prettier_plugins: '@prettier/plugin-xml'
32+
# Runs the action in dry mode. Files wont get changed and the action fails if there are unprettified files.
33+
dry: true

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# This file specifies files that Prettier should not format
22

33
backups
4+
cfg/common/vars/strings.xml
45
out

.prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
"printWidth": 80
2828
}
2929
},
30+
{
31+
"files": "strings-*.xml",
32+
"options": {
33+
"printWidth": 100
34+
}
35+
},
3036
{
3137
"files": "*.xsl",
3238
"options": {

Customization/xsl/accordion.xsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
exclude-result-prefixes="xs xhtml dita-ot"
1313
>
1414
<!-- Customization to add Bootstrap Accordion Component -->
15-
<!-- https://getbootstrap.com/docs/5.0/components/accordion/ -->
15+
<!-- https://getbootstrap.com/docs/5.1/components/accordion/ -->
1616

1717
<xsl:template match="*[contains(@class,' topic/bodydiv ') and contains(@outputclass, 'accordion')]">
1818
<div>

Customization/xsl/breadcrumb.xsl

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
This file is part of the DITA Bootstrap plug-in for DITA Open Toolkit.
4+
See the accompanying LICENSE file for applicable licenses.
5+
-->
6+
<xsl:stylesheet
7+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
9+
xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot"
10+
xmlns:ditamsg="http://dita-ot.sourceforge.net/ns/200704/ditamsg"
11+
version="2.0"
12+
exclude-result-prefixes="xs dita-ot ditamsg"
13+
>
14+
<!-- Override to add Bootstrap breadcrumb component -->
15+
<!-- https://getbootstrap.com/docs/5.1/components/breadcrumb/ -->
16+
17+
<!-- Whether include a bootstrap breadcrumb component on each page. values are 'yes' or 'no' -->
18+
<xsl:param name="BREADCRUMBS" select="'no'"/>
19+
<!-- Dividers can be changed via an input parameter -->
20+
<xsl:param name="BREADCRUMB_DIVIDER" select="'/'"/>
21+
22+
<!-- Add Bootstrap breadcrumb -->
23+
<xsl:template match="*" mode="gen-user-breadcrumb">
24+
25+
<nav aria-label="breadcrumb">
26+
<xsl:if test="not($BREADCRUMB_DIVIDER = '/')">
27+
<xsl:attribute name="style">
28+
<xsl:text>--bs-breadcrumb-divider: '</xsl:text>
29+
<xsl:value-of select="$BREADCRUMB_DIVIDER"/>
30+
<xsl:text>';</xsl:text>
31+
</xsl:attribute>
32+
</xsl:if>
33+
34+
<ol class="breadcrumb">
35+
<xsl:for-each select="ancestor::node()">
36+
<xsl:variable name="title">
37+
<xsl:apply-templates select="." mode="get-navtitle"/>
38+
</xsl:variable>
39+
<xsl:if test="normalize-space($title)">
40+
<li class="breadcrumb-item">
41+
<xsl:choose>
42+
<xsl:when test="@href">
43+
<a>
44+
<xsl:attribute name="href">
45+
<xsl:if test="not(@scope = 'external')">
46+
<xsl:value-of select="$PATH2PROJ"/>
47+
</xsl:if>
48+
<xsl:choose>
49+
<xsl:when
50+
test="@copy-to and not(contains(@chunk, 'to-content')) and
51+
(not(@format) or @format = 'dita' or @format = 'ditamap') "
52+
>
53+
<xsl:call-template name="replace-extension">
54+
<xsl:with-param name="filename" select="@copy-to"/>
55+
<xsl:with-param name="extension" select="$OUTEXT"/>
56+
</xsl:call-template>
57+
<xsl:if test="not(contains(@copy-to, '#')) and contains(@href, '#')">
58+
<xsl:value-of select="concat('#', substring-after(@href, '#'))"/>
59+
</xsl:if>
60+
</xsl:when>
61+
<xsl:when
62+
test="not(@scope = 'external') and (not(@format) or @format = 'dita' or @format = 'ditamap')"
63+
>
64+
<xsl:call-template name="replace-extension">
65+
<xsl:with-param name="filename" select="@href"/>
66+
<xsl:with-param name="extension" select="$OUTEXT"/>
67+
</xsl:call-template>
68+
</xsl:when>
69+
<xsl:otherwise>
70+
<xsl:value-of select="@href"/>
71+
</xsl:otherwise>
72+
</xsl:choose>
73+
</xsl:attribute>
74+
<xsl:value-of select="$title"/>
75+
</a>
76+
</xsl:when>
77+
<xsl:otherwise>
78+
<span>
79+
<xsl:value-of select="$title"/>
80+
</span>
81+
</xsl:otherwise>
82+
</xsl:choose>
83+
</li>
84+
</xsl:if>
85+
</xsl:for-each>
86+
<xsl:variable name="title">
87+
<xsl:apply-templates select="." mode="get-navtitle"/>
88+
</xsl:variable>
89+
<xsl:if test="normalize-space($title)">
90+
<li class="breadcrumb-item active" aria-current="page">
91+
<xsl:value-of select="$title"/>
92+
</li>
93+
</xsl:if>
94+
</ol>
95+
</nav>
96+
</xsl:template>
97+
98+
99+
</xsl:stylesheet>

Customization/xsl/card.xsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1313
>
1414
<!-- Customization to add Bootstrap Card Component -->
15-
<!-- https://getbootstrap.com/docs/5.0/components/card/ -->
15+
<!-- https://getbootstrap.com/docs/5.1/components/card/ -->
1616

1717
<xsl:template match="*[contains(@class,' topic/section ') and contains(@outputclass, 'card')]">
1818
<div>

Customization/xsl/carousel.xsl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
exclude-result-prefixes="xs xhtml dita-ot"
1313
>
1414
<!-- Customization to add Bootstrap Carousel Component -->
15-
<!-- https://getbootstrap.com/docs/5.0/components/carousel/ -->
15+
<!-- https://getbootstrap.com/docs/5.1/components/carousel/ -->
1616

1717
<xsl:template
1818
match="*[ (contains(@class,' topic/ul ') or contains(@class, ' topic/ol ')) and contains(@outputclass, 'carousel')]"
@@ -29,12 +29,20 @@
2929
<a class="carousel-control-prev" role="button" data-bs-slide="prev">
3030
<xsl:attribute name="data-bs-target" select="concat('#' , $id)"/>
3131
<span class="carousel-control-prev-icon" aria-hidden="true"/>
32-
<span class="visually-hidden">Previous</span>
32+
<span class="visually-hidden">
33+
<xsl:call-template name="getVariable">
34+
<xsl:with-param name="id" select="'Previous'"/>
35+
</xsl:call-template>
36+
</span>
3337
</a>
3438
<a class="carousel-control-next" role="button" data-bs-slide="next">
3539
<xsl:attribute name="data-bs-target" select="concat('#' , $id)"/>
3640
<span class="carousel-control-next-icon" aria-hidden="true"/>
37-
<span class="visually-hidden">Next</span>
41+
<span class="visually-hidden">
42+
<xsl:call-template name="getVariable">
43+
<xsl:with-param name="id" select="'Next'"/>
44+
</xsl:call-template>
45+
</span>
3846
</a>
3947
</div>
4048
</xsl:template>

Customization/xsl/collapse.xsl

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
This file is part of the DITA Bootstrap plug-in for DITA Open Toolkit.
4+
See the accompanying LICENSE file for applicable licenses.
5+
-->
6+
<xsl:stylesheet
7+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8+
xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot"
9+
xmlns:xhtml="http://www.w3.org/1999/xhtml"
10+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
11+
version="2.0"
12+
exclude-result-prefixes="xs xhtml dita-ot"
13+
>
14+
<!-- Customization to add Bootstrap Collapse Component -->
15+
<!-- https://getbootstrap.com/docs/5.1/components/collapse/ -->
16+
17+
<xsl:template match="*[contains(@class,' topic/bodydiv ') and contains(@outputclass, 'collapse-horizontal')]">
18+
<xsl:variable name="id" select="dita-ot:generate-html-id(.)"/>
19+
<div>
20+
<xsl:if test="contains(@otherprops, 'style(')">
21+
<xsl:attribute name="style">
22+
<xsl:analyze-string select="@otherprops" regex="[a-z]*\([^\)]*\)">
23+
<xsl:matching-substring>
24+
<xsl:variable name="var">
25+
<xsl:value-of select="."/>
26+
</xsl:variable>
27+
<xsl:variable name="attr">
28+
<xsl:value-of select="substring-before($var, '(')"/>
29+
</xsl:variable>
30+
<xsl:attribute name="{$attr}">
31+
<xsl:value-of select="substring-before(substring-after($var, '('),')')"/>
32+
</xsl:attribute>
33+
</xsl:matching-substring>
34+
</xsl:analyze-string>
35+
</xsl:attribute>
36+
</xsl:if>
37+
<div>
38+
<xsl:attribute name="id" select="$id"/>
39+
<xsl:call-template name="commonattributes"/>
40+
<xsl:apply-templates/>
41+
</div>
42+
</div>
43+
</xsl:template>
44+
45+
<xsl:template match="*[contains(@class, ' topic/div ') and contains(@otherprops, 'style(')]">
46+
<div>
47+
<xsl:call-template name="commonattributes"/>
48+
<xsl:call-template name="setid"/>
49+
<xsl:attribute name="style">
50+
<xsl:analyze-string select="@otherprops" regex="[a-z]*\([^\)]*\)">
51+
<xsl:matching-substring>
52+
<xsl:variable name="var">
53+
<xsl:value-of select="."/>
54+
</xsl:variable>
55+
<xsl:variable name="attr">
56+
<xsl:value-of select="substring-before($var, '(')"/>
57+
</xsl:variable>
58+
<xsl:attribute name="{$attr}">
59+
<xsl:value-of select="substring-before(substring-after($var, '('),')')"/>
60+
</xsl:attribute>
61+
</xsl:matching-substring>
62+
</xsl:analyze-string>
63+
</xsl:attribute>
64+
<xsl:apply-templates/>
65+
</div>
66+
</xsl:template>
67+
68+
69+
<!-- Override to connect an collapsed element to a button -->
70+
<xsl:template match="*[contains(@class,' topic/xref ') and contains(@props, 'collapse-toggle')]">
71+
<xsl:variable name="href" select="replace(@href, '#', '')"/>
72+
<xsl:variable name="id" select="dita-ot:generate-html-id(//*[@id=$href])"/>
73+
74+
<a data-bs-toggle="collapse">
75+
<xsl:call-template name="commonattributes"/>
76+
<xsl:attribute name="href" select="concat('#',$id)"/>
77+
<xsl:attribute name="aria-expanded" select="'false'"/>
78+
<xsl:attribute name="aria-controls" select="$id"/>
79+
<xsl:apply-templates/>
80+
</a>
81+
</xsl:template>
82+
</xsl:stylesheet>

0 commit comments

Comments
 (0)