Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Gave it some styling

  • Loading branch information...
commit f774f528aade44330543449775bff4b71cb0f970 1 parent 644abaf
Neil Crosby NeilCrosby authored

Showing 1 changed file with 38 additions and 4 deletions. Show diff stats Hide diff stats

  1. +38 4 index.php
42 index.php
@@ -34,15 +34,42 @@
34 34 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
35 35 <title>Last Genius</title>
36 36 <style>
37   - body {
  37 + body,
  38 + a {
  39 + background: #000;
  40 + color: #eee;
  41 + text-decoration: none;
  42 + font-family: Helvetica, Arial, Sans-serif;
  43 + font-size: 150%;
  44 + }
  45 +
  46 + li,
  47 + p,
  48 + .duration {
  49 + display: none;
  50 + }
  51 +
  52 + li.current {
  53 + display: block;
  54 + }
  55 +
  56 + iframe {
  57 + position: absolute;
  58 + top: 0;
  59 + left: 0;
  60 + width: 1px;
  61 + height: 1px;
  62 + border: none;
38 63 }
39 64 </style>
40 65 </head>
41 66 <body>
42 67 <?php
43 68 echo '<ol id="playlist">';
  69 + $class = ' class="current"';
44 70 foreach ($playlist as $item) {
45   - echo "<li><a href=\"{$item->url}\">{$item->artist->name} - {$item->name} - <span class=\"duration\">{$item->duration}</span></a></li>\n";
  71 + echo "<li$class><a href=\"{$item->url}\">{$item->artist->name} - {$item->name} <span class=\"duration\">{$item->duration}</span></a></li>\n";
  72 + $class = '';
46 73 }
47 74 echo '</ol>';
48 75
@@ -86,9 +113,9 @@
86 113 var player = document.getElementById('music-player'+id);
87 114 player.src = url + '?autostart';
88 115
89   - setTimeout( "YAHOO.tct.lastGenius.destroyTrack(" + (trackNum - 1) + ")", 2000);
  116 + setTimeout( "YAHOO.tct.lastGenius.destroyTrack(" + (trackNum - 1) + ")", 5000);
90 117
91   - setTimeout( "YAHOO.tct.lastGenius.loadNewTrack(" + (trackNum + 1) + ")", 30000);
  118 + setTimeout( "YAHOO.tct.lastGenius.loadNewTrack(" + (trackNum + 1) + ")", 20000);
92 119 },
93 120
94 121 destroyTrack: function(trackNum) {
@@ -97,6 +124,13 @@
97 124
98 125 var player = document.getElementById('music-player'+id);
99 126 player.src = '';
  127 +
  128 + var listEl = yud.get('playlist');
  129 + var listEls = listEl.getElementsByTagName('li');
  130 +
  131 + listEls[trackNum].className = '';
  132 + listEls[trackNum + 1].className = 'current';
  133 +
100 134 }
101 135
102 136

0 comments on commit f774f52

Please sign in to comment.
Something went wrong with that request. Please try again.