diff --git a/client/templates/tiers.jade b/client/templates/tiers.jade new file mode 100644 index 0000000..ca02aa8 --- /dev/null +++ b/client/templates/tiers.jade @@ -0,0 +1,48 @@ +head + link(href='/css/tiers.css', rel='stylesheet') +div + table.table.headerTable + tr.row.header.fixed + th.th.td.dexno#dexno + | Dex No. + th.th.td#species + | Species + th.td#forme + | Forme + th.td.tier#tier + | Tier + th.td.type#types + | Types + th.td.type.empty + th.td.abilities#abilities + | Abilities + th.td.abilities#HA + | HA + th.td.allstat#HP + | HP + th.td.allstat#att + | Att + th.td.allstat#def + | Def + th.td.allstat#spatt + | Sp.Att + th.td.allstat#spdef + | Sp.Def + th.td.allstat#speed + | Speed + th.td.release#release + | Released + + .wrapper + table.table.list + +select#tierFilter(onchange="filterTier(this)") + option Filter Tier + + +script(type='text/javascript', src="/js/underscore-min.js") +script(type='text/javascript', src="/js/jquery.js") +script(type='text/javascript'). + var species_data =!{JSON.stringify(species)} + var formes_data =!{JSON.stringify(formes)} +script(type='text/javascript', src="/js/tiers.js") diff --git a/client/views/navigation.jade b/client/views/navigation.jade index 8622ef8..3ff52c7 100644 --- a/client/views/navigation.jade +++ b/client/views/navigation.jade @@ -9,6 +9,7 @@ ul.nav li.nav_item.fake_link.nav_battle_list Battle List a(href="/replays", target="_blank").nav_item Your Replays a(href="/leaderboard/", target="_blank").nav_item Leaderboard + a(href="/tiers/", target="_blank").nav_item Tier List a(href="//bitbucket.org/PInsurgence/battle-simulator/issues?status=new&status=open", target="_blank").nav_item Bug Reports a(href="//forums.p-insurgence.com/c/battle-simulator/feature-requests", target="_blank").nav_item Feature Requests diff --git a/public/css/tiers.css b/public/css/tiers.css new file mode 100644 index 0000000..3934c0d --- /dev/null +++ b/public/css/tiers.css @@ -0,0 +1,283 @@ + @font-face { + font-family: 'origicideregular'; + src: url('http://p-insurgence.com/fonts/Origicide-webfont.eot'); + src: url('http://p-insurgence.com/fonts/Origicide-webfont.eot?#iefix') format('embedded-opentype'), + url('http://p-insurgence.com/fonts/Origicide-webfont.woff') format('woff'), + url('http://p-insurgence.com/fonts/Origicide-webfont.ttf') format('truetype'), + url('http://p-insurgence.com/fonts/Origicide-webfont.svg#origicideregular') format('svg'); + font-weight: normal; + font-style: normal; + } + body { + font-family: Arial, Helvetica, sans-serif; + font-size: 14px; + line-height: 20px; + font-weight: 400; + color: #3b3b3b; + -webkit-font-smoothing: antialiased; + font-smoothing: antialiased; + background: #2b2b2b; + } + .wrapper { + max-width: 1250px; + position: absolute; + top: 84px; + } + table { + margin: 0 0 80px 0; + width: 100%; + box-shadow: 0 1px 3px rgba(0,0,0,0.2); + display: table; + } + .row { + display: table-row; + background: #f6f6f6; + } + .row:nth-of-type(odd) { + background: #e9e9e9; + } + .row.header { + font-weight: 900; + color: #fff; + background: darkslategrey; + padding-bottom: 50px; + } + .row.header.name { + font-family: 'origicideregular'; + font-size: large; + font-weight: 100; + } + td.details { + width: 20px; + } + .row.green { + background: #27ae60; + } + .row.blue { + background: #2980b9; + } + td { + padding: 6px 12px; + display: table-cell; + width: 80px; + vertical-align: middle; + text-align: center; + } + td.header { + background: #426f6f; + font-weight: 600; + color: white; + width: 20px; + } + a { + color: black; + text-decoration: none; + } + .crown { + vertical-align: bottom; + width: 25px; + float: right; + } + .row.inherit{ + background: inherit; + height: 52px; + } + .release{ + min-width: 60px; + } + .release.released{ + background: lightgreen; + + } + .release.unreleased{ + background: lightcoral; + } + .iconplace{ + background-size: 80px 40px !important; + width: 40px; + height: 40px; + overflow: hidden; + float: right; + } + .statstable{ + margin: 0px; + border-collapse:collapse; + } + .formenamestats{ + width: 100px + } + td.type{ + padding: 0px 10px 0px 10px; + color: white; + padding: 0px; + min-width: 80px; + max-width: 80px; + text-align: center; + } + .row.inherit.type{ + height: 100%; + } + + .bug{ + background-color: #A8B820; + border: 1px solid #6D7815; + } + .dark{ + background-color: #705848; + border: 1px solid #49392F; + } + .dragon{ + background-color: #7038F8; + border: 1px solid #4924A1; + } + .electric{ + background-color: #F8D030; + border: 1px solid #A1871F; + } + .fairy{ + background-color: #EE99AC; + border: 1px solid #9B6470; + } + .fighting{ + background-color: #C03028; + border: 1px solid #7D1F1A; + } + .fire{ + background-color: #F08030; + border: 1px solid #9C531F; + } + .flying{ + background-color: #A890F0; + border: 1px solid #6D5E9C; + } + .ghost{ + background-color: #705898; + border: 1px solid #493963; + } + .grass{ + background-color: #78C850; + border: 1px solid #4E8234; + } + .ground{ + background-color: #E0C068; + border: 1px solid #927D44; + } + .ice{ + background-color: #98D8D8; + border: 1px solid #638D8D; + } + .normal{ + background-color: #A8A878; + border: 1px solid #6D6D4E; + } + .poison{ + background-color: #A040A0; + border: 1px solid #682A68; + } + .psychic{ + background-color: #F85888; + border: 1px solid #A13959; + } + .rock{ + background-color: #B8A038; + border: 1px solid #786824; + } + .steel{ + background-color: #B8B8D0; + border: 1px solid #787887; + } + .water{ + background-color: #6890F0; + border: 1px solid #445E9C; + } + td.tier{ + padding: 0px; + min-width: 70px; + max-width: 70px; + overflow: hidden; + } + td.dexno{ + min-width: 70px; + } + td.type.singletypeleft{ + min-width: 162px; + max-width: 162px; + } + td.type.singeltyperight{ + display: none; + } + .allstats{ + padding:0px; + width:100px; + text-align:center; + } + td.type.empty{ + padding-right:13px; + } + .fixed{ + position:fixed; + width: 1250px; + top: 1px; + left:8px; + z-index: 100; + padding: 12px 0px; + } + .rowinrow{ + display: table-cell; + } + + .table.list{ + padding-top: 25px; + border-collapse: collapse; + + } + th{ + } +td.abilities { + width: 120px; + padding: 0px 0px; + max-width: 150px; + min-width: 150px; +} + .formeTable{ + margin-bottom:0px; + border-collapse: collapse; + } + .formeName{ + width: 100px; + padding: 0px; + min-width: 100px; + } + #dexno{ + width:103px; + } + #species{ + width: 112px; + } + #forme{ + width:97px; + } + #tier{ + width: 75px; + } + #types{ + width: 160px; + } + #abilities{ + width: 146px; + } + #HA{ + width: 148px; + } + .td.allstat{ + width: 47px; + } + .table.headerTable{ + border-collapse:collapse; + } + #tierFilter{ + position: fixed; + z-index: 101; + top: 50px; + left: 25px; + } \ No newline at end of file diff --git a/public/js/jquery.js b/public/js/jquery.js new file mode 100644 index 0000000..006e953 --- /dev/null +++ b/public/js/jquery.js @@ -0,0 +1,5 @@ +/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery.min.map +*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
t |