Fixed: Too large images

This commit is contained in:
nikolark committed 2011-05-29 22:06:52 +02:00
1 parent f24d60237e
commit 6ba7e00612
2 files changed
+3 -13

No files matched your search

+2
View File
@@ -32,6 +32,8 @@ div#now_playing {
}
div#now_playing img {
margin:auto;
max-width:800px;
max-width:600px;
}
div#last_track {
margin-top:20px;
+1 -13
View File
@@ -6,7 +6,7 @@
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}screen.css" />
<script type="text/javascript" src="{{ MEDIA_URL }}jquery-1.5.2.min.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}jquery.timers-1.2.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}falling_pieces.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}falling-pieces.js"></script>
<script type="text/javascript">
/* Function that updates the capacities */
var get_last_track = function() {
@@ -16,7 +16,6 @@
var get_now_playing = function() {
$( '#now_playing' ).load(
'{% url tracks.views.get_now_playing %}', function() {
resize_img();
if( is_tetris_song() ) {
play_tetris();
} else {
@@ -37,17 +36,6 @@
}).ajaxStop( function() {
$( '#spinner' ).hide();
});
/* resize images to fit screen (ugly) */
function resize_img() {
var image = $("img.now_playing");
if(image.height() > 600) {
image.height(600);
}
else if(image.width() > 1000) {
image.width(1000);
}
}
/* TODO: if the current song is a tetris song, then do something. */
</script>
</head>