Index page styling concept#1

This commit is contained in:
Remy
2011-08-05 00:22:30 -07:00
parent bb8b3730c4
commit a792e8614a
9 changed files with 64 additions and 19 deletions
+3 -4
View File
@@ -4,7 +4,7 @@
-moz-border-radius: 20px; -moz-border-radius: 20px;
width: 88%; width: 88%;
margin: 20px auto 0 auto; margin: 20px auto 0 auto;
padding: 30px; padding: 25px;
background-color: white; background-color: white;
position: relative; position: relative;
min-height: 302px; min-height: 302px;
@@ -38,7 +38,7 @@
width: 50%; width: 50%;
float: right; float: right;
text-align: right; text-align: right;
margin-bottom: 25px; margin-bottom: 15px;
} }
.dataTables_info { .dataTables_info {
@@ -87,7 +87,6 @@
*/ */
table.display { table.display {
margin: 20px auto; margin: 20px auto;
width: 95%;
clear: both; clear: both;
/* Note Firefox 3.5 and before have a bug with border-collapse /* Note Firefox 3.5 and before have a bug with border-collapse
@@ -203,7 +202,7 @@ tr.odd {
} }
tr.even { tr.even {
background-color: #F5F5F5; background-color: white;
} }
+30 -9
View File
@@ -86,6 +86,23 @@ a:hover { color: #036; }
\\ ========================================== // \\ ========================================== //
*/ */
a:link {
color: #5E2612;
text-decoration: none;
}
a:visited {
color: #5E2612;
text-decoration: none;
}
a:hover { /*this effect is not shown in NN4.xx*/
color: #999999;
text-decoration: underline;
}
a:active {/*colour in NN4.xx is red*/
color: #5E2612;
text-decoration: underline;
}
container { } container { }
body { background-color: #EBF4FB } body { background-color: #EBF4FB }
@@ -99,20 +116,24 @@ ul#nav li a:hover { background-color: #EE0000; }
div#searchbar { margin: 24px auto auto 30px; float: left; } div#searchbar { margin: 24px auto auto 30px; float: left; }
table#artist_table th#name { width: 30%; } table#artist_table { background-color: white; }
table#artist_table th#status { width: 10%; }
table#artist_table th#latestalbum { width: 35%; } table#artist_table th#name { text-align: center; }
table#artist_table th#have { width: 20%; } table#artist_table th#album { text-align: center; }
table#artist_table th#reldate { width: 125px; text-align: center; }
table#artist_table th#center { text-align: center; }
table#artist_table td#name { text-align: left; }
table#artist_table td#album { text-align: center; }
table#artist_table td#reldate { width: 125px; text-align: center; }
div.progress-container { border: 1px solid #ccc; width: 100px; height: 14px; margin: 2px 5px 2px 0; padding: 1px; float: left; background: white; }
div.progress-container > div { background-color: #ACE97C; height: 14px; }
.havetracks { font-size: 13px; margin-left: 36px; }
footer { margin: 20px auto 20px auto; } footer { margin: 20px auto 20px auto; }
div#version { text-align: center; font-weight: bold; } div#version { text-align: center; font-weight: bold; }
div#donate { text-align: center; margin: 20px auto 20px auto; } div#donate { text-align: center; margin: 20px auto 20px auto; }
.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; } .ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
.hidden { display: none; visibility: hidden; } .hidden { display: none; visibility: hidden; }
.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } .visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
Binary file not shown.

Before

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

+28 -6
View File
@@ -1,3 +1,6 @@
<%
from headphones import helpers
%>
<%inherit file="base.html"/> <%inherit file="base.html"/>
<%def name="body()"> <%def name="body()">
@@ -5,18 +8,37 @@
<thead> <thead>
<tr> <tr>
<th id="name">Artist Name</th> <th id="name">Artist Name</th>
<th id="status">Status</th> <th id="album">Latest Album</th>
<th id="latestalbum">Latest Album</th> <th id="reldate">Release Date</th>
<th id="have">Have</th> <th id="have">Have</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
%for artist in artists: %for artist in artists:
<%
totaltracks = artist['TotalTracks']
havetracks = artist['HaveTracks']
if not havetracks:
havetracks = 0
try:
percent = (havetracks*100.0)/totaltracks
if percent > 100:
percent = 100
except (ZeroDivisionError, TypeError):
percent = 0
totaltracks = '?'
if artist['ReleaseDate']:
releasedate = artist['ReleaseDate']
else:
releasedate = ''
%>
<tr> <tr>
<td><a href="artistPage?ArtistID=${artist['ArtistID']}">${artist['ArtistName']}</a></td> <td id="name"><a href="artistPage?ArtistID=${artist['ArtistID']}">${artist['ArtistName']} </td>
<td>${artist['Status']}</td> <td id="album"><a href="albumPage?AlbumID=${artist['AlbumID']}">${artist['LatestAlbum']}</td>
<td><a href="albumPage?AlbumID=${artist['AlbumID']}">${artist['LatestAlbum']}</a></td> <td id="reldate">${releasedate}</td>
<td>${artist['HaveTracks']}/${artist['TotalTracks']}</td> <td id="have"><div class="progress-container"><div style="width:${percent}%"><div class="havetracks">${havetracks}/${totaltracks}</div></div></div></td>
</tr> </tr>
%endfor %endfor
</tbody> </tbody>
+3
View File
@@ -2,8 +2,11 @@ $(document).ready(function()
{ {
$('#artist_table').dataTable( $('#artist_table').dataTable(
{ {
"aoColumnDefs": [
{ "bSOtrable": false, "aTargets": [ 1 ] } ],
"bStateSave": true, "bStateSave": true,
"iDisplayLength": 50, "iDisplayLength": 50,
"sPaginationType": "full_numbers", "sPaginationType": "full_numbers",
}); });
}); });