windhamdavid 5 years ago
parent
commit
f9eb4217d1
4 changed files with 42 additions and 45 deletions
  1. 21 28
      css/player.css
  2. 1 1
      functions.php
  3. 10 12
      js/last.fm.js
  4. 10 4
      page-music.php

+ 21 - 28
css/player.css

@@ -1,9 +1,5 @@
 /* @override http://macs.local/david/wp-content/themes/dw/css/player.css */
 
-div#player-container{
-	width: 100%;
-}
-
 div#player{
 	width: 100%;
 	color: #555555;
@@ -18,39 +14,36 @@ div#player{
 #controls{
 	float: left;
 }
+#amplitude-volume-slider{
+	width: 90%;
+	float: right;
+}
 #amplitude-play-pause{
-    width: 15px;
-    height: 17px;
-    margin: 0 5px 0 0;
-    cursor: pointer;
-    float: right;
+	width: 15px;
+	height: 17px;
+	margin: 0 5px 0 0;
+	cursor: pointer;
+	float: right;
+}
+#amplitude-current-time{
+	font-family: 'PT Sans', sans-serif;
+	font-size: 14px;
+	font-weight: 400;
 }
 .amplitude-paused{
-    background-image: url('../img/small-gray-play.png');
-    background-repeat: no-repeat;
+	background-image: url('../img/small-gray-play.png');
+	background-repeat: no-repeat;
 }
 .amplitude-playing{
-    background-image: url('../img/small-gray-pause.png');
-    background-repeat: no-repeat;
-}
-#amplitude-volume-slider{
-	width: 80%;
-	float: right;
+	background-image: url('../img/small-gray-pause.png');
+	background-repeat: no-repeat;
 }
 #amplitude-now-playing-name{
-	font-size: 10px;
-	margin: -20px 0 0;
-	float: right;
-	width: 60%;
+
 }
 #amplitude-now-playing-listeners{
-	width: 30%;
+
 }
 #amplitude-now-playing-bitrate{
-	width: 30%;
-}
-#amplitude-current-time{
-	font-family: 'PT Sans', sans-serif;
-	font-size: 14px;
-	font-weight: 400;
+
 }

+ 1 - 1
functions.php

@@ -70,7 +70,7 @@ function dw_scripts() {
 		//wp_enqueue_script( 'init', get_template_directory_uri() . '/js/init-o.min.js', 'jquery', '', true );
 		wp_enqueue_script( 'jplayer', get_template_directory_uri() . '/js/amp.min.js', 'jquery', '', true );
 		wp_enqueue_script( 'chart', get_template_directory_uri() . '/js/chart.min.js', 'jquery', '', true );
-		wp_enqueue_script( 'last-fm', get_template_directory_uri() . '/js/last.fm.js', 'jquery', '', true );
+		wp_enqueue_script( 'last-fm', get_template_directory_uri() . '/js/fm.js', 'jquery', '', true );
 	}
 
 	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {

+ 10 - 12
js/last.fm.js

@@ -585,6 +585,15 @@ $(function(){
 });
 */
 
+amplitude_config = {
+	"amplitude_songs": [
+		{
+			"url": "http://64.207.154.37:8008/stream",
+			"live": true
+		}
+	],
+	"amplitude_volume": 90
+}
 
 function radioTitle() {
  
@@ -611,15 +620,4 @@ function radioTitle() {
 $(document).ready(function () {
     setTimeout(function () {radioTitle();}, 2000);
     setInterval(function () {radioTitle();}, 30000); // update every 30 seconds
-});
-
-
-amplitude_config = {
-	"amplitude_songs": [
-		{
-			"url": "http://64.207.154.37:8008/stream",
-			"live": true
-		}
-	],
-	"amplitude_volume": 70
-}	
+});	

+ 10 - 4
page-music.php

@@ -139,11 +139,17 @@ get_header(); ?>
 								<div class="panel-body">
 									<div id="player">
 										<div id="song-information">
-											<span id="amplitude-now-playing-listeners">Listeners: <span id="listeners">00</span> - Peak: <span id="peak-listeners">00</span></span><br>
-											<span id="amplitude-now-playing-bitrate">Bitrate: <span id="bitrate">bitrate</span> Kbps 44.100 Khz</span>
-											<span id="amplitude-now-playing-name">Current track: <span id="track">Off Air</span></span><br>
+											<div class="row">
+												<div class="col-xs-6">
+													<span id="amplitude-now-playing-listeners">Listeners: <span id="listeners">00</span> - Peak: <span id="peak-listeners">00</span></span><br>
+													<span id="amplitude-now-playing-bitrate">Bitrate: <span id="bitrate">00</span> Kbps 44.100 Khz</span>
+												</div>
+												<div class="col-xs-6">
+													<span id="amplitude-now-playing-name">Current track: <span id="track">* Off Air *</span></span><br>
+												</div>
+											</div>
 										</div>
-										<input class="bar" type="range" id="amplitude-volume-slider" value="50"/>
+										<input class="bar" type="range" id="amplitude-volume-slider" value="90"/>
 									<div id="controls">
 										<div id="amplitude-play-pause" class="amplitude-paused"></div><br>
 											<span id="amplitude-current-time">0:00</span>