Fix initial login to fetch encrypted token
[noxon-gateway.git] / www / html.xsl
1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet version="1.0"
3   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4   xmlns="http://www.w3.org/1999/xhtml">
5   <xsl:template match="ListOfItems">
6     <html>
7       <head>
8        <meta name="viewport" content="width=device-width, initial-scale=1"/>
9       </head>
10       <body>
11        <xsl:for-each select="Item[ItemType='Previous']">
12         <pre>
13          <a>
14           <xsl:attribute name="href">
15            <xsl:value-of select="UrlPrevious"/>
16           </xsl:attribute>
17           <xsl:text>&lt; back</xsl:text>
18          </a>
19         </pre>
20        </xsl:for-each>
21
22        <xsl:if test="NoCache">
23         <p>Caching disabled by <tt>NoCache</tt></p>
24        </xsl:if>
25
26        <xsl:if test="Item[ItemType='Message']">
27         <h2>Messages</h2>
28         <xsl:for-each select="Item[ItemType='Message']">
29          <p>
30           <xsl:value-of select="Message"/>
31          </p>
32         </xsl:for-each>
33        </xsl:if>
34
35        <pre style="border: 1px solid black">
36
37         <xsl:for-each select="Item">
38          <xsl:if test="ItemType='Display'">
39           <xsl:text>[d] </xsl:text>
40           <xsl:value-of select="Display"/><xsl:text>
41 </xsl:text>
42          </xsl:if>
43
44          <xsl:if test="ItemType='Dir'">
45           <xsl:text>[D] </xsl:text>
46           <a>
47            <xsl:attribute name="href">
48             <xsl:value-of select="UrlDir"/>
49            </xsl:attribute>
50            <xsl:value-of select="Title"/>
51           </a>
52           <xsl:text>
53 </xsl:text>
54          </xsl:if>
55
56          <xsl:if test="ItemType='ShowOnDemand'">
57           <xsl:text>[S] </xsl:text>
58            <a>
59             <xsl:attribute name="href">
60              <xsl:value-of select="ShowOnDemandURL"/>
61             </xsl:attribute>
62             <xsl:value-of select="ShowOnDemandName"/>
63            </a>
64            <xsl:text>
65 </xsl:text>
66          </xsl:if>
67
68          <xsl:if test="ItemType='ShowEpisode'">
69           <xsl:text>[E] </xsl:text>
70           <a>
71            <xsl:attribute name="href">
72             <xsl:value-of select="ShowEpisodeURL"/>
73            </xsl:attribute>
74            <xsl:value-of select="ShowEpisodeName"/>
75           </a>
76            <xsl:text>
77 </xsl:text>
78          </xsl:if>
79
80         </xsl:for-each>
81        </pre>
82
83        <xsl:if test="Item[ItemType='ShowEpisode']">
84         <h2>Show episodes</h2>
85         <xsl:for-each select="Item[ItemType='ShowEpisode']">
86          <h3>
87           <a>
88            <xsl:attribute name="href">
89             <xsl:value-of select="ShowEpisodeURL"/>
90            </xsl:attribute>
91            <xsl:value-of select="ShowEpisodeName"/>
92           </a>
93          </h3>
94          <p>
95           <xsl:value-of select="ShowDesc"/>
96           (<xsl:value-of select="ShowMime"/>)
97          </p>
98         </xsl:for-each>
99        </xsl:if>
100
101        <xsl:if test="Item[ItemType='Station']">
102         <h2>Internet radio stations</h2>
103         <xsl:for-each select="Item[ItemType='Station']">
104          <h3>
105           #<xsl:value-of select="StationId"/>:
106           <a>
107            <xsl:attribute name="href">
108             <xsl:value-of select="StationUrl"/>
109            </xsl:attribute>
110            <xsl:value-of select="StationName"/>
111           </a>
112          </h3>
113          <p>
114           <xsl:value-of select="StationDesc"/>
115           (<xsl:value-of select="ShowMime"/>)
116          </p>
117         </xsl:for-each>
118        </xsl:if>
119
120       </body>
121     </html>
122   </xsl:template>
123 </xsl:stylesheet>