Эх сурвалжийг харах

new, shorter layout for songs

raylu 14 жил өмнө
parent
commit
3f0de294ff
2 өөрчлөгдсөн 14 нэмэгдсэн , 12 устгасан
  1. 9 7
      static/p.css
  2. 5 5
      static/script.js

+ 9 - 7
static/p.css

@@ -75,7 +75,6 @@ section.song {
 	position: relative; /* for remove */
 }
 section.song div.info {
-	margin-bottom: 10px;
 	float: left;
 }
 section.song div.user {
@@ -108,16 +107,15 @@ section.song div.reorder img:hover {
 }
 section.song div.thumb {
 	float: left;
-	width: 140px;
-	height: 90px;
+	width: 100px;
+	height: 60px;
 	overflow: hidden;
 }
 section.song div.thumb img {
-	height: 90px;
+	height: 60px;
 }
-section.song canvas, section.song > img {
-	position: relative;
-	left: 5px;
+section.song > img {
+	margin-top: 16px;
 }
 section.song > img[src$='pause.png'] {
 	display: none;
@@ -128,3 +126,7 @@ section.song > img {
 section.song > img:hover {
 	opacity: 1.0;
 }
+section.song canvas {
+	margin: 15px 0 0 18px;
+	vertical-align: middle;
+}

+ 5 - 5
static/script.js

@@ -278,11 +278,6 @@ function drawAdd(s) {
 								)
 						)
 				)
-			.append($(document.createElement('canvas'))
-					.attr('id', 'c_' + s.yid)
-					.attr('width', 700)
-					.attr('height', 20)
-				)
 			.append($(document.createElement('br')))
 			.append($(document.createElement('img'))
 					.attr('src', '/static/player_play.png')
@@ -301,6 +296,11 @@ function drawAdd(s) {
 					.attr('alt', 'stop')
 					.click(function() {stop(s.yid)})
 				)
+			.append($(document.createElement('canvas'))
+					.attr('id', 'c_' + s.yid)
+					.attr('width', 700)
+					.attr('height', 20)
+				)
 			.append($(document.createElement('br'))
 					.addClass('clear')
 				)