فهرست منبع

some style details

raylu 14 سال پیش
والد
کامیت
55f8d5a0d4
3فایلهای تغییر یافته به همراه37 افزوده شده و 18 حذف شده
  1. 16 2
      static/base.css
  2. 3 2
      static/script.js
  3. 18 14
      templates/p.html

+ 16 - 2
static/base.css

@@ -1,7 +1,7 @@
 body {
 	background-color: #000;
 	color: #ccc;
-	font-family: sans-serif;
+	font-family: 'Cantarell', sans-serif;
 }
 a:link, a:visited {
 	color: #08a;
@@ -21,6 +21,10 @@ header, article {
 	margin: 20px auto;
 }
 
+img.aa {
+	opacity: 0.9;
+}
+
 object#player {
 	position: absolute;
 	left: -1px;
@@ -32,8 +36,12 @@ section.song {
 	padding: 15px 20px;
 	margin-top: 10px;
 }
-section.song .info {
+section.song div.info {
 	margin-bottom: 10px;
+	float: left;
+}
+section.song div.user {
+	float: right;
 }
 section.song div.thumb {
 	float: left;
@@ -47,6 +55,12 @@ section.song canvas, section.song > img {
 section.song > img[src$='pause.png'] {
 	display: none;
 }
+section.song > img {
+	opacity: 0.5;
+}
+section.song > img:hover {
+	opacity: 1.0;
+}
 
 .clear {
 	line-height: 0;

+ 3 - 2
static/script.js

@@ -76,13 +76,14 @@ function pause(yid) {
 	if (current_id != yid)
 		return
 	player.pauseVideo();
-	showPlay(yid)
+	showPlay(yid);
 }
 function stop(yid) {
 	if (current_id != yid)
 		return
 	player.stopVideo();
-	showPlay(yid)
+	showPlay(yid);
+	drawBar(yid);
 }
 
 function showPlay(yid) {

+ 18 - 14
templates/p.html

@@ -3,29 +3,33 @@
 <head>
 	<meta charset="UTF-8">
 	<title>Audio Axis</title>
+	<link href='http://fonts.googleapis.com/css?family=Cantarell' rel='stylesheet'>
 	<link href="/static/base.css" rel="stylesheet">
 </head>
 
 <body>
 	<header>
-		<img src="/static/audioaxis-white.png" alt="Audio Axis">
+		<img src="/static/audioaxis-white.png" alt="Audio Axis" class="aa">
 	</header>
 	<article>
 		{{range .Songs}}
 			<section class="song">
-			<div class="info">
-				<a href="http://www.youtube.com/watch?v={{.Yid}}">{{.Name}}</a>
-				{{.User}}
-			</div>
-			<div class="thumb">
-				<img src="http://i.ytimg.com/vi/{{.Yid}}/1.jpg" alt="{{.Name}}">
-			</div>
-			<canvas id="{{.Yid}}" width="700" height="20"></canvas>
-			<br>
-			<img src="/static/player_play.png" alt="Play" onclick="play('{{.Yid}}')" id="play_{{.Yid}}">
-			<img src="/static/player_pause.png" alt="Pause" onclick="pause('{{.Yid}}')" id="pause_{{.Yid}}">
-			<img src="/static/player_stop.png" alt="Stop" onclick="stop('{{.Yid}}')">
-			<br class="clear">
+				<div class="info">
+					<a href="http://www.youtube.com/watch?v={{.Yid}}">{{.Name}}</a>
+				</div>
+				<div class="user">
+					{{.User}}
+				</div>
+				<br class="clear">
+				<div class="thumb">
+					<img src="http://i.ytimg.com/vi/{{.Yid}}/1.jpg" alt="{{.Name}}">
+				</div>
+				<canvas id="{{.Yid}}" width="700" height="20"></canvas>
+				<br>
+				<img src="/static/player_play.png" alt="Play" onclick="play('{{.Yid}}')" id="play_{{.Yid}}">
+				<img src="/static/player_pause.png" alt="Pause" onclick="pause('{{.Yid}}')" id="pause_{{.Yid}}">
+				<img src="/static/player_stop.png" alt="Stop" onclick="stop('{{.Yid}}')">
+				<br class="clear">
 			</section>
 		{{else}}
 			No songs found