-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsitemap.xsl
166 lines (166 loc) · 4.62 KB
/
sitemap.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
162
163
164
165
166
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:template match="/">
<html lang="en"
xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="https://adithsuresh.github.io/"></base>
<title>Sitemap for adithsuresh.github.io</title>
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<style type="text/css">
* {
font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
scrollbar-width: thin;
scrollbar-color: #a8a8a8 transparent;
}
*::-webkit-scrollbar {
width: 9px;
height: 9px;
border-radius: 12px;
}
*::-webkit-scrollbar-track {
background: transparent;
}
*::-webkit-scrollbar-thumb {
background-color: #a8a8a8;
border-radius: 8px;
border: 1px solid #d9d9d9;
}
*::-webkit-scrollbar-corner {
background: transparent;
}
*::-webkit-scrollbar-thumb:hover {
background-color: #787878;
}
*::-webkit-scrollbar-thumb:active {
background-color: #5a5a5a;
}
body {
font-size:18px;
}
table {
width:100%;
}
table caption {
font-size: 1.5em;
margin: 0.5em 0 0.75em;
}
td {
font-size:16px;
}
th {
text-align:left;
padding-right:30px;
font-size:16px;
background-color:#CFEBF7;
text-transform: uppercase;
}
tr._ {
background-color:#f5f5f5;
}
a {
color:#33aadd;
}
@media screen and (max-width: 806px) {
table {
border: 0;
}
table caption {
font-size: 1.3em;
}
table thead {
border: none;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
table tr {
border-bottom: 3px solid #ddd;
display: block;
margin-bottom: 0.625em;
}
table td {
border-bottom: 1px solid #ddd;
display: block;
font-size: 0.8em;
text-align: right;
}
table td::before {
content: attr(data-label);
float: left;
font-weight: bold;
text-transform: uppercase;
}
table td:last-child {
border-bottom: 0;
}
}
@media screen and (max-width: 320px) {
table td {
font-size: 0.7em;
}
}
</style>
</head>
<body>
<div id="content">
<table cellpadding="5">
<caption>
Sitemap for <b>adithsuresh.github.io</b>
</caption>
<thead>
<tr style="border-bottom:1px black solid;">
<th scope="col">URL</th>
<th scope="col">Priority</th>
<th scope="col">Change Frequency</th>
<th scope="col">LastChange (GMT)</th>
</tr>
</thead>
<xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'" />
<xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
<xsl:for-each select="sitemap:urlset/sitemap:url">
<tbody>
<tr>
<xsl:if test="position() mod 2 != 1">
<xsl:attribute name="class">_</xsl:attribute>
</xsl:if>
<td scope="row" data-label="URL">
<xsl:variable name="loc">
<xsl:value-of select="sitemap:loc" />
</xsl:variable>
<a href="{$loc}">
<xsl:value-of select="sitemap:loc" />
</a>
</td>
<td scope="row" data-label="Priority">
<xsl:value-of select="concat(sitemap:priority*100,'%')" />
</td>
<td scope="row" data-label="Change Frequency">
<xsl:value-of select="concat(translate(substring(sitemap:changefreq, 1, 1),concat($lower, $upper),concat($upper, $lower)),substring(sitemap:changefreq, 2))" />
</td>
<td scope="row" data-label="LastChange (GMT)">
<xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))" />
</td>
</tr>
</tbody>
</xsl:for-each>
</table>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>