Skip to content

Commit

Permalink
Fixed HTML generation of manual.
Browse files Browse the repository at this point in the history
  • Loading branch information
hmatuschek committed Oct 1, 2021
1 parent f788b5c commit dca5fb2
Show file tree
Hide file tree
Showing 5 changed files with 206 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
/doc/latex/
/doc/reveng/cotre/*.pcapng.gz
/doc/reveng/gd77/*.pcapng.gz
/doc/manual/manual.pdf
/doc/manual/manual_combined.xml
/doc/manual/intro/fig/*.aux
/doc/manual/intro/fig/*.log
/doc/manual/intro/fig/*.png
/doc/manual/html/*.html
/doc/manual/html/manual.xml
/doc/manual/html/docbook.css
/doc/manual/html/fig
/parts/
/prime/
/snap/
Expand Down
9 changes: 9 additions & 0 deletions doc/manual/cli/commandline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@
</info>

<para>
Beside the graphical user interface provided by <application>qdmr</application> (see
<xref linkend="gui"/>), there is also a command line tool allowing to read/write codeplugs to the
radios. It is based on the same library called
<link xlink:href="https://dm3mat.darc.de/qdmr/libdmrconf">libdmrconf</link> and thus provides the
same features like <application>qdmr</application>.
</para>

<para>
This chapter will briefly describe the command line tool and how it can be used to handle
codeplugs.
</para>

<xi:include href="dmrconf.xml"/>
Expand Down
4 changes: 2 additions & 2 deletions doc/manual/html/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
all: manual.xml
xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/xhtml5/chunk.xsl manual.xml
xsltproc dm3mat.darc.de_manual.xsl manual.xml

clean:
rm -rf fig/
rm -f manual.xml
rm -f *.xhtml
rm -f *.html
rm -f docbook.css
145 changes: 145 additions & 0 deletions doc/manual/html/dm3mat.darc.de_manual.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:import href="file:///usr/share/xml/docbook/stylesheet/docbook-xsl/html/chunk.xsl"/>

<xsl:param name="html.stylesheet" select="'/layout.css'"/>
<xsl:param name="generate.toc">
appendix nop
article toc,title
book toc,title
chapter toc
part nop
preface nop
qandadiv nop
qandaset nop
reference toc,title
section nop
set toc
</xsl:param>

<xsl:template name="user.head.content">
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="manual.css"/>
<style type="text/css"><![CDATA[
#menu-soft { background-color: #4CAF50; }
#menu-qdmr { background-color: #4CAF50; }
]]></style>
</xsl:template>

<xsl:template name="body.attributes">
<xsl:comment>#include virtual="/menu.html" </xsl:comment>
</xsl:template>

<xsl:template name="credits.div"/>

<xsl:template name="footer.navigation">
<xsl:param name="prev" select="/foo"/>
<xsl:param name="next" select="/foo"/>
<xsl:param name="nav.context"/>

<xsl:variable name="home" select="/*[1]"/>
<xsl:variable name="up" select="parent::*"/>

<xsl:if test="count($prev)>0">
<a id="prev">
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$prev"/>
</xsl:call-template>
</xsl:attribute>
Prev
</a>
</xsl:if>
<xsl:if test="count($up) > 0 and generate-id($up) != generate-id($home)">
<a id="up">
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$up"/>
</xsl:call-template>
</xsl:attribute>
Up
</a>
</xsl:if>
<xsl:if test="count($up)>0">
<a id="index">
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$up"/>
</xsl:call-template>
</xsl:attribute>
Index
</a>
</xsl:if>
<xsl:if test="count($next)>0">
<a id="next">
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$next"/>
</xsl:call-template>
</xsl:attribute>
Next
</a>
</xsl:if>
</xsl:template>

<xsl:template name="chunk-element-content">
<xsl:param name="prev"/>
<xsl:param name="next"/>
<xsl:param name="nav.context"/>
<xsl:param name="content">
<xsl:apply-imports/>
</xsl:param>

<xsl:call-template name="user.preroot"/>

<html>
<xsl:call-template name="root.attributes"/>
<xsl:call-template name="html.head">
<xsl:with-param name="prev" select="$prev"/>
<xsl:with-param name="next" select="$next"/>
</xsl:call-template>

<body>
<xsl:call-template name="body.attributes"/>

<main>
<!--<nav>
<xsl:call-template name="user.header.navigation">
<xsl:with-param name="prev" select="$prev"/>
<xsl:with-param name="next" select="$next"/>
<xsl:with-param name="nav.context" select="$nav.context"/>
</xsl:call-template>
<xsl:call-template name="header.navigation">
<xsl:with-param name="prev" select="$prev"/>
<xsl:with-param name="next" select="$next"/>
<xsl:with-param name="nav.context" select="$nav.context"/>
</xsl:call-template>
</nav>-->

<xsl:call-template name="user.header.content"/>
<xsl:copy-of select="$content"/>
<xsl:call-template name="user.footer.content"/>

<nav>
<xsl:call-template name="footer.navigation">
<xsl:with-param name="prev" select="$prev"/>
<xsl:with-param name="next" select="$next"/>
<xsl:with-param name="nav.context" select="$nav.context"/>
</xsl:call-template>

<xsl:call-template name="user.footer.navigation">
<xsl:with-param name="prev" select="$prev"/>
<xsl:with-param name="next" select="$next"/>
<xsl:with-param name="nav.context" select="$nav.context"/>
</xsl:call-template>
</nav>
</main>
</body>
</html>
<xsl:value-of select="$chunk.append"/>
</xsl:template>
</xsl:stylesheet>
41 changes: 41 additions & 0 deletions doc/manual/html/manual.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
main > nav {
margin-top:20px;
}

dl.variablelist {
margin-left: 2em;
}

dl.toc {
margin-left: 2em;
margin-right: 2em;
background-color: #f2f2f2;
overflow: auto;
padding: 1em;
border: 0px solid black;
border-radius: 5px;
font-weight: bolder;
}

pre.programlisting {
background-color: #f2f2f2;
overflow-x: auto;
padding: 1em;
margin-left: 16px;
margin-right: 16px;
}

table {
margin-left: 16px;
margin-right: 16px;
}
thead td {
font-weight: bold;
}
tbody td {
vertical-align: top;
}

.token {
font-family: 'Courier New', Courier, monospace;
}

0 comments on commit dca5fb2

Please sign in to comment.