1
0
mirror of https://github.com/danbee/neompc synced 2025-03-04 08:39:10 +00:00

~ Further template development.

This commit is contained in:
Dan Barber 2010-01-23 17:46:55 +00:00
parent f890dc6287
commit 877e21c9cb
11 changed files with 72 additions and 37 deletions

View File

@ -12,7 +12,7 @@
/* Config relating to the display of CD covers */
/* music_directory must match you MPD music_directory config */
$_CONFIG['music_directory'] = '/var/lib/mpd/music';
$_CONFIG['album_cover_name'] = 'folder.jpg';
$_CONFIG['album_cover_name'] = '{:artist:} - {:album:}.jpg';
/* Template to use for displaying the pages */
$_CONFIG['template'] = 'default';

View File

@ -113,7 +113,7 @@ $(document).ready(function(){
containment: $('#slider_container'),
start: function() {
this.rel = '1';
vol_int = setInterval('ajax_control(\'volume\', new_volume);', 250);
vol_int = setInterval('ajax_control(\'volume\', new_volume);', 100);
if (typeof(hide_vol) != 'undefined') {
clearTimeout(hide_vol);
}

View File

@ -8,12 +8,12 @@
</ul>-->
<div id="browse_parent">
<div id="list_header">
<div id="buttons"><a href="index.php?action=playall"><img src="templates/{:$template:}/images/playall.png" /></a> <a href="index.php?action=addall"><img src="templates/{:$template:}/images/addall.png" /></a></div>
{:if $browse_parent_link:}<a href="index.php?browse={:$browse_parent_link:}" id="browse_back">&nbsp;</a>{:/if:}
<p>{:$browse_header|escape:'html':}</p>
</div>
<!--<div id="buttons"><a href="index.php?action=playall"><img src="templates/{:$template:}/images/playall.gif" /></a> <a href="index.php?action=addall"><img src="templates/{:$template:}/images/addall.gif" /></a></div>-->
<div id="list">
<ul class="list">

View File

@ -1,22 +1,45 @@
{:if $browselist_item.directory:}
{:if $browselist_item.directory:}
<li><a href="index.php?browse={:$browselist_item.directory|escape:'url':}"><img src="templates/{:$template:}/images/folder.png" class="icon" /> {:$browselist_item.directory_name|escape:'html':}</a></li>
<li class="dir">
<a class="browse" href="index.php?browse={:$browselist_item.directory|escape:'url':}">{:$browselist_item.directory_name|escape:'html':}</a>
</li>
{:elseif $browselist_item.metaArtist:}
{:elseif $browselist_item.metaArtist:}
<li><a href="index.php?browse={:$browselist_item.path|escape:'url':}"><img src="templates/{:$template:}/images/artist.gif" class="icon" /> {:$browselist_item.metaArtist|escape:'html':}</a></li>
<li class="artist">
<a class="browse" href="index.php?browse={:$browselist_item.path|escape:'url':}">{:$browselist_item.metaArtist|escape:'html':}</a>
</li>
{:elseif $browselist_item.metaAlbum:}
{:elseif $browselist_item.metaAlbum:}
<li><a href="index.php?browse={:$browselist_item.path|escape:'url':}"><img src="templates/{:$template:}/images/album.gif" class="icon" /> {:$browselist_item.metaAlbum|escape:'html':}</a></li>
<li class="album">
<a class="browse" href="index.php?browse={:$browselist_item.path|escape:'url':}">{:$browselist_item.metaAlbum|escape:'html':}</a>
</li>
{:elseif $browselist_item.Title:}
{:elseif $browselist_item.Title:}
{:if $browselist_item.in_playlist:}<li class="playing">{:else:}<li>{:/if:}<a href="{:$browselist_add_link:}{:$browselist_item.file|escape:'url':}"><img src="templates/{:$template:}/images/add.gif" alt="Add" class="button" /></a><a href="{:$browselist_play_link:}{:$browselist_item.file|escape:'url':}"><img src="templates/{:$template:}/images/play.gif" alt="Play" class="button" /></a><img src="templates/{:$template:}/images/music.png" class="icon" /> {:if $browselist_item.Title|escape:'html':}<span class="title">{:$browselist_item.Title|escape:'html':}</span>{:if $browselist_item.Artist && $show_extra_track_info:}<br /><span class="artist">{:$browselist_item.Artist|escape:'html':}</span> {:if $browselist_item.Album:}<span class="album">({:$browselist_item.Album|escape:'html':})</span>{:/if:}{:/if:}{:else:}{:$browselist_item.file_name|escape:'html':}{:/if:}</li>
{:if $browselist_item.in_playlist:}
<li class="track playing">
{:else:}
<li class="track">
{:/if:}
<a class="add" href="{:$browselist_add_link:}{:$browselist_item.file|escape:'url':}"><img src="templates/{:$template:}/images/add.png" alt="Add" class="button" /></a>
<a class="play" href="{:$browselist_play_link:}{:$browselist_item.file|escape:'url':}"><img src="templates/{:$template:}/images/play.png" alt="Play" class="button" /></a>
<a class="browse">
{:if $browselist_item.Title|escape:'html':}
<span class="title">{:$browselist_item.Title|escape:'html':}</span>
{:if $browselist_item.Artist && $show_extra_track_info:}<br /><span class="artist">{:$browselist_item.Artist|escape:'html':}</span> {:if $browselist_item.Album:}<span class="album">({:$browselist_item.Album|escape:'html':})</span>{:/if:}{:/if:}{:else:}{:$browselist_item.file_name|escape:'html':}{:/if:}
</a>
</li>
{:elseif $browselist_item.file:}
{:elseif $browselist_item.file:}
{:if $browselist_item.in_playlist:}<li class="playing">{:else:}<li>{:/if:}<a href="{:$browselist_add_link:}{:$browselist_item.file|escape:'url':}"><img src="templates/{:$template:}/images/add.gif" alt="Add" class="button" /></a><a href="{:$browselist_play_link:}{:$browselist_item.file|escape:'url':}"><img src="templates/{:$template:}/images/play.gif" alt="Play" class="button" /></a><img src="templates/{:$template:}/images/note.gif" class="icon" /> {:if $browselist_item.Title|escape:'html':}<span class="title">{:$browselist_item.Title|escape:'html':}</span>{:if $browselist_item.Artist && $show_extra_track_info:}<br /><span class="artist">{:$browselist_item.Artist|escape:'html':}</span> {:if $browselist_item.Album:}<span class="album">({:$browselist_item.Album|escape:'html':})</span>{:/if:}{:/if:}{:else:}{:$browselist_item.file_name|escape:'html':}{:/if:}</li>
{:if $browselist_item.in_playlist:}
<li class="playing">
{:else:}
<li>
{:/if:}
<a href="{:$browselist_add_link:}{:$browselist_item.file|escape:'url':}"><img src="templates/{:$template:}/images/add.png" alt="Add" class="button" /></a><a href="{:$browselist_play_link:}{:$browselist_item.file|escape:'url':}"><img src="templates/{:$template:}/images/play.png" alt="Play" class="button" /></a><img src="templates/{:$template:}/images/note.gif" class="icon" /> {:if $browselist_item.Title|escape:'html':}<span class="title">{:$browselist_item.Title|escape:'html':}</span>{:if $browselist_item.Artist && $show_extra_track_info:}<br /><span class="artist">{:$browselist_item.Artist|escape:'html':}</span> {:if $browselist_item.Album:}<span class="album">({:$browselist_item.Album|escape:'html':})</span>{:/if:}{:/if:}{:else:}{:$browselist_item.file_name|escape:'html':}{:/if:}</li>
{:/if:}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 968 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

View File

@ -1,14 +1,16 @@
<div id="buttons"><a href="{:$playlist_clear_link:}"><img src="templates/{:$template:}/images/delall.gif" /></a></div>
<div id="list_header">
<div id="buttons"><a href="{:$playlist_clear_link:}"><img src="templates/{:$template:}/images/delall.gif" /></a></div>
</div>
{:if $playlist:}
<div id="list">
{:if $playlist:}
<ul class="list">
{:foreach from=$playlist item=playlist_item:}
{:include file="default/playlist_item.html":}
{:/foreach:}
</ul>
{:else:}
<p>(Empty playlist)</p>
{:/if:}
</div>
</div> {:else:}
<p>(Empty playlist)</p>
{:/if:}

View File

@ -4,7 +4,7 @@
<li>
{:/if:}
<a class="remove" href="{:$playlist_remove_link:}{:$playlist_item.Pos:}"><img src="templates/{:$template:}/images/del.png" alt="Remove from Playlist" class="button" /></a>
<a class="play" href="{:$playlist_play_link:}{:$playlist_item.Pos:}">
<a class="playlist_item" href="{:$playlist_play_link:}{:$playlist_item.Pos:}">
<span class="pos">{:$playlist_item.Pos+1|string_format:"%02d":}</span>
{:if $playlist_item.Title:}
<span class="title">{:$playlist_item.Title:}</span>

View File

@ -65,22 +65,22 @@ p {
width: 106px;
text-shadow: 0 0 12px rgba(150, 210, 255, 0.9);
}
#browse_parent {
#list_header {
height: 30px;
padding: 0;
width: 320px;
margin: 0 auto;
}
#browse_parent p {
#list_header p {
padding: 8px 10px;
text-align: left;
}
#browse_parent a#browse_back {
#list_header a#browse_back {
display: block;
float: left;
width: 45px;
width: 30px;
height: 30px;
margin-right: 10px;
margin-right: 5px;
background: url(templates/{:$template:}/images/back.png) center center no-repeat;
}
#page {
@ -102,10 +102,23 @@ p {
#list ul.list {
margin-top: 0;
}
#list ul li {
padding: 3px 10px 3px 10px;
#list ul .browse {
display: block;
padding: 5px 10px 5px 35px;
border-top: 1px solid white;
border-bottom: 1px solid #aaa;
}
#list ul .playlist_item {
display: block;
padding: 5px 10px 5px 10px;
border-top: 1px solid white;
border-bottom: 1px solid #aaa;
}
#list ul li.dir {
background: url(templates/{:$template:}/images/folder.png) 10px center no-repeat;
}
#list ul li.track {
background: url(templates/{:$template:}/images/music.png) 10px center no-repeat;
}
#list li .pos {
float: left;
@ -119,14 +132,12 @@ p {
li .play {
display: block;
}
li .remove {
li .remove .add .play {
float: right;
padding: 5px 0px 3px;
padding: 5px 0px 3px 5px;
display: block;
}
li.playing {
background: #ccc;
border-bottom: 1px solid #999;
li.playing a {
}
li .title {
font-weight: bold;
@ -165,10 +176,9 @@ li .title {
#page #album {
color: #888;
}
#buttons {
width: 280px;
margin: 0px auto;
padding-top: 10px;
#buttons {
float: right;
margin: 5px 10px 0px 0px;
text-align: right;
}