Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
1,485 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<html> | ||
<head> | ||
<title>NHL Data Demo</title> | ||
<link rel="stylesheet" href="/css/index.css"/> | ||
<script type="text/javascript" src="/js/jquery-1.7.1.min.js"></script> | ||
<script type="text/javascript" src="/js/jquery-ui-1.8.16.custom.min.js"></script> | ||
<script type="text/javascript" src="/js/index.js"></script> | ||
</head> | ||
<body> | ||
<div id="top"> | ||
<h1 id="title">Hockey Overflow</h1> | ||
</div> | ||
<div id="content"> | ||
<div id="teamList"> | ||
<select id="teams"> | ||
</select> | ||
</div> | ||
<div id="teamInfo"/> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<html> | ||
<head> | ||
<title>NHL Data Demo</title> | ||
</head> | ||
<body> | ||
<p>I am index</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#title { | ||
margin-left: auto; | ||
margin-right: auto; | ||
text-align: center; | ||
} | ||
#content { | ||
clear: both; | ||
} | ||
#teams { | ||
float: left; | ||
} | ||
#teamInfo { | ||
float: right; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#title { | ||
margin-left: auto; | ||
margin-right: auto; | ||
font-size: 18px; | ||
} | ||
#content { | ||
clear: both; | ||
} | ||
#teams { | ||
float: left; | ||
} | ||
#teamInfo { | ||
float: right; | ||
} |
Binary file added
BIN
+180 Bytes
resources/public/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+178 Bytes
resources/public/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+120 Bytes
resources/public/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+105 Bytes
resources/public/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+111 Bytes
resources/public/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+110 Bytes
resources/public/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+119 Bytes
resources/public/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+101 Bytes
resources/public/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
568 changes: 568 additions & 0 deletions
568
resources/public/css/smoothness/jquery-ui-1.8.16.custom.css
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
var names; | ||
var teams; | ||
var reverseTeams= {}; | ||
var teamList; | ||
var badges; | ||
var badgeTypes; | ||
|
||
$(document).ready(getData) | ||
function keys(x) { | ||
return $.map(x, function(v,k) { return k }); | ||
} | ||
function values(x) { | ||
return $.map(x, function(v,k) { return v }); | ||
} | ||
function getData() { | ||
$.getJSON('/data', function(data) { | ||
names= data.teamData['team-names']; | ||
teams= keys(names); | ||
$.each(teams, function(v,k) { reverseTeams[v]= k }); | ||
teamList= values(names).sort(); | ||
badges= data.badgeData; | ||
badgeTypes= keys(badges); | ||
renderData(); | ||
// showBadgeData('http://www.nhl.com/team-25'); | ||
}); | ||
} | ||
function renderData() { | ||
$('#teams').empty(); | ||
$.each(teamList, function(i, v) { | ||
$('#teams').append('<option value="'+reverseTeams[v]+'">'+v+'</option>'); | ||
}) | ||
} | ||
function showBadgeData(teamID) { | ||
var b= []; | ||
$.each(badgeTypes, function(i,x) { | ||
// return $.grep(badges[x], function(v,k) { v.team == teamID }); | ||
return | ||
}); | ||
b= $.grep(b, function(x,i) { x.team == teamID }); | ||
alert(b); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
$.ready() { | ||
getData(); | ||
} | ||
|
||
function getData() { | ||
$.getJSON('/data', function(data) { | ||
getTeams(); | ||
renderData(); | ||
}); | ||
} | ||
|
||
function renderData() { | ||
|
||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(ns nhl.server | ||
(:use noir.core) | ||
(:require [noir.server :as server])) | ||
|
||
(defpage "/" [] (slurp "html/index.html")) | ||
(defpage "/data" [] (slurp "files/results.json")) | ||
|
||
(defn -main [& m] | ||
(server/start 8080)) |