1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-22 04:15:54 -04:00

Feature: Improved playlist formating

This commit is contained in:
Philipp Schafft 2020-10-01 21:25:53 +00:00
parent 4605af24f6
commit 0b754ef185
4 changed files with 43 additions and 45 deletions

View File

@ -0,0 +1,30 @@
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0">
<xsl:output method="html" doctype-system="about:legacy-compat" encoding="UTF-8" indent="yes" />
<xsl:template name="playlist">
<xsl:if test="playlist/*">
<h4>Playlist</h4>
<div class="playlist-container">
<table class="table-block">
<thead>
<tr>
<th>Album</th>
<th width="10%">Track</th>
<th>Creator</th>
<th width="33%">Title</th>
</tr>
</thead>
<tbody>
<xsl:for-each select="playlist/trackList/track">
<tr>
<td><xsl:value-of select="album" /></td>
<td><xsl:value-of select="trackNum" /></td>
<td><xsl:value-of select="creator" /></td>
<td><xsl:value-of select="title" /></td>
</tr>
</xsl:for-each>
</tbody>
</table>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

View File

@ -4,6 +4,7 @@
<xsl:include href="includes/page.xsl"/>
<xsl:include href="includes/mountnav.xsl"/>
<xsl:include href="includes/player.xsl"/>
<xsl:include href="includes/playlist.xsl"/>
<xsl:param name="param-showall" />
<xsl:param name="param-has-mount" />
@ -116,29 +117,7 @@
</xsl:if>
<!-- Extra playlist -->
<xsl:if test="playlist/*">
<h4>Playlist</h4>
<table class="table-block">
<thead>
<tr>
<th>Album</th>
<th>Track</th>
<th>Creator</th>
<th>Title</th>
</tr>
</thead>
<tbody>
<xsl:for-each select="playlist/trackList/track">
<tr>
<td><xsl:value-of select="album" /></td>
<td><xsl:value-of select="trackNum" /></td>
<td><xsl:value-of select="creator" /></td>
<td><xsl:value-of select="title" /></td>
</tr>
</xsl:for-each>
</tbody>
</table>
</xsl:if>
<xsl:call-template name="playlist" />
<!-- Mount Authentication -->
<xsl:if test="authentication">

View File

@ -252,14 +252,22 @@ section.box table tbody tr:hover {
background-color: #c0c0c0;
}
section.box table tr > * {
section.box table.table-keys tr > * {
padding: 0.4em 1.5em;
}
section.box table.table-block tr > * {
padding: 0.4em 0.4em;
}
section.box table.table-keys tr td:first-child {
font-weight: bold;
}
.playlist-container {
overflow-x: auto;
}
/* Main content styling */
main {

View File

@ -2,6 +2,7 @@
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
<xsl:include href="includes/web-page.xsl"/>
<xsl:include href="includes/player.xsl"/>
<xsl:include href="includes/playlist.xsl"/>
<xsl:variable name="title">Status</xsl:variable>
<xsl:template name="content">
<xsl:text disable-output-escaping="yes">
@ -121,27 +122,7 @@
</tbody>
</table>
<!-- Extra playlist -->
<xsl:if test="playlist/*">
<h4>Playlist</h4>
<table class="table-block">
<tbody>
<tr>
<th>Album</th>
<th>Track</th>
<th>Creator</th>
<th>Title</th>
</tr>
<xsl:for-each select="playlist/trackList/track">
<tr>
<td><xsl:value-of select="album" /></td>
<td><xsl:value-of select="trackNum" /></td>
<td><xsl:value-of select="creator" /></td>
<td><xsl:value-of select="title" /></td>
</tr>
</xsl:for-each>
</tbody>
</table>
</xsl:if>
<xsl:call-template name="playlist" />
</div>
</section>
</xsl:when>