diff options
author | raylu <raylu@gridium.com> | 2013-10-22 22:22:26 -0700 |
---|---|---|
committer | raylu <raylu@gridium.com> | 2013-10-22 22:22:26 -0700 |
commit | 29d0528ec6ff9cf61af3bab2feb71dcb3625240a (patch) | |
tree | 74e0b143e576fee14a217f74e8cf414b70e75c40 /web/static | |
parent | 0dea8f430e4905da98d7009bdf111e0965fedd22 (diff) | |
download | ykill-29d0528ec6ff9cf61af3bab2feb71dcb3625240a.tar.xz |
most expensive kills on homepage
Diffstat (limited to 'web/static')
-rw-r--r-- | web/static/css/base.ccss | 39 | ||||
-rw-r--r-- | web/static/css/home.ccss | 8 | ||||
-rw-r--r-- | web/static/js/home.js | 17 |
3 files changed, 58 insertions, 6 deletions
diff --git a/web/static/css/base.ccss b/web/static/css/base.ccss index 1142021..a7e130b 100644 --- a/web/static/css/base.ccss +++ b/web/static/css/base.ccss @@ -16,11 +16,14 @@ a: text-decoration: none color: #38c -form: - input: - background: #fff - border: 1px solid #cdd - padding: 5px 10px +form input: + background: #111 + border: 1px solid #444 + padding: 3px 10px + color: #ccc + height: 2em + vertical-align: middle + margin: 0 table: border-collapse: collapse @@ -33,7 +36,31 @@ table: .clear: clear: both +#topbar: + width: 900px + margin: 50px auto 2px + + h1: + display: inline-block + margin: 0 40px 0 10px + + #nav: + display: inline-block + + a: + display: inline-block + background-color: #111 + margin: 0 2px + padding: 4px + + form: + display: inline-block + float: right + + input[type="search"]: + margin-right: 5px + #wrapper: width: 900px - margin: 50px auto + margin: 0 auto 50px background: #111 diff --git a/web/static/css/home.ccss b/web/static/css/home.ccss new file mode 100644 index 0000000..ecb8d24 --- /dev/null +++ b/web/static/css/home.ccss @@ -0,0 +1,8 @@ +#wrapper: + padding: 20px + +#expensive: + margin: 0 auto + + caption, tr:nth-child(odd): + background-color: #181818 diff --git a/web/static/js/home.js b/web/static/js/home.js new file mode 100644 index 0000000..8bbe943 --- /dev/null +++ b/web/static/js/home.js @@ -0,0 +1,17 @@ +window.addEvent('domready', function() { + var table = $('expensive'); + ykill.api('/top/cost', function(kills) { + kills.each(function(kill) { + table.grab(new Element('tr').adopt( + new Element('td').grab(ykill.portrait(kill['ship_type_id'], kill['ship_name'], 'type', '_32.png')), + new Element('td', {'html': kill['ship_name']}), + new Element('td').grab( + new Element('a', { + 'href': '/kill/' + kill['kill_id'], + 'html': ykill.format_isk(kill['cost'] / (100 * 1000 * 1000 * 1000)) + }) + ) + )); + }); + }); +}); |