This repository was archived by the owner on May 9, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvnindex.xsl
executable file
·161 lines (142 loc) · 5.11 KB
/
svnindex.xsl
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
159
160
161
<?xml version="1.0"?>
<!--
This file is part of the VEBERArnaud/svnindex package.
(c) Arnaud VEBER <[email protected]>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
-->
<!-- A XML transformation style sheet for displaying the Subversion
directory listing that is generated by mod_dav_svn when the "SVNIndexXSLT"
directive is used. -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="*"/>
<xsl:template match="svn">
<html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>
<xsl:if test="string-length(index/@name) != 0">
<xsl:value-of select="index/@name"/>
<xsl:text>: </xsl:text>
</xsl:if>
<xsl:value-of select="index/@path"/>
</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="/svntools/svnindex.css"/>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet"/>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">
<span class="fa fa-fw fa-code-fork"></span>
YOUR SUBVERSION SERVER NAME HERE
</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div>
</div>
</nav>
<xsl:apply-templates/>
<nav class="navbar navbar-default navbar-fixed-bottom hidden-xs hidden-sm" role="navigation">
<div class="container-fluid">
<p class="navbar-text">
Design by @VEBERArnaud
</p>
<p class="navbar-text navbar-right">
<xsl:text>Powered by </xsl:text>
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="@href"/>
</xsl:attribute>
<xsl:text>Subversion</xsl:text>
</xsl:element>
<xsl:text> </xsl:text>
<xsl:value-of select="@version"/>
</p>
</div>
</nav>
</body>
</html>
</xsl:template>
<xsl:template match="index">
<section class="jumbotron">
<div class="container-fluid">
<div class="page-header">
<h1>
<span class="fa fa-fw fa-sitemap hidden-xs hidden-sm"></span>
<span class="hidden-xs hidden-sm"> </span>
<xsl:value-of select="@name"/>
<xsl:value-of select="@base"/>
<small>
<xsl:text> Revision </xsl:text>
<xsl:value-of select="@rev"/>
</small>
</h1>
</div>
</div>
</section>
<section class="container-fluid">
<div class="row">
<div class="col-xs-12">
<div class="breadcrumb">
<h4>
<span class="fa fa-fw fa-road"></span>
<span> </span>
<xsl:value-of select="@name"/>
<xsl:value-of select="@base"/>
<xsl:value-of select="@path"/>
</h4>
</div>
<div class="list-group">
<xsl:apply-templates select="updir"/>
<xsl:apply-templates select="dir"/>
<xsl:apply-templates select="file"/>
</div>
</div>
</div>
</section>
</xsl:template>
<xsl:template match="updir">
<xsl:element name="a">
<xsl:attribute name="class">list-group-item updir</xsl:attribute>
<xsl:attribute name="href">..</xsl:attribute>
<span class="fa fa-fw fa-level-up"></span>
 
<xsl:text>..</xsl:text>
</xsl:element>
</xsl:template>
<xsl:template match="dir">
<xsl:element name="a">
<xsl:attribute name="class">list-group-item dir</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="@href"/>
</xsl:attribute>
<span class="fa fa-fw fa-folder-o"></span>
 
<xsl:value-of select="@name"/>
<xsl:text>/</xsl:text>
</xsl:element>
</xsl:template>
<xsl:template match="file">
<xsl:element name="a">
<xsl:attribute name="class">list-group-item file</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="@href"/>
</xsl:attribute>
<span class="fa fa-fw fa-file-o"></span>
 
<xsl:value-of select="@name"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>