diff --git a/lib/actions.php b/lib/actions.php
index 02d14cb..31b8a40 100644
--- a/lib/actions.php
+++ b/lib/actions.php
@@ -45,21 +45,31 @@
header("Location: index.php");
break;
- case "play":
- $mympd->Play();
- header("Location: index.php");
- break;
-
case "stop":
$mympd->Stop();
header("Location: index.php");
break;
+ case "play":
+ $mympd->Play();
+ header("Location: index.php");
+ break;
+
case "pause":
$mympd->Pause();
header("Location: index.php");
break;
+ case 'playpause':
+ if ($mympd->state == 'play') {
+ $mympd->Pause();
+ }
+ else {
+ $mympd->Play();
+ }
+ header("Location: index.php");
+ break;
+
case "prev":
$mympd->Previous();
header("Location: index.php");
@@ -107,8 +117,8 @@
case 'metadata':
- $browse_bits = explode($_CONFIG['separator'], $browse);
-
+ $browse_bits = explode($_CONFIG['separator'], $browse);
+
if (is_array($browse_bits)) {
if ($browse_bits[1]) {
diff --git a/lib/global.php b/lib/global.php
index 727ddfd..5da65f9 100644
--- a/lib/global.php
+++ b/lib/global.php
@@ -11,15 +11,15 @@
$_COOKIE = array_map('stripslashes', $_COOKIE);
}
- require('config/config.inc.php');
-
- switch ($_CONFIG['browse_mode']) {
- case 'filesystem':
- $_CONFIG['separator'] = '/';
- break;
- case 'metadata':
- $_CONFIG['separator'] = '|';
- break;
+ require('config/config.inc.php');
+
+ switch ($_CONFIG['browse_mode']) {
+ case 'filesystem':
+ $_CONFIG['separator'] = '/';
+ break;
+ case 'metadata':
+ $_CONFIG['separator'] = '|';
+ break;
}
define('SMARTY_DIR', 'lib/smarty/libs/');
@@ -31,16 +31,23 @@
$smarty->cache_dir = 'smarty/cache/';
$smarty->assign('version', $version);
- $smarty->assign('template', $_CONFIG['template']);
-
+ $smarty->assign('template', $_CONFIG['template']);
+
require("templates/${_CONFIG['template']}/config.inc.php");
+
+ if ($_CONFIG['smarty_left_delimiter']) {
+ $smarty->left_delimiter = $_CONFIG['smarty_left_delimiter'];
+ }
+ if ($_CONFIG['smarty_right_delimiter']) {
+ $smarty->right_delimiter = $_CONFIG['smarty_right_delimiter'];
+ }
- include('lib/mpd.class.php');
- if ($_CONFIG['password'] != '') {
- $mympd = new mpd($_CONFIG['server'], $_CONFIG['port'], $_CONFIG['password']);
- }
+ include('lib/mpd.class.php');
+ if ($_CONFIG['password'] != '') {
+ $mympd = new mpd($_CONFIG['server'], $_CONFIG['port'], $_CONFIG['password']);
+ }
else {
- $mympd = new mpd($_CONFIG['server'], $_CONFIG['port']);
+ $mympd = new mpd($_CONFIG['server'], $_CONFIG['port']);
}
if (!$mympd->connected) {
diff --git a/lib/page.php b/lib/page.php
index 0091d57..ef7d67d 100644
--- a/lib/page.php
+++ b/lib/page.php
@@ -1,5 +1,7 @@
assign('progressbar_width', $progressbar_width);
$smarty->assign('page', $page);
/* print_r($mympd->playlist); */
@@ -25,7 +27,6 @@
case "control":
/* get the currently playing track */
$current_track = $mympd->playlist[$mympd->current_track_id];
- $smarty->assign('progressbar_width', $_CONFIG['progress_bar_width']);
$smarty->assign('current_track_no', $mympd->current_track_id);
$smarty->assign('current_title', $current_track['Title']);
$smarty->assign('current_album', $current_track['Album']);
@@ -47,7 +48,7 @@
$time_left = (($mympd->current_track_length - $mympd->current_track_position) + 1) * 1000;
- $initialprogress = round(280 - (($mympd->current_track_position / $mympd->current_track_length) * 280));
+ $initialprogress = round($progressbar_width - (($mympd->current_track_position / $mympd->current_track_length) * $progressbar_width));
$smarty->assign('initialprogress', $initialprogress);
$smarty->assign('initialmin', date('i', $mympd->current_track_position));
diff --git a/smarty/templates_c/%%3B^3B9^3B9ACDBF%%styles.css.php b/smarty/templates_c/%%3B^3B9^3B9ACDBF%%styles.css.php
index 9fea23b..3b5b5d9 100644
--- a/smarty/templates_c/%%3B^3B9^3B9ACDBF%%styles.css.php
+++ b/smarty/templates_c/%%3B^3B9^3B9ACDBF%%styles.css.php
@@ -1,6 +1,5 @@
-
-_tpl_vars['template']; ?>
+/images/menu_shadow.png) center 29px repeat-x;
color: #fff;
font: 13px helvetica,verdana,sans-serif;
- text-align: center;
- margin: 45px 0px 0px 0px;
-}
-p {
- margin-bottom: 5px;
-}
-#menu {
- background: #000 url(templates/default/images/menu_back.png);
- position: fixed;
- width: 100%;
- height: 30px;
- top: 0px;
- padding: 0px 2px 0px 0px;
- z-index: 1;
text-align: center;
-}
-#menu ul {
- width: 320px;
+ margin: 45px 0px 0px 0px;
+}
+p {
+ margin-bottom: 5px;
+}
+#menu {
+ background: #111;
+ position: fixed;
+ width: 100%;
+ height: 30px;
+ top: 0px;
+ padding: 0px 2px 0px 0px;
+ z-index: 1;
+ text-align: center;
+}
+#menu ul {
+ width: 320px;
margin: 0px auto;
-}
-#menu li {
- display: block;
+}
+#menu li {
+ display: block;
float: left;
}
-#menu a {
+#menu a {
+ background: #000 url(templates/_tpl_vars['template']; ?>
+/images/menu_back.png);
font: 14px helvetica,verdana,sans-serif;
color: rgba(0, 0, 0, 1);;
text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6);
@@ -49,24 +51,27 @@ p {
margin-left: 0px;
display: block;
width: 107px;
- height: 23px;
+ height: 23px;
text-align: center;
font-weight: bold;
}
#menu a:hover {
- background: #ccc url(templates/default/images/menu_back_active.png);;
+ background: #ccc url(templates/_tpl_vars['template']; ?>
+/images/menu_back_active.png);;
color: #000;
}
#menu a:active {
- background: #ccc url(templates/default/images/menu_back_active.png);;
+ background: #ccc url(templates/_tpl_vars['template']; ?>
+/images/menu_back_active.png);;
color: #000;
}
#menu a.selected {
- background: #333 url(templates/default/images/menu_back_selected.png);
+ background: #333 url(templates/_tpl_vars['template']; ?>
+/images/menu_back_selected.png);
color: #fff;
- width: 106px;
+ width: 106px;
text-shadow: 0 0 12px rgba(150, 210, 255, 0.9);
-}
+}
#page {
padding: 0px;
clear: left;
@@ -84,46 +89,48 @@ p {
#page ul li {
padding: 0px 1px 1px 0px;
border-top: 1px solid #666;
-}
-#song_display {
- position: relative;
- width: 280px;
+}
+#song_display {
+ position: relative;
+ width: 280px;
height: 217px;
margin: 0px auto 5px;
/* height: 55px; */
text-align: left;
font-size: 14px;
}
-#page .pos {
- font-weight: bold;
-}
-#page .title {
- font-size: 16px;
- color: #ffc;
- font-weight: bold;
-}
-#page #song_info {
- text-align: center;
+#page #pos {
+ font-weight: bold;
+}
+#page #title {
+ font-size: 16px;
+ color: #ffc;
+ font-weight: bold;
+}
+#page #song_info {
+ text-align: center;
+ white-space: nowrap;
+ overflow: hidden;
clear: both;
-}
-#page #album_info {
- position: absolute;
- top: 10px;
- left: 150px;
-}
-#page .artist {
- font-style: italic;
-}
-#page .album {
- color: #888;
+}
+#page #album_info {
+ position: absolute;
+ top: 10px;
+ left: 150px;
+}
+#page #artist {
+ font-style: italic;
+}
+#page #album {
+ color: #888;
}
#buttons {
width: 280px;
margin: 0px auto;
padding-top: 10px;
text-align: right;
-}
-
+}
+
img.icon {
margin: 2px 2px -1px 2px;
}
@@ -131,18 +138,110 @@ img.button {
float: right;
margin: 2px 2px -1px 2px;
}
-#controls {
- background: #666 url(templates/default/images/control_back.png) center center repeat-x;
+#controls {
+ background: #666 url(templates/_tpl_vars['template']; ?>
+/images/control_back.png) center center repeat-x;
text-align: center;
- margin: 8px 0px 0px 0px;
- padding: 10px 7px 10px 0px;
+ margin: 8px 0px 0px 0px;
+ padding: 10px 7px 10px 0px;
height: 50px;
}
-#controls #track {
+#controls .container {
+ position: relative;
+ width: 280px;
+ margin: 0px auto;
}
-#controls a {
+#controls #main_controls {
+ width: 280px;
+}
+#controls #main_controls li {
+ display: block;
+ float: left;
+ border: 0;
+}
+#controls #main_controls a {
+ background-image: url(templates/_tpl_vars['template']; ?>
+/images/buttons.png);
+ background-repeat: no-repeat;
+ display: block;
+ float: left;
+ width: 50px;
+ height: 50px;
margin-left: 7px;
-}
+}
+#main_controls #prev_button {
+ background-position: 0px 0px;
+}
+#main_controls #playpause_button {
+ background-position: -50px 0px;
+}
+#main_controls #playpause_button.pause {
+ background-position: -100px 0px;
+}
+#main_controls #stop_button {
+ background-position: -150px 0px;
+}
+#main_controls #next_button {
+ background-position: -200px 0px;
+}
+
+#main_controls #prev_button:hover {
+ background-position: 0px -50px;
+}
+#main_controls #playpause_button:hover {
+ background-position: -50px -50px;
+}
+#main_controls #playpause_button.pause:hover {
+ background-position: -100px -50px;
+}
+#main_controls #stop_button:hover {
+ background-position: -150px -50px;
+}
+#main_controls #next_button:hover {
+ background-position: -200px -50px;
+}
+
+#volume_repeat {
+ position: absolute;
+ left: 250px;
+}
+#volume_repeat a {
+ display: block;
+ width: 30px;
+ height: 20px;
+ margin-bottom: 10px;
+ background-position: 0px 0px;
+ background-repeat: no-repeat;
+}
+#volume_repeat #volume_button {
+ background-image: url(templates/_tpl_vars['template']; ?>
+/images/shuffle.png);
+}
+#volume_repeat #repeat_button {
+ background-image: url(templates/_tpl_vars['template']; ?>
+/images/repeat.png);
+}
+#volume_repeat #volume_button:hover {
+ background-position: 0px -20px;
+}
+#volume_repeat #repeat_button:hover {
+ background-position: 0px -20px;
+}
+#volume_repeat #repeat_button.selected {
+ background-position: -30px 0px;
+}
+#volume_repeat #repeat_button.selected:hover {
+ background-position: -30px -20px;
+}
+
+#volume_container {
+ position: absolute;
+ display: none;
+ top: -120px;
+ background: rgba(255, 0, 0, 0.5);
+ height: 140px;
+ width: 30px;
+}
#crumb_trail ul {
list-style-position: inside;
@@ -156,44 +255,43 @@ img.button {
}
li.playing {
background: #444;
-}
-#progress {
- background: #222 url(templates/default/images/progress_back.png) center center repeat-x;
- border: 1px solid #666;
- padding: 2px;
- width: 276px;
- height: 10px;
- margin: 5px auto 15px;
- text-align: left;
- clear: both;
-}
-#progressbar {
- font-size: 1px;
- background: #ccc url(templates/default/images/progress.png) center center repeat-x;;
- height: 10px;
- margin: 0px;
- padding: 0px;
}
-#cover_image {
- float: left;
- height: 130px;
- width: 130px;
- margin: 10px 0px 20px;
-}
-img#cover {
- background: #111;
- padding: 2px;
+#progress {
+ background: #222 url(templates/_tpl_vars['template']; ?>
+/images/progress_back.png) center center repeat-x;
border: 1px solid #666;
-}
-#tracktime {
- font-weight: bold;
- position: absolute;
- top: 130px;
- left: 150px;
-}
-#tracktime #total {
- color: #666;
-}
-
-'; ?>
-http://www.google.com
\ No newline at end of file
+ padding: 2px;
+ width: 276px;
+ height: 10px;
+ margin: 5px auto 10px;
+ text-align: left;
+ clear: both;
+}
+#progressbar {
+ font-size: 1px;
+ background: #ccc url(templates/_tpl_vars['template']; ?>
+/images/progress.png) center center repeat-x;;
+ height: 10px;
+ margin: 0px;
+ padding: 0px;
+}
+#cover_image {
+ float: left;
+ height: 130px;
+ width: 130px;
+ margin: 10px 0px 20px;
+}
+img#cover {
+ background: #111;
+ padding: 2px;
+ border: 1px solid #666;
+}
+#tracktime {
+ font-weight: bold;
+ position: absolute;
+ top: 130px;
+ left: 150px;
+}
+#tracktime #total {
+ color: #666;
+}
\ No newline at end of file
diff --git a/smarty/templates_c/%%3F^3F8^3F8E1A98%%playlist_item.html.php b/smarty/templates_c/%%3F^3F8^3F8E1A98%%playlist_item.html.php
index d45751f..b2333ba 100644
--- a/smarty/templates_c/%%3F^3F8^3F8E1A98%%playlist_item.html.php
+++ b/smarty/templates_c/%%3F^3F8^3F8E1A98%%playlist_item.html.php
@@ -1,14 +1,17 @@
-
array(array('modifier', 'string_format', 'default/playlist_item.html', 1, false),)), $this); ?>
- _tpl_vars['playlist_item']['Pos'] == $this->_tpl_vars['playing']): ?>


_tpl_vars['playlist_item']['Pos']+1)) ? $this->_run_mod_handler('string_format', true, $_tmp, "%02d") : smarty_modifier_string_format($_tmp, "%02d")); ?>
. _tpl_vars['playlist_item']['Title']): ?>_tpl_vars['playlist_item']['Title']; ?>
_tpl_vars['playlist_item']['Artist'] && $this->_tpl_vars['show_extra_track_info']): ?>
_tpl_vars['playlist_item']['Artist']; ?>
_tpl_vars['playlist_item']['Album']): ?>(_tpl_vars['playlist_item']['Album']; ?>
-)_tpl_vars['playlist_item']['file_name']; endif; ?>
\ No newline at end of file
+)_tpl_vars['playlist_item']['file_name']; ?>
+
\ No newline at end of file
diff --git a/smarty/templates_c/%%73^73A^73AF6CEB%%menu.html.php b/smarty/templates_c/%%73^73A^73AF6CEB%%menu.html.php
index e6cb561..c96f781 100644
--- a/smarty/templates_c/%%73^73A^73AF6CEB%%menu.html.php
+++ b/smarty/templates_c/%%73^73A^73AF6CEB%%menu.html.php
@@ -1,13 +1,12 @@
-
-
\ No newline at end of file
+
+
diff --git a/smarty/templates_c/%%81^81D^81D213F2%%browselist_item.html.php b/smarty/templates_c/%%81^81D^81D213F2%%browselist_item.html.php
index 0cfa369..8712cc7 100644
--- a/smarty/templates_c/%%81^81D^81D213F2%%browselist_item.html.php
+++ b/smarty/templates_c/%%81^81D^81D213F2%%browselist_item.html.php
@@ -1,4 +1,4 @@
-
array(array('modifier', 'escape', 'default/browselist_item.html', 4, false),)), $this); ?>
@@ -26,26 +26,32 @@ smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'd
_tpl_vars['browselist_item']['Title']): ?>
- _tpl_vars['browselist_item']['in_playlist']): ?>

_tpl_vars['browselist_item']['Title'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html'))): ?>_tpl_vars['browselist_item']['Title'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
_tpl_vars['browselist_item']['Artist'] && $this->_tpl_vars['show_extra_track_info']): ?>
_tpl_vars['browselist_item']['Artist'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
_tpl_vars['browselist_item']['Album']): ?>(_tpl_vars['browselist_item']['Album'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
-)_tpl_vars['browselist_item']['file_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); endif; ?>
+)_tpl_vars['browselist_item']['file_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
+
_tpl_vars['browselist_item']['file']): ?>
- _tpl_vars['browselist_item']['in_playlist']): ?>

_tpl_vars['browselist_item']['Title'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html'))): ?>_tpl_vars['browselist_item']['Title'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
_tpl_vars['browselist_item']['Artist'] && $this->_tpl_vars['show_extra_track_info']): ?>
_tpl_vars['browselist_item']['Artist'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
_tpl_vars['browselist_item']['Album']): ?>(_tpl_vars['browselist_item']['Album'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
-)_tpl_vars['browselist_item']['file_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); endif; ?>
+)_tpl_vars['browselist_item']['file_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
+
\ No newline at end of file
diff --git a/smarty/templates_c/%%86^860^86006DCD%%browse.html.php b/smarty/templates_c/%%86^860^86006DCD%%browse.html.php
index b55081e..473cf43 100644
--- a/smarty/templates_c/%%86^860^86006DCD%%browse.html.php
+++ b/smarty/templates_c/%%86^860^86006DCD%%browse.html.php
@@ -1,4 +1,4 @@
-
array(array('modifier', 'escape', 'default/browse.html', 6, false),)), $this); ?>
diff --git a/smarty/templates_c/%%A0^A09^A09C29AE%%playlist.html.php b/smarty/templates_c/%%A0^A09^A09C29AE%%playlist.html.php
index 6d51d2c..4a13fe0 100644
--- a/smarty/templates_c/%%A0^A09^A09C29AE%%playlist.html.php
+++ b/smarty/templates_c/%%A0^A09^A09C29AE%%playlist.html.php
@@ -1,4 +1,4 @@
-
_tpl_vars['playlist']): ?>
-
+
+
diff --git a/smarty/templates_c/%%C1^C14^C14AEF59%%index.html.php b/smarty/templates_c/%%C1^C14^C14AEF59%%index.html.php
index 8b63220..5d4d339 100644
--- a/smarty/templates_c/%%C1^C14^C14AEF59%%index.html.php
+++ b/smarty/templates_c/%%C1^C14^C14AEF59%%index.html.php
@@ -1,4 +1,4 @@
-
@@ -6,7 +6,7 @@
NeoMPC _tpl_vars['version']; ?>
-
+
-
+
+
+
+
+
-
-
_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "default/menu.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
diff --git a/templates/default/browse.html b/templates/default/browse.html
index 63ff128..528d11c 100644
--- a/templates/default/browse.html
+++ b/templates/default/browse.html
@@ -1,17 +1,17 @@
-
+
- {foreach from=$browselist item=browselist_item}
- {include file="default/browselist_item.html"}
- {/foreach}
+ {:foreach from=$browselist item=browselist_item:}
+ {:include file="default/browselist_item.html":}
+ {:/foreach:}
diff --git a/templates/default/browselist_item.html b/templates/default/browselist_item.html
index 4e5e5a0..f98b794 100644
--- a/templates/default/browselist_item.html
+++ b/templates/default/browselist_item.html
@@ -1,22 +1,22 @@
- {if $browselist_item.directory}
+ {:if $browselist_item.directory:}
-
{$browselist_item.directory_name|escape:'html'}
+
{:$browselist_item.directory_name|escape:'html':}
- {elseif $browselist_item.metaArtist}
+ {:elseif $browselist_item.metaArtist:}
-
{$browselist_item.metaArtist|escape:'html'}
+
{:$browselist_item.metaArtist|escape:'html':}
- {elseif $browselist_item.metaAlbum}
+ {:elseif $browselist_item.metaAlbum:}
-
{$browselist_item.metaAlbum|escape:'html'}
+
{:$browselist_item.metaAlbum|escape:'html':}
- {elseif $browselist_item.Title}
+ {:elseif $browselist_item.Title:}
- {if $browselist_item.in_playlist}{else}{/if}

{if $browselist_item.Title|escape:'html'}{$browselist_item.Title|escape:'html'}{if $browselist_item.Artist && $show_extra_track_info}
{$browselist_item.Artist|escape:'html'} {if $browselist_item.Album}({$browselist_item.Album|escape:'html'}){/if}{/if}{else}{$browselist_item.file_name|escape:'html'}{/if}
+ {:if $browselist_item.in_playlist:}{:else:}{:/if:}

{:if $browselist_item.Title|escape:'html':}{:$browselist_item.Title|escape:'html':}{:if $browselist_item.Artist && $show_extra_track_info:}
{:$browselist_item.Artist|escape:'html':} {:if $browselist_item.Album:}({:$browselist_item.Album|escape:'html':}){:/if:}{:/if:}{:else:}{:$browselist_item.file_name|escape:'html':}{:/if:}
- {elseif $browselist_item.file}
+ {:elseif $browselist_item.file:}
- {if $browselist_item.in_playlist}{else}{/if}

{if $browselist_item.Title|escape:'html'}{$browselist_item.Title|escape:'html'}{if $browselist_item.Artist && $show_extra_track_info}
{$browselist_item.Artist|escape:'html'} {if $browselist_item.Album}({$browselist_item.Album|escape:'html'}){/if}{/if}{else}{$browselist_item.file_name|escape:'html'}{/if}
+ {:if $browselist_item.in_playlist:}{:else:}{:/if:}

{:if $browselist_item.Title|escape:'html':}{:$browselist_item.Title|escape:'html':}{:if $browselist_item.Artist && $show_extra_track_info:}
{:$browselist_item.Artist|escape:'html':} {:if $browselist_item.Album:}({:$browselist_item.Album|escape:'html':}){:/if:}{:/if:}{:else:}{:$browselist_item.file_name|escape:'html':}{:/if:}
- {/if}
+ {:/if:}
diff --git a/templates/default/config.inc.php b/templates/default/config.inc.php
index 0690822..039ac89 100644
--- a/templates/default/config.inc.php
+++ b/templates/default/config.inc.php
@@ -1,5 +1,8 @@
- {if $coverimage}

{else}

{/if}
+
+
+
+
+
+
+ --:--
+
+
+
+
+
-
-
+
+
diff --git a/templates/default/index.html b/templates/default/index.html
index d3c71a2..2065135 100644
--- a/templates/default/index.html
+++ b/templates/default/index.html
@@ -2,31 +2,34 @@
- NeoMPC {$version}
-
+ NeoMPC {:$version:}
+
-
+ {:include file="default/styles.css":}
+
+
+
+
+
-
-
- {include file="default/menu.html"}
+ {:include file="default/menu.html":}
- {include file="default/$page.html"}
+ {:include file="default/$page.html":}
- {$refresh}
+ {:$refresh:}
diff --git a/templates/default/menu.html b/templates/default/menu.html
index 5a47180..5ffc475 100644
--- a/templates/default/menu.html
+++ b/templates/default/menu.html
@@ -1,8 +1,8 @@
-
+
+
+
diff --git a/templates/default/playlist.html b/templates/default/playlist.html
index 45c5878..1845ee2 100644
--- a/templates/default/playlist.html
+++ b/templates/default/playlist.html
@@ -1,12 +1,12 @@
- {if $playlist}
-
+ {:if $playlist:}
+
- {foreach from=$playlist item=playlist_item}
- {include file="default/playlist_item.html"}
- {/foreach}
+ {:foreach from=$playlist item=playlist_item:}
+ {:include file="default/playlist_item.html":}
+ {:/foreach:}
- {else}
+ {:else:}
(Empty playlist)
- {/if}
+ {:/if:}
diff --git a/templates/default/playlist_item.html b/templates/default/playlist_item.html
index b3dfa7e..d5eb2fd 100644
--- a/templates/default/playlist_item.html
+++ b/templates/default/playlist_item.html
@@ -1 +1 @@
- {if $playlist_item.Pos == $playing}{else}{/if}

{$playlist_item.Pos+1|string_format:"%02d"}. {if $playlist_item.Title}{$playlist_item.Title}{if $playlist_item.Artist && $show_extra_track_info}
{$playlist_item.Artist} {if $playlist_item.Album}({$playlist_item.Album}){/if}{/if}{else}{$playlist_item.file_name}{/if}
+ {:if $playlist_item.Pos == $playing:}{:else:}{:/if:}

{:$playlist_item.Pos+1|string_format:"%02d":}. {:if $playlist_item.Title:}{:$playlist_item.Title:}{:if $playlist_item.Artist && $show_extra_track_info:}
{:$playlist_item.Artist:} {:if $playlist_item.Album:}({:$playlist_item.Album:}){:/if:}{:/if:}{:else:}{:$playlist_item.file_name:}{:/if:}
diff --git a/templates/default/styles.css b/templates/default/styles.css
index 006a5f7..a0d26cc 100644
--- a/templates/default/styles.css
+++ b/templates/default/styles.css
@@ -1,4 +1,3 @@
-{literal}
* {
margin: 0px;
padding: 0px;
@@ -11,34 +10,35 @@ a {
color: #fff;
}
body {
- background: #333 url(templates/default/images/menu_shadow.png) center 29px repeat-x;
+ background: #333 url(templates/{:$template:}/images/menu_shadow.png) center 29px repeat-x;
color: #fff;
font: 13px helvetica,verdana,sans-serif;
- text-align: center;
- margin: 45px 0px 0px 0px;
-}
-p {
- margin-bottom: 5px;
-}
-#menu {
- background: #000 url(templates/default/images/menu_back.png);
- position: fixed;
- width: 100%;
- height: 30px;
- top: 0px;
- padding: 0px 2px 0px 0px;
- z-index: 1;
text-align: center;
-}
-#menu ul {
- width: 320px;
+ margin: 45px 0px 0px 0px;
+}
+p {
+ margin-bottom: 5px;
+}
+#menu {
+ background: #111;
+ position: fixed;
+ width: 100%;
+ height: 30px;
+ top: 0px;
+ padding: 0px 2px 0px 0px;
+ z-index: 1;
+ text-align: center;
+}
+#menu ul {
+ width: 320px;
margin: 0px auto;
-}
-#menu li {
- display: block;
+}
+#menu li {
+ display: block;
float: left;
}
-#menu a {
+#menu a {
+ background: #000 url(templates/{:$template:}/images/menu_back.png);
font: 14px helvetica,verdana,sans-serif;
color: rgba(0, 0, 0, 1);;
text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6);
@@ -47,24 +47,24 @@ p {
margin-left: 0px;
display: block;
width: 107px;
- height: 23px;
+ height: 23px;
text-align: center;
font-weight: bold;
}
#menu a:hover {
- background: #ccc url(templates/default/images/menu_back_active.png);;
+ background: #ccc url(templates/{:$template:}/images/menu_back_active.png);;
color: #000;
}
#menu a:active {
- background: #ccc url(templates/default/images/menu_back_active.png);;
+ background: #ccc url(templates/{:$template:}/images/menu_back_active.png);;
color: #000;
}
#menu a.selected {
- background: #333 url(templates/default/images/menu_back_selected.png);
+ background: #333 url(templates/{:$template:}/images/menu_back_selected.png);
color: #fff;
- width: 106px;
+ width: 106px;
text-shadow: 0 0 12px rgba(150, 210, 255, 0.9);
-}
+}
#page {
padding: 0px;
clear: left;
@@ -82,46 +82,48 @@ p {
#page ul li {
padding: 0px 1px 1px 0px;
border-top: 1px solid #666;
-}
-#song_display {
- position: relative;
- width: 280px;
+}
+#song_display {
+ position: relative;
+ width: 280px;
height: 217px;
margin: 0px auto 5px;
/* height: 55px; */
text-align: left;
font-size: 14px;
}
-#page .pos {
- font-weight: bold;
-}
-#page .title {
- font-size: 16px;
- color: #ffc;
- font-weight: bold;
-}
-#page #song_info {
- text-align: center;
+#page #pos {
+ font-weight: bold;
+}
+#page #title {
+ font-size: 16px;
+ color: #ffc;
+ font-weight: bold;
+}
+#page #song_info {
+ text-align: center;
+ white-space: nowrap;
+ overflow: hidden;
clear: both;
-}
-#page #album_info {
- position: absolute;
- top: 10px;
- left: 150px;
-}
-#page .artist {
- font-style: italic;
-}
-#page .album {
- color: #888;
+}
+#page #album_info {
+ position: absolute;
+ top: 10px;
+ left: 150px;
+}
+#page #artist {
+ font-style: italic;
+}
+#page #album {
+ color: #888;
}
#buttons {
width: 280px;
margin: 0px auto;
padding-top: 10px;
text-align: right;
-}
-
+}
+
img.icon {
margin: 2px 2px -1px 2px;
}
@@ -129,18 +131,106 @@ img.button {
float: right;
margin: 2px 2px -1px 2px;
}
-#controls {
- background: #666 url(templates/default/images/control_back.png) center center repeat-x;
+#controls {
+ background: #666 url(templates/{:$template:}/images/control_back.png) center center repeat-x;
text-align: center;
- margin: 8px 0px 0px 0px;
- padding: 10px 7px 10px 0px;
+ margin: 8px 0px 0px 0px;
+ padding: 10px 7px 10px 0px;
height: 50px;
}
-#controls #track {
+#controls .container {
+ position: relative;
+ width: 280px;
+ margin: 0px auto;
}
-#controls a {
+#controls #main_controls {
+ width: 280px;
+}
+#controls #main_controls li {
+ display: block;
+ float: left;
+ border: 0;
+}
+#controls #main_controls a {
+ background-image: url(templates/{:$template:}/images/buttons.png);
+ background-repeat: no-repeat;
+ display: block;
+ float: left;
+ width: 50px;
+ height: 50px;
margin-left: 7px;
-}
+}
+#main_controls #prev_button {
+ background-position: 0px 0px;
+}
+#main_controls #playpause_button {
+ background-position: -50px 0px;
+}
+#main_controls #playpause_button.pause {
+ background-position: -100px 0px;
+}
+#main_controls #stop_button {
+ background-position: -150px 0px;
+}
+#main_controls #next_button {
+ background-position: -200px 0px;
+}
+
+#main_controls #prev_button:hover {
+ background-position: 0px -50px;
+}
+#main_controls #playpause_button:hover {
+ background-position: -50px -50px;
+}
+#main_controls #playpause_button.pause:hover {
+ background-position: -100px -50px;
+}
+#main_controls #stop_button:hover {
+ background-position: -150px -50px;
+}
+#main_controls #next_button:hover {
+ background-position: -200px -50px;
+}
+
+#volume_repeat {
+ position: absolute;
+ left: 250px;
+}
+#volume_repeat a {
+ display: block;
+ width: 30px;
+ height: 20px;
+ margin-bottom: 10px;
+ background-position: 0px 0px;
+ background-repeat: no-repeat;
+}
+#volume_repeat #volume_button {
+ background-image: url(templates/{:$template:}/images/shuffle.png);
+}
+#volume_repeat #repeat_button {
+ background-image: url(templates/{:$template:}/images/repeat.png);
+}
+#volume_repeat #volume_button:hover {
+ background-position: 0px -20px;
+}
+#volume_repeat #repeat_button:hover {
+ background-position: 0px -20px;
+}
+#volume_repeat #repeat_button.selected {
+ background-position: -30px 0px;
+}
+#volume_repeat #repeat_button.selected:hover {
+ background-position: -30px -20px;
+}
+
+#volume_container {
+ position: absolute;
+ display: none;
+ top: -120px;
+ background: rgba(255, 0, 0, 0.5);
+ height: 140px;
+ width: 30px;
+}
#crumb_trail ul {
list-style-position: inside;
@@ -154,43 +244,41 @@ img.button {
}
li.playing {
background: #444;
-}
-#progress {
- background: #222 url(templates/default/images/progress_back.png) center center repeat-x;
- border: 1px solid #666;
- padding: 2px;
- width: 276px;
- height: 10px;
- margin: 5px auto 15px;
- text-align: left;
- clear: both;
-}
-#progressbar {
- font-size: 1px;
- background: #ccc url(templates/default/images/progress.png) center center repeat-x;;
- height: 10px;
- margin: 0px;
- padding: 0px;
}
-#cover_image {
- float: left;
- height: 130px;
- width: 130px;
- margin: 10px 0px 20px;
-}
-img#cover {
- background: #111;
- padding: 2px;
+#progress {
+ background: #222 url(templates/{:$template:}/images/progress_back.png) center center repeat-x;
border: 1px solid #666;
-}
-#tracktime {
- font-weight: bold;
- position: absolute;
- top: 130px;
- left: 150px;
-}
-#tracktime #total {
- color: #666;
-}
-
-{/literal}http://www.google.com
+ padding: 2px;
+ width: 276px;
+ height: 10px;
+ margin: 5px auto 10px;
+ text-align: left;
+ clear: both;
+}
+#progressbar {
+ font-size: 1px;
+ background: #ccc url(templates/{:$template:}/images/progress.png) center center repeat-x;;
+ height: 10px;
+ margin: 0px;
+ padding: 0px;
+}
+#cover_image {
+ float: left;
+ height: 130px;
+ width: 130px;
+ margin: 10px 0px 20px;
+}
+img#cover {
+ background: #111;
+ padding: 2px;
+ border: 1px solid #666;
+}
+#tracktime {
+ font-weight: bold;
+ position: absolute;
+ top: 130px;
+ left: 150px;
+}
+#tracktime #total {
+ color: #666;
+}