-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbens-style.xsl
More file actions
58 lines (49 loc) · 2.02 KB
/
bens-style.xsl
File metadata and controls
58 lines (49 loc) · 2.02 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
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:itunes="itunes" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<!-- HTML has to be output within a template. Here isn't the global document space -->
<xsl:template match="/">
<html>
<head>
<title>🧙♀️</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script async="async" src="https://unpkg.com/es-module-shims@1.3.6/dist/es-module-shims.js"></script>
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.141.0/build/three.module.js"
}
}
</script>
<style>
html, body { width: 100vw; min-height: 100vh; margin: 0 auto;}
html { font-size: 20px; font-family: sans-serif;overflow-x: hidden;}
.item {
border-bottom: 1px solid red;
margin: 2rem auto;
max-width: 80vw;
}
.label { background-color: rgba(0,0,0,.8); padding: .5em; color: #fff; border-radius: 1em;}
</style>
</head>
<body>
<div id="output"></div>
<div id="content">
<xsl:apply-templates select="*"/>
</div>
<!-- <script src="live-reload.js"></script> -->
<script type="module" src="embedded.js"></script>
</body>
</html>
</xsl:template>
<xsl:template match="item">
<section class="item">
<h2><xsl:value-of select="title"/></h2>
<p><xsl:value-of select="description"/></p>
<xsl:element name="a">
<xsl:attribute name="href"><xsl:value-of select="enclosure/@url"/></xsl:attribute>
<xsl:value-of select="//*[name()='enclosure']/@url"/> (<span><xsl:value-of select="//*[name()='itunes:duration']"/></span>)
</xsl:element>
</section>
</xsl:template>
</xsl:stylesheet>