forked from nxnoo1/robloxasset
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtree.xslt
150 lines (144 loc) · 3.67 KB
/
tree.xslt
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
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:output
omit-xml-declaration="yes"
doctype-system="about:legacy-compat"
method="html" indent="no" encoding="UTF-8"/>
<xsl:template match="/roblox">
<html>
<head>
<title>Roblox Asset - <xsl:value-of select="Item/Properties/*[@name='Name']" /></title>
<link rel="stylesheet" href="monokai.css" />
<link rel="shortcut icon" type="image/png" href="http://eric-wieser.tk/images/favicon.png" />
<link href="http://fonts.googleapis.com/css?family=Muli:400,400italic" rel="stylesheet" type="text/css" />
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<style>
body {
background: #F0F0F0;
margin: 0;
padding: 0;
font-family: Muli, sans-serif;
line-height: 20px;
}
h1 {
padding: 5px;
margin: 0;
line-height: 40px;
}
pre {
margin: 0;
white-space: pre-wrap;
}
ul {
margin: 0;
padding: 0;
list-style: none;
padding-left: 25px;
}
ul li {
margin: 0;
padding: 0;
}
.icon {
float: left;
margin-left: -25px;
height: 18px;
width: 18px;
padding: 1px;
vertical-align: middle;
margin
}
.icon img {
display: block;
margin: 0;
padding: 0;
}
.name {
cursor: pointer;
}
li.collapsed .details {
display: none;
}
li.collapsed .name:after {
content: "...";
color: #808080;
}
header {
background: #606060 url(http://eric-wieser.tk/images/logo.png) no-repeat 5px 50%;
color: white;
overflow: hidden;
padding: 5px;
padding-left: 50px;
display: block;
}
header h1 {
font-size: 40px;
line-height: 40px;
margin: 0;
padding: 0;
float: left;
}
header p {
margin: 0;
font-style: italic;
line-height: 40px;
float: right;
padding: 0;
}
.content {
padding: 5px;
display: block;
}
</style>
</head>
<body>
<header>
<h1>Roblox Asset downloader</h1>
<p>Push Ctrl+S or File -> Save to save this model to your computer</p>
</header>
<section class="content">
<ul>
<xsl:apply-templates select="Item" />
</ul>
</section>
<script src="highlight.pack.js"></script>
<script>
hljs.tabReplace = ' ';
hljs.initHighlighting();
</script>
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script>
$(function() {
$('body').on('click', 'li .name', function() {
$(this).parent().toggleClass('collapsed');
return false;
});
});
</script>
</body>
</html>
</xsl:template>
<xsl:template match="Item">
<li>
<span class="icon">
<img src="http://wiki.roblox.com/index.php/Special:Filepath/File:{@class}_icon.png" />
</span>
<a class="name" title="{@class}"><xsl:value-of select="./Properties/*[@name='Name']"/></a>
<div class="details">
<xsl:if test="(@class='Script' or @class='LocalScript'or @class='CoreScript') and ./Properties/*[@name='Source']">
<pre><code class="language-lua">
<xsl:value-of select="./Properties/*[@name='Source']"/>
</code></pre>
</xsl:if>
<xsl:if test="Item">
<ul>
<xsl:apply-templates select="Item" />
</ul>
</xsl:if>
</div>
</li>
</xsl:template>
</xsl:stylesheet>