-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault-toc.xsl
More file actions
158 lines (143 loc) · 4.45 KB
/
default-toc.xsl
File metadata and controls
158 lines (143 loc) · 4.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:outline="http://wkhtmltopdf.org/outline"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
indent="yes" />
<xsl:template match="outline:outline">
<html>
<head>
<title>Indholdsfortegnelse</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
html,
body {
margin: 0;
padding: 0;
font-size: 10pt;
font-family: Arial, Helvetica, sans-serif;
color: #50534d;
}
h2 {
font-size: 2em;
font-weight: bold;
}
.section-type {
position: relative;
display: inline-block;
padding-bottom: 8px;
font-weight: normal;
font-size: 1em;
text-transform: uppercase;
letter-spacing: 1.45px;
color: #74766c;
}
.section-type::after {
position: absolute;
display: block;
height: 2px;
right: 0;
left: 0;
bottom: 0;
content: "";
background-color: #ffde2f;
}
.wrapper {
padding-top: 7px;
padding-bottom: 7px;
}
li {list-style: none;}
ul {}
ul {padding-left: 0em;}
ul ul {padding-left: 2em;}
a { font-size: 1em; text-decoration:none; color: #50534d;}
span { font-size: 1em; }
.divTable{
display: table;
width: 100%;
}
.divTableRow {
display: table-row;
}
.divTableHeading {
display: table-header-group;
}
.divTableCell,
.divTableHead {
display: table-cell;
}
.divTableCell { white-space: nowrap; }
.divTableHeading {
display: table-header-group;
font-weight: bold;
}
.divTableFoot {
display: table-footer-group;
font-weight: bold;
}
.divTableBody {
display: table-row-group;
}
.divTableCellLessImportant {
width: 1%;
}
.divTableCellMostImportant {
width: 100%;
}
.divTableCellWithDots {
color: #fff;
border-bottom: 1px dashed #979797;
}
.section {
padding-left: 89px !important;
padding-right: 89px !important;
}
</style>
</head>
<body>
<div class="section section--toc">
<div class="section-type">Indhold</div>
<h2>Indholdsfortegnelse</h2>
<ul><xsl:apply-templates select="outline:item/outline:item"/></ul>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="outline:item">
<li>
<xsl:if test="@title!=''">
<div class="wrapper">
<div class="divTable">
<div class="divTableBody">
<div class="divTableRow">
<div class="divTableCell" style="padding-right: 10px;">
<a>
<xsl:if test="@link">
<xsl:attribute name="href"><xsl:value-of select="@link"/></xsl:attribute>
</xsl:if>
<xsl:if test="@backLink">
<xsl:attribute name="name"><xsl:value-of select="@backLink"/></xsl:attribute>
</xsl:if>
<xsl:value-of select="@title" />
</a>
</div>
<div class="divTableCell divTableCellMostImportant divTableCellWithDots">
-
</div>
<div class="divTableCell" style="padding-left: 10px;">
<span>s. <xsl:value-of select="@page" /> </span>
</div>
</div>
</div>
</div>
</div>
</xsl:if>
<ul>
<xsl:comment>added to prevent self-closing tags in QtXmlPatterns</xsl:comment>
<xsl:apply-templates select="outline:item"/>
</ul>
</li>
</xsl:template>
</xsl:stylesheet>