Style ToC

This commit is contained in:
Jake Howard 2017-05-17 19:58:29 +01:00
parent 81ab25fdfd
commit 2c7679fb2f
3 changed files with 39 additions and 22 deletions

View file

@ -58,3 +58,35 @@ body.footer, body.header {
} }
} }
} }
body.tocs {
h1 {
text-align: center;
margin-bottom: 45px;
}
.row {
border-bottom: 1px dashed black;
margin-bottom: $font-size-base;
font-size: $font-size-base * 1.5;
}
.page-number {
float: right;
padding-right: $font-size-base * 0.5;
}
ul {
padding-left: 0;
li {
list-style: none;
}
ul {
padding-left: $font-size-base;
}
}
}

View file

@ -11,27 +11,9 @@
<xsl:template match="outline:outline"> <xsl:template match="outline:outline">
<html> <html>
<head> <head>
<style>
h1 {
text-align: center;
font-size: 20px;
font-family: arial;
}
div {border-bottom: 1px dashed rgb(200,200,200);}
span {float: right;}
li {list-style: none;}
ul {
font-size: 20px;
font-family: arial;
}
ul ul {font-size: 80%; }
ul {padding-left: 0em;}
ul ul {padding-left: 1em;}
a {text-decoration:none; color: black;}
</style>
<link rel="stylesheet" href="{{ static_dir }}/style.css" /> <link rel="stylesheet" href="{{ static_dir }}/style.css" />
</head> </head>
<body> <body class="tocs">
<h1>Table of Contents</h1> <h1>Table of Contents</h1>
<ul> <ul>
<xsl:apply-templates select="outline:item/outline:item"/> <xsl:apply-templates select="outline:item/outline:item"/>
@ -42,8 +24,8 @@
<xsl:template match="outline:item"> <xsl:template match="outline:item">
<li> <li>
<xsl:if test="@page!='2'"> <xsl:if test="@page!='2'">
<div> <div class="row">
<a> <a class="title">
<xsl:if test="@link"> <xsl:if test="@link">
<xsl:attribute name="href"> <xsl:attribute name="href">
<xsl:value-of select="@link"/> <xsl:value-of select="@link"/>
@ -56,7 +38,7 @@
</xsl:if> </xsl:if>
<xsl:value-of select="@title" /> <xsl:value-of select="@title" />
</a> </a>
<span> <span class="page-number">
<xsl:value-of select="@page" /> <xsl:value-of select="@page" />
</span> </span>
</div> </div>

View file

@ -21,3 +21,6 @@
- Citation with suffix only [@item1 and nowhere else]. - Citation with suffix only [@item1 and nowhere else].
- With some markup [*see* @item1 p. **32**]. - With some markup [*see* @item1 p. **32**].
##### More referencing tests