Skip to content

Commit

Permalink
major rewrite rage
Browse files Browse the repository at this point in the history
  • Loading branch information
smith committed Aug 18, 2011
1 parent a271b7c commit 231ee2d
Show file tree
Hide file tree
Showing 10 changed files with 11,462 additions and 0 deletions.
136 changes: 136 additions & 0 deletions CollegeFootball.wdgt/data.json
@@ -0,0 +1,136 @@
{
"ACC": {
"103" : {"name":"Boston College", "id":103, "color":"111111"},
"228" : {"name":"Clemson", "id":228, "color":"f35b0f"},
"150" : {"name":"Duke", "id":150, "color":"004a7b"},
"52" : {"name":"Florida State", "id":52, "color":"b72931"},
"59" : {"name":"Georgia Tech", "id":59, "color":"000000"},
"120" : {"name":"Maryland", "id":120, "color":"d60039"},
"2390": {"name":"Miami", "id":2390, "color":"004325"},
"153" : {"name":"North Carolina", "id":153, "color":"002942"},
"152" : {"name":"N.C. State", "id":152, "color":"d60039"},
"258" : {"name":"Virginia", "id":258, "color":"000066"},
"259" : {"name":"Virginia Tech", "id":259, "color":"7b2129"},
"154" : {"name":"Wake Forest", "id":154, "color":"000000"}
},
"Big 12": {
"239" : {"name":"Baylor", "id":239, "color":"00844a"},
"66" : {"name":"Iowa State", "id":66, "color":"d62949"},
"2305": {"name":"Kansas", "id":2305, "color":"0337b4"},
"2306": {"name":"Kansas State", "id":2306, "color":"633194"},
"142" : {"name":"Missouri", "id":142, "color":"000000"},
"201" : {"name":"Oklahoma", "id":201, "color":"7b0000"},
"197" : {"name":"Oklahoma State", "id":197, "color":"ff7300"},
"251" : {"name":"Texas", "id":251, "color":"ef7321"},
"245" : {"name":"Texas A&M", "id":245, "color":"6A3333"},
"2641": {"name":"Texas Tech", "id":2641, "color":"d60039"}
},
"Big East": {
"2312": {"name":"Cincinnati", "id":2132, "color":"000000"},
"41" : {"name":"Connecticut", "id":41, "color":"0A1E5B"},
"97" : {"name":"Louisville", "id":97, "color":"de0018"},
"221" : {"name":"Pittsburgh", "id":221, "color":"313169"},
"164" : {"name":"Rutgers", "id":164, "color":"000000"},
"58" : {"name":"South Florida", "id":58, "color":"004231"},
"183" : {"name":"Syracuse", "id":183, "color":"1A3E86"},
"277" : {"name":"West Virginia", "id":277, "color":"395ab5"}
},
"Big Ten": {
"2294": {"name":"Iowa", "id":2294, "color":"000000"},
"130" : {"name":"Michigan", "id":130, "color":"292942"},
"127" : {"name":"Michigan State", "id":127, "color":"226b31"},
"135" : {"name":"Minnesota", "id":135, "color":"752132"},
"158" : {"name":"Nebraska", "id":158, "color":"fe0d04"},
"77" : {"name":"Northwestern", "id":77, "color":"372286"},
"356" : {"name":"Illinois", "id":356, "color":"f77329"},
"84" : {"name":"Indiana", "id":84, "color":"580000"},
"194" : {"name":"Ohio State", "id":194, "color":"de3129"},
"213" : {"name":"Penn State", "id":213, "color":"29294a"},
"2509": {"name":"Purdue", "id":2509, "color":"211818"},
"275" : {"name":"Wisconsin", "id":275, "color":"c32122"}
},
"Conference USA": {
"151" : {"name":"East Carolina", "id":151, "color":"4b1869"},
"276" : {"name":"Marshall", "id":276, "color":"186329"},
"235" : {"name":"Memphis", "id":235, "color":"29299c"},
"2572": {"name":"Southern Miss", "id":2572, "color":"FFAA3C"},
"5" : {"name":"UAB", "id":5, "color":"000000"},
"2116": {"name":"Central Florida", "id":2116, "color":"000000"},
"248" : {"name":"Houston", "id":248, "color":"e73139"},
"242" : {"name":"Rice", "id":242, "color":"00315a"},
"2567": {"name":"SMU", "id":2567, "color":"e73139"},
"2655": {"name":"Tulane", "id":2655, "color":"084a38"},
"202" : {"name":"Tulsa", "id":202, "color":"004273"},
"2638": {"name":"UTEP", "id":2638, "color":"ff7339"}
},
"IA Independents": {
"349 ": {"name":"Army", "id":349, "color":"ce9c00"},
"252" : {"name":"BYU", "id":252, "color":"002942"},
"2426": {"name":"Navy", "id":2426, "color":"0f1021"},
"87" : {"name":"Notre Dame", "id":87, "color":"313a98"}
},
"Mid-American": {
"2006": {"name":"Akron", "id":2006, "color":"0A1E5B"},
"189" : {"name":"Bowling Green", "id":189, "color":"663300"},
"2084": {"name":"Buffalo", "id":2084, "color":"004a84"},
"2309": {"name":"Kent State", "id":2309, "color":"212142"},
"193" : {"name":"Miami (OHIO)", "id":193, "color":"ce2229"},
"195" : {"name":"Ohio", "id":195, "color":"006342"},
"218" : {"name":"Temple", "id":218, "color":"bc0138"},
"2050": {"name":"Ball State", "id":2050, "color":"de0000"},
"2117": {"name":"Central Michigan", "id":2117, "color":"7b0000"},
"2199": {"name":"Eastern Michigan", "id":2199, "color":"217038"},
"2459": {"name":"Northern Illinois", "id":2459, "color":"e73139"},
"2649": {"name":"Toledo", "id":2649, "color":"00275D"},
"2711": {"name":"Western Michigan", "id":2711, "color":"825229"}
},
"Mountain West": {
"2005": {"name":"Air Force", "id":2005, "color":"004a7b"},
"68" : {"name":"Boise State", "id":68, "color":"29299c"},
"36" : {"name":"Colorado State", "id":36, "color":"008c73"},
"167" : {"name":"New Mexico", "id":167, "color":"000000"},
"21" : {"name":"San Diego State", "id":21, "color":"d60039"},
"2628": {"name":"TCU", "id":2628, "color":"201852"},
"2439": {"name":"UNLV", "id":2439, "color":"000000"},
"2751": {"name":"Wyoming", "id":2751, "color":"523921"}
},
"Pacific-12": {
"25" : {"name":"California", "id":25, "color":"002942"},
"2483": {"name":"Oregon", "id":2483, "color":"044520"},
"204" : {"name":"Oregon State", "id":204, "color":"000000"},
"24" : {"name":"Stanford", "id":24, "color":"b72931"},
"264" : {"name":"Washington", "id":264, "color":"3E3468"},
"265" : {"name":"Washington State", "id":265, "color":"94022a"},
"12" : {"name":"Arizona", "id":12, "color":"102142"},
"9" : {"name":"Arizona State", "id":9, "color":"942139"},
"38" : {"name":"Colorado", "id":38, "color":"bd9c00"},
"26" : {"name":"UCLA", "id":26, "color":"005a94"},
"30" : {"name":"USC", "id":30, "color":"a50010"},
"254" : {"name":"Utah", "id":254, "color":"ce4242"}
},
"SEC": {
"57" : {"name":"Florida", "id":57, "color":"2a42ce"},
"61" : {"name":"Georgia", "id":61, "color":"d60022"},
"96" : {"name":"Kentucky", "id":96, "color":"003399"},
"2579": {"name":"South Carolina", "id":2579, "color":"000000"},
"2633": {"name":"Tennessee", "id":2633, "color":"EE9627"},
"238" : {"name":"Vanderbilt", "id":238, "color":"000000"},
"333" : {"name":"Alabama", "id":333, "color":"a42d47"},
"8" : {"name":"Arkansas", "id":8, "color":"9c1831"},
"2" : {"name":"Auburn", "id":2, "color":"182942"},
"99" : {"name":"LSU", "id":99, "color":"2B0D57"},
"344" : {"name":"Mississippi St.", "id":344, "color":"531122"},
"145" : {"name":"Mississippi", "id":145, "color":"101894"}
},
"Sun Belt": {
"2032": {"name":"Arkansas State", "id":2032, "color":"e81018"},
"2226": {"name":"Fla Atlantic", "id":2226, "color":"000099"},
"2229": {"name":"Florida Intl", "id":2229, "color":"091731"},
"309" : {"name":"La Lafayette", "id":309, "color":"ce2842"},
"2433": {"name":"Louisiana Monroe", "id":2433, "color":"000000"},
"2393": {"name":"Middle Tenn. St.", "id":2393, "color":"1842d6"},
"249" : {"name":"North Texas", "id":249, "color":"006342"},
"2653": {"name":"Troy", "id":2653, "color":"843131"},
"98" : {"name":"Western Kentucky", "id":98, "color":"000000"}
}
}
Binary file added CollegeFootball.wdgt/images/backgroundTile.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions CollegeFootball.wdgt/index.html
@@ -0,0 +1,31 @@
<html>
<head>
<meta charset="utf-8" />
<title>College Football Widget</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div id="front">
<img id="logo" />
<h1></h1>
<ul>
<li><a id="stats" target="_blank" href="">Stats</a></li>
<li><a id="news" target="_blank" href="">News</a></li>
</ul>
<table></table>
<a class="flipper" href="">i</a>
</div>
<div id="back">
<h1>College Football Widget</h1>
<form>
<label for="conferences">Conference</label>
<select id="conferences"></select>
<label for="teams">Team</label>
<select id="teams"></select>
<button>Done</button>
</form>
<a target="_blank" href="http://nlsmith.com/projects/college-football">nlsmith.com</a>
</div>
<script src="js/require-jquery.js" data-main="js/main"></script>
</body>
</html>
75 changes: 75 additions & 0 deletions CollegeFootball.wdgt/js/jquery.xdomainajax.js
@@ -0,0 +1,75 @@
/**
* jQuery.ajax mid - CROSS DOMAIN AJAX
* ---
* @author James Padolsey (http://james.padolsey.com)
* @version 0.11
* @updated 12-JAN-10
* ---
* Note: Read the README!
* ---
* @info http://james.padolsey.com/javascript/cross-domain-requests-with-jquery/
*/

jQuery.ajax = (function(_ajax){

var protocol = location.protocol,
hostname = location.hostname,
exRegex = RegExp(protocol + '//' + hostname),
YQL = 'http' + (/^https/.test(protocol)?'s':'') + '://query.yahooapis.com/v1/public/yql?callback=?',
query = 'select * from html where url="{URL}" and xpath="*"';

function isExternal(url) {
return !exRegex.test(url) && /:\/\//.test(url);
}

return function(o) {

var url = o.url;

if ( /get/i.test(o.type) && !/json/i.test(o.dataType) && isExternal(url) ) {

// Manipulate options so that JSONP-x request is made to YQL

o.url = YQL;
o.dataType = 'json';

o.data = {
q: query.replace(
'{URL}',
url + (o.data ?
(/\?/.test(url) ? '&' : '?') + jQuery.param(o.data)
: '')
),
format: 'xml'
};

// Since it's a JSONP request
// complete === success
if (!o.success && o.complete) {
o.success = o.complete;
delete o.complete;
}

o.success = (function(_success){
return function(data) {

if (_success) {
// Fake XHR callback.
_success.call(this, {
responseText: data.results[0]
// YQL screws with <script>s
// Get rid of them
.replace(/<script[^>]+?\/>|<script(.|\s)*?\/script>/gi, '')
}, 'success');
}

};
})(o.success);

}

return _ajax.apply(this, arguments);

};

})(jQuery.ajax);
3 changes: 3 additions & 0 deletions CollegeFootball.wdgt/js/main.js
@@ -0,0 +1,3 @@
require(["ui"], function (ui, team) {
ui.load();
});

0 comments on commit 231ee2d

Please sign in to comment.