scottschiller / wheelsofsteel.net

The Wheels Of Steel: Turntables in your browser (a web-based DJ prototype)
http://wheelsofsteel.net/
Other
55 stars 18 forks source link

CSS-assigning images and waveforms #1

Closed githubjohngo closed 13 years ago

githubjohngo commented 13 years ago

So, I added an image 400x400 to record-ui DIV with firebug extension for Firefox and tried the Chrome Developer Tools.

I think it said div class"record-ui empty earlier. Works great however. I was inspecting the wheelsofsteel.css and there is the following: turntable .platter .record .record-ui { /* - record album art, if any, is applied here as a background image. - it should be scaled to the correct size. */ -webkit-background-size: 326px 326px; -moz-background-size: 326px 326px; background-size: 326px 326px; } if I added background-image: url("http://www.koluskomtustudios.com/scottschiller-wheelsofsteel.net/image/underlayover.jpg); (this link is on a shared host but will be offline shortly as it will be sent to Drupal for experimenting with upload fields of both record images and mp3's. The image needs reediting as a record but it does load the image. How does the style sheet know what mp3 to assign it too? wheelsofsteel.js ?
scottschiller commented 13 years ago

It's a simple hack - when looking for album art, it'll swap out .mp3 for .jpg. So whatever URL you load, if there's a .jpg in the same path, it'll grab that.

https://github.com/scottschiller/wheelsofsteel.net/blob/e37d544d7d33aa484875c67e83cd22643b56ea3d/script/wheelsofsteel.js#L3534

githubjohngo commented 13 years ago

Got it. http://www.koluskomtustudios.com/scottschiller-wheelsofsteel.net/index.html

On 7/11/2011 10:57 PM, scottschiller wrote:

It's a simple hack - when looking for album art, it'll swap out .mp3 for .jpg. So whatever URL you load, if there's a .jpg in the same path, it'll grab that.

https://github.com/scottschiller/wheelsofsteel.net/blob/e37d544d7d33aa484875c67e83cd22643b56ea3d/script/wheelsofsteel.js#L3534