Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Some output improvements.
  • Loading branch information
icculus committed Jul 2, 2010
1 parent 5025fcc commit d6fd7a5
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .htaccess
@@ -1,5 +1,5 @@
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript application/xml
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript application/xml text/css
</ifmodule>
<ifmodule mod_setenvif.c>
# Netscape 4.x has some problems...
Expand Down
Binary file added content_bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 30 additions & 18 deletions index.html
@@ -1,6 +1,7 @@
<!doctype html>
<html>
<head>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript">
<!--
Expand All @@ -9,21 +10,37 @@

function render()
{
$('img.avatar').attr('src', profile.avatarurl_small);
if (profile == null)
{
$('div.nickname').text("This user's profile is invalid or marked private");
$('img.avatar').hide();
return;
} // if

$('img.avatar').attr('src', profile.avatarurl_medium);
$('div.nickname').text(profile.nickname);

var gameidx;
for (gameidx in profile.gamelist)
{
var game = profile.gamelist[gameidx];
var html = "<tr><td><img width='189' height='69'src='" + game.logourl + "'/>" +
"<a href='steam://run/" + game.appid + "'>" + game.title +
"</a>";

var tagidx;
for (tagidx in game.tags)
html += " " + game.tags[tagidx];
html += "</td></tr>";
var html = "<tr><td class='gamecell'>" +
"<img width='123' height='45' src='" + game.logourl + "'/>" +
"<td class='gamecell'>" +
"<a href='steam://run/" + game.appid + "'>" +
"<h4>" + game.title + "</h4>" +
"</a><p>Tags:";

if (game.tags.length == 0)
html += ' (none)';
else
{
var tagidx;
for (tagidx in game.tags)
html += " " + game.tags[tagidx];
} // else
html += "</p></td></tr>";

$('table.gametable > tbody:last').append(html);
} // for
} // render
Expand All @@ -32,10 +49,7 @@
{
var prof = $(xml).find('profile');
if (prof.find('valid').text() != '1')
{
alert("This user's profile is invalid or marked private");
return null;
} // if

var retval = {
nickname: prof.find('nickname').text(),
Expand Down Expand Up @@ -106,12 +120,10 @@
</script>
</head>
<body>
<div style="width:100%;">
<img class='avatar' src='loading.gif'/>
<div class='nickname'>Loading your steam profile...</div>
<div style='width:100%; overflow:auto;'>
<table class='gametable'><tbody></tbody></table>
</div>
<div class='main'>
<img class='avatar' src='loading.gif'/>
<div class='nickname' style='display:inline;'>Loading your steam profile...</div>
<table class='gametable'><tbody></tbody></table>
</div>
</body>
</html>
Expand Down
70 changes: 70 additions & 0 deletions style.css
@@ -0,0 +1,70 @@
a {
text-decoration: none;
color: #ffffff;
}


.a:focus {
outline: 0px none;
}

a:hover {
text-decoration: underline;
}

a.nohover:hover {
text-decoration: none;
}

img {
border: none;
}

* {
margin: 0px;
padding: 0px;
}

body {
font-family: Helvetica, Arial, sans-serif;
color: #ffffff;
background-color: #000000;
font-size: 12px;
}

h1 {
font-size: 30px;
font-weight: normal;
}

h2 {
font-size: 24px;
font-weight: normal;
}

h3 {
font-size: 16px;
font-weight: bold;
}

h4 {
font-size: 14px;
font-weight: normal;
}

h5 {
font-size: 10px;
font-weight: normal;
text-transform: uppercase;
}

div.main {
background-image: url(content_bg.png);
background-repeat: repeat-x;
background-color: #000000;
}

td.gamecell {
vertical-align: middle;
}

0 comments on commit d6fd7a5

Please sign in to comment.