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">
<html>
<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" />
</head>
<body>
<body class="tocs">
<h1>Table of Contents</h1>
<ul>
<xsl:apply-templates select="outline:item/outline:item"/>
@ -42,8 +24,8 @@
<xsl:template match="outline:item">
<li>
<xsl:if test="@page!='2'">
<div>
<a>
<div class="row">
<a class="title">
<xsl:if test="@link">
<xsl:attribute name="href">
<xsl:value-of select="@link"/>
@ -56,7 +38,7 @@
</xsl:if>
<xsl:value-of select="@title" />
</a>
<span>
<span class="page-number">
<xsl:value-of select="@page" />
</span>
</div>

View file

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