-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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. ...
- Loading branch information
Showing
135 changed files
with
4,704 additions
and
304 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,9 +21,10 @@ jobs: | |
apt-get install -qy --no-install-recommends nodejs | ||
nodejs -v | ||
plugins: | | ||
https://github.com/jason-fox/fox.jason.extend.css/archive/master.zip | ||
fox.jason.extend.css | ||
https://github.com/infotexture/dita-bootstrap/archive/develop.zip | ||
https://github.com/jason-fox/fox.jason.prismjs/archive/master.zip | ||
fox.jason.prismjs | ||
fox.jason.favicon | ||
project: .github/dita-ot/html.xml | ||
- name: Deploy HTML 🚀 | ||
uses: JamesIves/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# This workflow checks code formatting | ||
|
||
name: Run Prettier | ||
|
||
# This action works with pull requests and pushes | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
# Push events on development branch | ||
- develop | ||
|
||
jobs: | ||
prettier: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
# Make sure the actual branch is checked out when running on pull requests | ||
ref: ${{ github.ref }} | ||
|
||
- name: Prettify code | ||
uses: creyD/[email protected] | ||
with: | ||
# This part is also where you can pass other options, for example: | ||
prettier_options: --write **/*.{css,dita*,json,md,xml,yml} | ||
# Install Prettier XML plugin | ||
prettier_plugins: '@prettier/plugin-xml' | ||
# Runs the action in dry mode. Files wont get changed and the action fails if there are unprettified files. | ||
dry: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# This file specifies files that Prettier should not format | ||
|
||
backups | ||
cfg/common/vars/strings.xml | ||
out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
This file is part of the DITA Bootstrap plug-in for DITA Open Toolkit. | ||
See the accompanying LICENSE file for applicable licenses. | ||
--> | ||
<xsl:stylesheet | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot" | ||
xmlns:ditamsg="http://dita-ot.sourceforge.net/ns/200704/ditamsg" | ||
version="2.0" | ||
exclude-result-prefixes="xs dita-ot ditamsg" | ||
> | ||
<!-- Override to add Bootstrap breadcrumb component --> | ||
<!-- https://getbootstrap.com/docs/5.1/components/breadcrumb/ --> | ||
|
||
<!-- Whether include a bootstrap breadcrumb component on each page. values are 'yes' or 'no' --> | ||
<xsl:param name="BREADCRUMBS" select="'no'"/> | ||
<!-- Dividers can be changed via an input parameter --> | ||
<xsl:param name="BREADCRUMB_DIVIDER" select="'/'"/> | ||
|
||
<!-- Add Bootstrap breadcrumb --> | ||
<xsl:template match="*" mode="gen-user-breadcrumb"> | ||
|
||
<nav aria-label="breadcrumb"> | ||
<xsl:if test="not($BREADCRUMB_DIVIDER = '/')"> | ||
<xsl:attribute name="style"> | ||
<xsl:text>--bs-breadcrumb-divider: '</xsl:text> | ||
<xsl:value-of select="$BREADCRUMB_DIVIDER"/> | ||
<xsl:text>';</xsl:text> | ||
</xsl:attribute> | ||
</xsl:if> | ||
|
||
<ol class="breadcrumb"> | ||
<xsl:for-each select="ancestor::node()"> | ||
<xsl:variable name="title"> | ||
<xsl:apply-templates select="." mode="get-navtitle"/> | ||
</xsl:variable> | ||
<xsl:if test="normalize-space($title)"> | ||
<li class="breadcrumb-item"> | ||
<xsl:choose> | ||
<xsl:when test="@href"> | ||
<a> | ||
<xsl:attribute name="href"> | ||
<xsl:if test="not(@scope = 'external')"> | ||
<xsl:value-of select="$PATH2PROJ"/> | ||
</xsl:if> | ||
<xsl:choose> | ||
<xsl:when | ||
test="@copy-to and not(contains(@chunk, 'to-content')) and | ||
(not(@format) or @format = 'dita' or @format = 'ditamap') " | ||
> | ||
<xsl:call-template name="replace-extension"> | ||
<xsl:with-param name="filename" select="@copy-to"/> | ||
<xsl:with-param name="extension" select="$OUTEXT"/> | ||
</xsl:call-template> | ||
<xsl:if test="not(contains(@copy-to, '#')) and contains(@href, '#')"> | ||
<xsl:value-of select="concat('#', substring-after(@href, '#'))"/> | ||
</xsl:if> | ||
</xsl:when> | ||
<xsl:when | ||
test="not(@scope = 'external') and (not(@format) or @format = 'dita' or @format = 'ditamap')" | ||
> | ||
<xsl:call-template name="replace-extension"> | ||
<xsl:with-param name="filename" select="@href"/> | ||
<xsl:with-param name="extension" select="$OUTEXT"/> | ||
</xsl:call-template> | ||
</xsl:when> | ||
<xsl:otherwise> | ||
<xsl:value-of select="@href"/> | ||
</xsl:otherwise> | ||
</xsl:choose> | ||
</xsl:attribute> | ||
<xsl:value-of select="$title"/> | ||
</a> | ||
</xsl:when> | ||
<xsl:otherwise> | ||
<span> | ||
<xsl:value-of select="$title"/> | ||
</span> | ||
</xsl:otherwise> | ||
</xsl:choose> | ||
</li> | ||
</xsl:if> | ||
</xsl:for-each> | ||
<xsl:variable name="title"> | ||
<xsl:apply-templates select="." mode="get-navtitle"/> | ||
</xsl:variable> | ||
<xsl:if test="normalize-space($title)"> | ||
<li class="breadcrumb-item active" aria-current="page"> | ||
<xsl:value-of select="$title"/> | ||
</li> | ||
</xsl:if> | ||
</ol> | ||
</nav> | ||
</xsl:template> | ||
|
||
|
||
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
This file is part of the DITA Bootstrap plug-in for DITA Open Toolkit. | ||
See the accompanying LICENSE file for applicable licenses. | ||
--> | ||
<xsl:stylesheet | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot" | ||
xmlns:xhtml="http://www.w3.org/1999/xhtml" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
version="2.0" | ||
exclude-result-prefixes="xs xhtml dita-ot" | ||
> | ||
<!-- Customization to add Bootstrap Collapse Component --> | ||
<!-- https://getbootstrap.com/docs/5.1/components/collapse/ --> | ||
|
||
<xsl:template match="*[contains(@class,' topic/bodydiv ') and contains(@outputclass, 'collapse-horizontal')]"> | ||
<xsl:variable name="id" select="dita-ot:generate-html-id(.)"/> | ||
<div> | ||
<xsl:if test="contains(@otherprops, 'style(')"> | ||
<xsl:attribute name="style"> | ||
<xsl:analyze-string select="@otherprops" regex="[a-z]*\([^\)]*\)"> | ||
<xsl:matching-substring> | ||
<xsl:variable name="var"> | ||
<xsl:value-of select="."/> | ||
</xsl:variable> | ||
<xsl:variable name="attr"> | ||
<xsl:value-of select="substring-before($var, '(')"/> | ||
</xsl:variable> | ||
<xsl:attribute name="{$attr}"> | ||
<xsl:value-of select="substring-before(substring-after($var, '('),')')"/> | ||
</xsl:attribute> | ||
</xsl:matching-substring> | ||
</xsl:analyze-string> | ||
</xsl:attribute> | ||
</xsl:if> | ||
<div> | ||
<xsl:attribute name="id" select="$id"/> | ||
<xsl:call-template name="commonattributes"/> | ||
<xsl:apply-templates/> | ||
</div> | ||
</div> | ||
</xsl:template> | ||
|
||
<xsl:template match="*[contains(@class, ' topic/div ') and contains(@otherprops, 'style(')]"> | ||
<div> | ||
<xsl:call-template name="commonattributes"/> | ||
<xsl:call-template name="setid"/> | ||
<xsl:attribute name="style"> | ||
<xsl:analyze-string select="@otherprops" regex="[a-z]*\([^\)]*\)"> | ||
<xsl:matching-substring> | ||
<xsl:variable name="var"> | ||
<xsl:value-of select="."/> | ||
</xsl:variable> | ||
<xsl:variable name="attr"> | ||
<xsl:value-of select="substring-before($var, '(')"/> | ||
</xsl:variable> | ||
<xsl:attribute name="{$attr}"> | ||
<xsl:value-of select="substring-before(substring-after($var, '('),')')"/> | ||
</xsl:attribute> | ||
</xsl:matching-substring> | ||
</xsl:analyze-string> | ||
</xsl:attribute> | ||
<xsl:apply-templates/> | ||
</div> | ||
</xsl:template> | ||
|
||
|
||
<!-- Override to connect an collapsed element to a button --> | ||
<xsl:template match="*[contains(@class,' topic/xref ') and contains(@props, 'collapse-toggle')]"> | ||
<xsl:variable name="href" select="replace(@href, '#', '')"/> | ||
<xsl:variable name="id" select="dita-ot:generate-html-id(//*[@id=$href])"/> | ||
|
||
<a data-bs-toggle="collapse"> | ||
<xsl:call-template name="commonattributes"/> | ||
<xsl:attribute name="href" select="concat('#',$id)"/> | ||
<xsl:attribute name="aria-expanded" select="'false'"/> | ||
<xsl:attribute name="aria-controls" select="$id"/> | ||
<xsl:apply-templates/> | ||
</a> | ||
</xsl:template> | ||
</xsl:stylesheet> |
Oops, something went wrong.