initial commit
This commit is contained in:
0
app/assets/images/.keep
Normal file
0
app/assets/images/.keep
Normal file
16
app/assets/javascripts/application.js
Normal file
16
app/assets/javascripts/application.js
Normal file
@@ -0,0 +1,16 @@
|
||||
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
||||
// listed below.
|
||||
//
|
||||
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
||||
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
||||
//
|
||||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||
// compiled file.
|
||||
//
|
||||
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
||||
// about supported directives.
|
||||
//
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require turbolinks
|
||||
//= require_tree .
|
||||
3
app/assets/javascripts/guesses.js.coffee
Normal file
3
app/assets/javascripts/guesses.js.coffee
Normal file
@@ -0,0 +1,3 @@
|
||||
# Place all the behaviors and hooks related to the matching controller here.
|
||||
# All this logic will automatically be available in application.js.
|
||||
# You can use CoffeeScript in this file: http://coffeescript.org/
|
||||
4
app/assets/javascripts/jquery.min.js
vendored
Normal file
4
app/assets/javascripts/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
42
app/assets/javascripts/lodash.min.js
vendored
Normal file
42
app/assets/javascripts/lodash.min.js
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
/*!
|
||||
Lo-Dash 1.0.0-rc.3 lodash.com/license
|
||||
Underscore.js 1.4.3 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(e,t){function n(e){if(e&&typeof e=="object"&&e.__wrapped__)return e;if(!(this instanceof n))return new n(e);this.__wrapped__=e}function r(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||tt);if(i)for(var s={},n=t-1;++n<r;){var o=e[n]+"";(Et.call(s,o)?s[o]:s[o]=[]).push(e[n])}return function(n){if(i){var r=n+"";return Et.call(s,r)&&-1<R(s[r],n)}return-1<R(e,n,t)}}function i(e){return e.charCodeAt(0)}function s(e,t){var n=e.b,r=t.b,e=e.a,t=t.a;if(e!==t){if(e>t||typeof e=="undefined")return 1;if(
|
||||
e<t||typeof t=="undefined")return-1}return n<r?-1:1}function o(e,t,n){function r(){var u=arguments,a=s?this:t;return i||(e=t[o]),n.length&&(u=u.length?n.concat(p(u)):n),this instanceof r?(h.prototype=e.prototype,a=new h,h.prototype=null,u=e.apply(a,u),x(u)?u:a):e.apply(a,u)}var i=S(e),s=!n,o=t;return s&&(n=t),i||(t=e),r}function u(e,t,n){return e?typeof e!="function"?function(t){return t[e]}:typeof t!="undefined"?n?function(n,r,i,s){return e.call(t,n,r,i,s)}:function(n,r,i){return e.call(t,n,r,i)
|
||||
}:e:V}function a(){for(var e={b:"",c:"",e:Xt,f:Wt,g:"",h:Jt,i:Gt,j:mt,k:"",l:!0},t,n=0;t=arguments[n];n++)for(var r in t)e[r]=t[r];t=e.a,e.d=/^[^,]+/.exec(t)[0],n=Function,r="var i,l="+e.d+",t="+e.d+";if(!"+e.d+")return t;"+e.k+";",e.b?(r+="var m=l.length;i=-1;if(typeof m=='number'){",e.i&&(r+="if(k(l)){l=l.split('')}"),r+="while(++i<m){"+e.b+"}}else {"):e.h&&(r+="var m=l.length;i=-1;if(m&&j(l)){while(++i<m){i+='';"+e.g+"}}else {"),e.e||(r+="var u=typeof l=='function'&&s.call(l,'prototype');");if(
|
||||
e.f&&e.l)r+="var q=-1,r=p[typeof l]?n(l):[],m=r.length;while(++q<m){i=r[q];",e.e||(r+="if(!(u&&i=='prototype')){"),r+=e.g+"",e.e||(r+="}");else{r+="for(i in l){";if(!e.e||e.l)r+="if(",e.e||(r+="!(u&&i=='prototype')"),!e.e&&e.l&&(r+="&&"),e.l&&(r+="h.call(l,i)"),r+="){";r+=e.g+";";if(!e.e||e.l)r+="}"}r+="}";if(e.e){r+="var f=l.constructor;";for(var i=0;7>i;i++)r+="i='"+e.j[i]+"';if(","constructor"==e.j[i]&&(r+="!(f&&f.prototype===l)&&"),r+="h.call(l,i)){"+e.g+"}"}if(e.b||e.h)r+="}";return r+=e.c+";return t"
|
||||
,n("e,h,j,k,p,n,s","return function("+t+"){"+r+"}")(u,Et,v,N,nn,At,xt)}function f(e){return"\\"+rn[e]}function l(e){return hn[e]}function c(e){return typeof e.toString!="function"&&typeof (e+"")=="string"}function h(){}function p(e,t,n){t||(t=0),typeof n=="undefined"&&(n=e?e.length:0);for(var r=-1,n=n-t||0,i=Array(0>n?0:n);++r<n;)i[r]=e[t+r];return i}function d(e){return pn[e]}function v(e){return Tt.call(e)==Dt}function m(e){var t=!1;if(!e||typeof e!="object"||v(e))return t;var n=e.constructor;return!
|
||||
S(n)&&(!Yt||!c(e))||n instanceof n?Vt?(ln(e,function(e,n,r){return t=!Et.call(r,n),!1}),!1===t):(ln(e,function(e,n){t=n}),!1===t||Et.call(e,t)):t}function g(e){var t=[];return cn(e,function(e,n){t.push(n)}),t}function y(e,t,n,r,i){if(null==e)return e;n&&(t=!1);if(n=x(e)){var s=Tt.call(e);if(!en[s]||Yt&&c(e))return e;var o=vn(e)}if(!n||!t)return n?o?p(e):fn({},e):e;n=tn[s];switch(s){case Ht:case Bt:return new n(+e);case jt:case qt:return new n(e);case It:return n(e.source,at.exec(e))}r||(r=[]),i||
|
||||
(i=[]);for(s=r.length;s--;)if(r[s]==e)return i[s];var u=o?n(e.length):{};return r.push(e),i.push(u),(o?_:cn)(e,function(e,n){u[n]=y(e,t,null,r,i)}),o&&(Et.call(e,"index")&&(u.index=e.index),Et.call(e,"input")&&(u.input=e.input)),u}function b(e){var t=[];return ln(e,function(e,n){S(e)&&t.push(n)}),t.sort()}function w(e){var t={};return cn(e,function(e,n){t[e]=n}),t}function E(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;var i=Tt.call(e),s=Tt.call(t);i==Dt&&(i=Ft),s==Dt&&
|
||||
(s=Ft);if(i!=s)return!1;switch(i){case Ht:case Bt:return+e==+t;case jt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case It:case qt:return e==t+""}s=i==Pt;if(!s){if(e.__wrapped__||t.__wrapped__)return E(e.__wrapped__||e,t.__wrapped__||t);if(i!=Ft||Yt&&(c(e)||c(t)))return!1;var i=!Kt&&v(e)?Object:e.constructor,o=!Kt&&v(t)?Object:t.constructor;if(i!=o&&(!S(i)||!(i instanceof i&&S(o)&&o instanceof o)))return!1}n||(n=[]),r||(r=[]);for(i=n.length;i--;)if(n[i]==e)return r[i]==t;var u=!0,a=0;n.push(e),r.push(
|
||||
t);if(s){a=e.length;if(u=a==t.length)for(;a--&&(u=E(e[a],t[a],n,r)););return u}return ln(e,function(e,i,s){if(Et.call(s,i))return a++,u=Et.call(t,i)&&E(e,t[i],n,r)}),u&&ln(t,function(e,t,n){if(Et.call(n,t))return u=-1<--a}),u}function S(e){return typeof e=="function"}function x(e){return e?nn[typeof e]:!1}function T(e){return typeof e=="number"||Tt.call(e)==jt}function N(e){return typeof e=="string"||Tt.call(e)==qt}function C(e,t,n){var r=arguments,i=0,s=2,o=r[3],u=r[4];n!==et&&(o=[],u=[],typeof
|
||||
n!="number"&&(s=r.length));for(;++i<s;)cn(r[i],function(t,n){var r,i,s;if(t&&((i=vn(t))||mn(t))){for(var a=o.length;a--;)if(r=o[a]==t)break;r?e[n]=u[a]:(o.push(t),u.push(s=(s=e[n],i)?vn(s)?s:[]:mn(s)?s:{}),e[n]=C(s,t,et,o,u))}else t!=null&&(e[n]=t)});return e}function k(e){var t=[];return cn(e,function(e){t.push(e)}),t}function L(e,t,n){var r=-1,i=e?e.length:0,s=!1,n=(0>n?Ot(0,i+n):n)||0;return typeof i=="number"?s=-1<(N(e)?e.indexOf(t,n):R(e,t,n)):an(e,function(e){if(++r>=n)return!(s=e===t)}),s}
|
||||
function A(e,t,n){var r=!0,t=u(t,n);if(vn(e))for(var n=-1,i=e.length;++n<i&&(r=!!t(e[n],n,e)););else an(e,function(e,n,i){return r=!!t(e,n,i)});return r}function O(e,t,n){var r=[],t=u(t,n);if(vn(e))for(var n=-1,i=e.length;++n<i;){var s=e[n];t(s,n,e)&&r.push(s)}else an(e,function(e,n,i){t(e,n,i)&&r.push(e)});return r}function M(e,t,n){var r,t=u(t,n);return _(e,function(e,n,i){if(t(e,n,i))return r=e,!1}),r}function _(e,t,n){if(t&&typeof n=="undefined"&&vn(e))for(var n=-1,r=e.length;++n<r&&!1!==t(e[
|
||||
n],n,e););else an(e,t,n);return e}function D(e,t,n){var r=-1,i=e?e.length:0,s=Array(typeof i=="number"?i:0),t=u(t,n);if(vn(e))for(;++r<i;)s[r]=t(e[r],r,e);else an(e,function(e,n,i){s[++r]=t(e,n,i)});return s}function P(e,t,n){var r=-Infinity,s=-1,o=e?e.length:0,a=r;if(t||!vn(e))t=!t&&N(e)?i:u(t,n),an(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,a=e)});else for(;++s<o;)e[s]>a&&(a=e[s]);return a}function H(e,t){return D(e,t+"")}function B(e,t,n,r){var i=3>arguments.length,t=u(t,r,et);if(vn(e)){var s=-1,o=
|
||||
e.length;for(i&&(n=e[++s]);++s<o;)n=t(n,e[s],s,e)}else an(e,function(e,r,s){n=i?(i=!1,e):t(n,e,r,s)});return n}function j(e,t,n,r){var i=e,s=e?e.length:0,o=3>arguments.length;if(typeof s!="number")var a=gn(e),s=a.length;else Gt&&N(e)&&(i=e.split(""));return t=u(t,r,et),_(e,function(e,r,u){r=a?a[--s]:--s,n=o?(o=!1,i[r]):t(n,i[r],r,u)}),n}function F(e,t,n){var r,t=u(t,n);if(vn(e))for(var n=-1,i=e.length;++n<i&&!(r=t(e[n],n,e)););else an(e,function(e,n,i){return!(r=t(e,n,i))});return!!r}function I(e
|
||||
,t,n){if(e){var r=e.length;return null==t||n?e[0]:p(e,0,Mt(Ot(0,t),r))}}function q(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];vn(s)?St.apply(i,t?s:q(s)):i.push(s)}return i}function R(e,t,n){var r=-1,i=e?e.length:0;if(typeof n=="number")r=(0>n?Ot(0,i+n):n||0)-1;else if(n)return r=z(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function U(e,t,n){return p(e,null==t||n?1:Ot(0,t))}function z(e,t,n,r){for(var i=0,s=e?e.length:i,n=n?u(n,r):V,t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=
|
||||
r+1:s=r;return i}function W(e,t,n,r){var i=-1,s=e?e.length:0,o=[],a=o;typeof t=="function"&&(r=n,n=t,t=!1);var f=!t&&75<=s;if(f)var l={};n&&(a=[],n=u(n,r));for(;++i<s;){var r=e[i],c=n?n(r,i,e):r;if(f)var h=c+"",h=Et.call(l,h)?!(a=l[h]):a=l[h]=[];if(t?!i||a[a.length-1]!==c:h||0>R(a,c))(n||f)&&a.push(c),o.push(r)}return o}function X(e,t){return zt||Nt&&2<arguments.length?Nt.call.apply(Nt,arguments):o(e,t,p(arguments,2))}function V(e){return e}function $(e){_(b(e),function(t){var r=n[t]=e[t];n.prototype
|
||||
[t]=function(){var e=[this.__wrapped__];return St.apply(e,arguments),e=r.apply(n,e),new n(e)}})}function J(){return this.__wrapped__}var K=typeof exports=="object"&&exports,Q=typeof global=="object"&&global;Q.global===Q&&(e=Q);var G=[],Y=new function(){},Z=0,et=Y,tt=30,nt=e._,rt=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,it=/&(?:amp|lt|gt|quot|#x27);/g,st=/\b__p\+='';/g,ot=/\b(__p\+=)''\+/g,ut=/(__e\(.*?\)|\b__t\))\+'';/g,at=/\w*$/,ft=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g
|
||||
,lt=RegExp("^"+(Y.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),ct=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,ht=/<%=([\s\S]+?)%>/g,pt=/($^)/,dt=/[&<>"']/g,vt=/['\n\r\t\u2028\u2029\\]/g,mt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),gt=Math.ceil,yt=G.concat,bt=Math.floor,wt=lt.test(wt=Object.getPrototypeOf)&&wt,Et=Y.hasOwnProperty,St=G.push,xt=Y.propertyIsEnumerable,Tt=Y.toString,Nt=lt.test(Nt=
|
||||
p.bind)&&Nt,Ct=lt.test(Ct=Array.isArray)&&Ct,kt=e.isFinite,Lt=e.isNaN,At=lt.test(At=Object.keys)&&At,Ot=Math.max,Mt=Math.min,_t=Math.random,Dt="[object Arguments]",Pt="[object Array]",Ht="[object Boolean]",Bt="[object Date]",jt="[object Number]",Ft="[object Object]",It="[object RegExp]",qt="[object String]",Rt=!!e.attachEvent,Ut=Nt&&!/\n|true/.test(Nt+Rt),zt=Nt&&!Ut,Wt=At&&(Rt||Ut),Xt,Vt,$t=($t={0:1,length:1},G.splice.call($t,0,1),$t[0]),Jt=!0;(function(){function e(){this.x=1}var t=[];e.prototype=
|
||||
{valueOf:1,y:1};for(var n in new e)t.push(n);for(n in arguments)Jt=!n;Xt=!/valueOf/.test(t),Vt="x"!=t[0]})(1);var Kt=arguments.constructor==Object,Qt=!v(arguments),Gt="xx"!="x"[0]+Object("x")[0];try{var Yt=("[object Object]",Tt.call(document)==Ft)}catch(Zt){}var en={"[object Function]":!1};en[Dt]=en[Pt]=en[Ht]=en[Bt]=en[jt]=en[Ft]=en[It]=en[qt]=!0;var tn={};tn[Pt]=Array,tn[Ht]=Boolean,tn[Bt]=Date,tn[Ft]=Object,tn[jt]=Number,tn[It]=RegExp,tn[qt]=String;var nn={"boolean":!1,"function":!0,object:!0,
|
||||
number:!1,string:!1,"undefined":!1},rn={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};n.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:ht,variable:""};var sn={a:"o,v,g",k:"for(var a=1,b=typeof g=='number'?2:arguments.length;a<b;a++){if((l=arguments[a])){",g:"t[i]=l[i]",c:"}}"},on={a:"d,c,w",k:"c=c&&typeof w=='undefined'?c:e(c,w)",b:"if(c(l[i],i,d)===false)return t",g:"if(c(l[i],i,d)===false)return t"},un={b:null},an=a(on),fn=a(sn
|
||||
);Qt&&(v=function(e){return e?Et.call(e,"callee"):!1});var ln=a(on,un,{l:!1}),cn=a(on,un),hn={"&":"&","<":"<",">":">",'"':""","'":"'"},pn=w(hn),dn=a(sn,{g:"if(t[i]==null)"+sn.g}),vn=Ct||function(e){return Kt&&e instanceof Array||Tt.call(e)==Pt};S(/x/)&&(S=function(e){return e instanceof Function||"[object Function]"==Tt.call(e)});var mn=wt?function(e){if(!e||typeof e!="object")return!1;var t=e.valueOf,n=typeof t=="function"&&(n=wt(t))&&wt(n);return n?e==n||wt(e)==n&&!v(e):m(e)
|
||||
}:m,gn=At?function(e){return typeof e=="function"&&xt.call(e,"prototype")?g(e):x(e)?At(e):[]}:g;n.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},n.assign=fn,n.bind=X,n.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=b(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=X(e[i],e)}return e},n.bindKey=function(e,t){return o(e,t,p(arguments,2))},n.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},n.compose=function(
|
||||
){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},n.countBy=function(e,t,n){var r={},t=u(t,n);return _(e,function(e,n,i){n=t(e,n,i),Et.call(r,n)?r[n]++:r[n]=1}),r},n.debounce=function(e,t,n){function r(){u=null,n||(s=e.apply(o,i))}var i,s,o,u;return function(){var a=n&&!u;return i=arguments,o=this,clearTimeout(u),u=setTimeout(r,t),a&&(s=e.apply(o,i)),s}},n.defaults=dn,n.defer=function(e){var n=p(arguments,1);return setTimeout(function(){e
|
||||
.apply(t,n)},1)},n.delay=function(e,n){var r=p(arguments,2);return setTimeout(function(){e.apply(t,r)},n)},n.difference=function(e){for(var t=-1,n=e?e.length:0,i=yt.apply(G,arguments),i=r(i,n),s=[];++t<n;){var o=e[t];i(o)||s.push(o)}return s},n.filter=O,n.flatten=q,n.forEach=_,n.forIn=ln,n.forOwn=cn,n.functions=b,n.groupBy=function(e,t,n){var r={},t=u(t,n);return _(e,function(e,n,i){n=t(e,n,i),(Et.call(r,n)?r[n]:r[n]=[]).push(e)}),r},n.initial=function(e,t,n){if(!e)return[];var r=e.length;return p
|
||||
(e,0,Mt(Ot(0,r-(null==t||n?1:t||0)),r))},n.intersection=function(e){var t=arguments,n=t.length,i={0:{}},s=-1,o=e?e.length:0,u=100<=o,a=[],f=a;e:for(;++s<o;){var l=e[s];if(u)var c=l+"",c=Et.call(i[0],c)?!(f=i[0][c]):f=i[0][c]=[];if(c||0>R(f,l)){u&&f.push(l);for(var h=n;--h;)if(!(i[h]||(i[h]=r(t[h],0,100)))(l))continue e;a.push(l)}}return a},n.invert=w,n.invoke=function(e,t){var n=p(arguments,2),r=typeof t=="function",i=[];return _(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},n.keys=gn,n.map=D,
|
||||
n.max=P,n.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return Et.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},n.merge=C,n.min=function(e,t,n){var r=Infinity,s=-1,o=e?e.length:0,a=r;if(t||!vn(e))t=!t&&N(e)?i:u(t,n),an(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,a=e)});else for(;++s<o;)e[s]<a&&(a=e[s]);return a},n.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},n.omit=function(e,t,n){var r=typeof
|
||||
t=="function",i={};if(r)t=u(t,n);else var s=yt.apply(G,arguments);return ln(e,function(e,n,o){if(r?!t(e,n,o):0>R(s,n,1))i[n]=e}),i},n.once=function(e){var t,n=!1;return function(){return n?t:(n=!0,t=e.apply(this,arguments),e=null,t)}},n.pairs=function(e){var t=[];return cn(e,function(e,n){t.push([n,e])}),t},n.partial=function(e){return o(e,p(arguments,1))},n.pick=function(e,t,n){var r={};if(typeof t!="function")for(var i=0,s=yt.apply(G,arguments),o=s.length;++i<o;){var a=s[i];a in e&&(r[a]=e[a])}
|
||||
else t=u(t,n),ln(e,function(e,n,i){t(e,n,i)&&(r[n]=e)});return r},n.pluck=H,n.range=function(e,t,n){e=+e||0,n=+n||1,null==t&&(t=e,e=0);for(var r=-1,t=Ot(0,gt((t-e)/n)),i=Array(t);++r<t;)i[r]=e,e+=n;return i},n.reject=function(e,t,n){return t=u(t,n),O(e,function(e,n,r){return!t(e,n,r)})},n.rest=U,n.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return _(e,function(e){var r=bt(_t()*(++t+1));n[t]=n[r],n[r]=e}),n},n.sortBy=function(e,t,n){var r=[],t=u(t,n);_(e,function(e,n,i){r.push({a:t(e,n,i),b
|
||||
:n,c:e})}),e=r.length;for(r.sort(s);e--;)r[e]=r[e].c;return r},n.tap=function(e,t){return t(e),e},n.throttle=function(e,t){function n(){u=new Date,o=null,i=e.apply(s,r)}var r,i,s,o,u=0;return function(){var a=new Date,f=t-(a-u);return r=arguments,s=this,0>=f?(clearTimeout(o),o=null,u=a,i=e.apply(s,r)):o||(o=setTimeout(n,f)),i}},n.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},n.toArray=function(e){return typeof (e?e.length:0)=="number"?Gt&&N(e)?e.split("")
|
||||
:p(e):k(e)},n.union=function(){return W(yt.apply(G,arguments))},n.uniq=W,n.values=k,n.where=function(e,t){var n=gn(t);return O(e,function(e){for(var r=n.length;r--;){var i=e[n[r]]===t[n[r]];if(!i)break}return!!i})},n.without=function(e){for(var t=-1,n=e?e.length:0,i=r(arguments,1,20),s=[];++t<n;){var o=e[t];i(o)||s.push(o)}return s},n.wrap=function(e,t){return function(){var n=[e];return St.apply(n,arguments),t.apply(this,n)}},n.zip=function(e){for(var t=-1,n=e?P(H(arguments,"length")):0,r=Array(
|
||||
n);++t<n;)r[t]=H(arguments,t);return r},n.collect=D,n.drop=U,n.each=_,n.extend=fn,n.methods=b,n.select=O,n.tail=U,n.unique=W,$(n),n.clone=y,n.cloneDeep=function(e){return y(e,!0)},n.contains=L,n.escape=function(e){return null==e?"":(e+"").replace(dt,l)},n.every=A,n.find=M,n.has=function(e,t){return e?Et.call(e,t):!1},n.identity=V,n.indexOf=R,n.isArguments=v,n.isArray=vn,n.isBoolean=function(e){return!0===e||!1===e||Tt.call(e)==Ht},n.isDate=function(e){return e instanceof Date||Tt.call(e)==Bt},n.isElement=
|
||||
function(e){return e?1===e.nodeType:!1},n.isEmpty=function(e){var t=!0;if(!e)return t;var n=Tt.call(e),r=e.length;return n==Pt||n==qt||n==Dt||Qt&&v(e)||n==Ft&&typeof r=="number"&&S(e.splice)?!r:(cn(e,function(){return t=!1}),t)},n.isEqual=E,n.isFinite=function(e){return kt(e)&&!Lt(parseFloat(e))},n.isFunction=S,n.isNaN=function(e){return T(e)&&e!=+e},n.isNull=function(e){return null===e},n.isNumber=T,n.isObject=x,n.isPlainObject=mn,n.isRegExp=function(e){return e instanceof RegExp||Tt.call(e)==It
|
||||
},n.isString=N,n.isUndefined=function(e){return typeof e=="undefined"},n.lastIndexOf=function(e,t,n){var r=e?e.length:0;for(typeof n=="number"&&(r=(0>n?Ot(0,r+n):Mt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},n.mixin=$,n.noConflict=function(){return e._=nt,this},n.random=function(e,t){return null==e&&null==t&&(t=1),e=+e||0,null==t&&(t=e,e=0),e+bt(_t()*((+t||0)-e+1))},n.reduce=B,n.reduceRight=j,n.result=function(e,t){var n=e?e[t]:null;return S(n)?e[t]():n},n.size=function(e){var t=e?e.length:0;
|
||||
return typeof t=="number"?t:gn(e).length},n.some=F,n.sortedIndex=z,n.template=function(e,t,r){e||(e=""),r||(r={});var i,s,o=n.templateSettings,u=0,a=r.interpolate||o.interpolate||pt,l="__p+='",c=r.variable||o.variable,h=c;e.replace(RegExp((r.escape||o.escape||pt).source+"|"+a.source+"|"+(a===ht?ct:pt).source+"|"+(r.evaluate||o.evaluate||pt).source+"|$","g"),function(t,n,r,s,o,a){return r||(r=s),l+=e.slice(u,a).replace(vt,f),n&&(l+="'+__e("+n+")+'"),o&&(l+="';"+o+";__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"
|
||||
),i||(i=o||rt.test(n||r)),u=a+t.length,t}),l+="';\n",h||(c="obj",i?l="with("+c+"){"+l+"}":(r=RegExp("(\\(\\s*)"+c+"\\."+c+"\\b","g"),l=l.replace(ft,"$&"+c+".").replace(r,"$1__d"))),l=(i?l.replace(st,""):l).replace(ot,"$1").replace(ut,"$1;"),l="function("+c+"){"+(h?"":c+"||("+c+"={});")+"var __t,__p='',__e=_.escape"+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(h?"":",__d="+c+"."+c+"||"+c)+";")+l+"return __p}";try{s=Function("_","return "+l)(n)}catch(p){throw p.source=
|
||||
l,p}return t?s(t):(s.source=l,s)},n.unescape=function(e){return null==e?"":(e+"").replace(it,d)},n.uniqueId=function(e){return(null==e?"":e+"")+ ++Z},n.all=A,n.any=F,n.detect=M,n.foldl=B,n.foldr=j,n.include=L,n.inject=B,cn(n,function(e,t){n.prototype[t]||(n.prototype[t]=function(){var t=[this.__wrapped__];return St.apply(t,arguments),e.apply(n,t)})}),n.first=I,n.last=function(e,t,n){if(e){var r=e.length;return null==t||n?e[r-1]:p(e,Ot(0,r-t))}},n.take=I,n.head=I,cn(n,function(e,t){n.prototype[t]||
|
||||
(n.prototype[t]=function(t,r){var i=e(this.__wrapped__,t,r);return null==t||r?i:new n(i)})}),n.VERSION="1.0.0-rc.3",n.prototype.toString=function(){return this.__wrapped__+""},n.prototype.value=J,n.prototype.valueOf=J,an(["join","pop","shift"],function(e){var t=G[e];n.prototype[e]=function(){return t.apply(this.__wrapped__,arguments)}}),an(["push","reverse","sort","unshift"],function(e){var t=G[e];n.prototype[e]=function(){return t.apply(this.__wrapped__,arguments),this}}),an(["concat","slice","splice"
|
||||
],function(e){var t=G[e];n.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return new n(e)}}),$t&&an(["pop","shift","splice"],function(e){var t=G[e],r="splice"==e;n.prototype[e]=function(){var e=this.__wrapped__,i=t.apply(e,arguments);return 0===e.length&&delete e[0],r?new n(i):i}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=n,define(function(){return n})):K?typeof module=="object"&&module&&module.exports==K?(module.exports=n)._=n:K._=n:e._=n})(this);
|
||||
3
app/assets/javascripts/results.js.coffee
Normal file
3
app/assets/javascripts/results.js.coffee
Normal file
@@ -0,0 +1,3 @@
|
||||
# Place all the behaviors and hooks related to the matching controller here.
|
||||
# All this logic will automatically be available in application.js.
|
||||
# You can use CoffeeScript in this file: http://coffeescript.org/
|
||||
3
app/assets/javascripts/solutions.js.coffee
Normal file
3
app/assets/javascripts/solutions.js.coffee
Normal file
@@ -0,0 +1,3 @@
|
||||
# Place all the behaviors and hooks related to the matching controller here.
|
||||
# All this logic will automatically be available in application.js.
|
||||
# You can use CoffeeScript in this file: http://coffeescript.org/
|
||||
3
app/assets/javascripts/users.js.coffee
Normal file
3
app/assets/javascripts/users.js.coffee
Normal file
@@ -0,0 +1,3 @@
|
||||
# Place all the behaviors and hooks related to the matching controller here.
|
||||
# All this logic will automatically be available in application.js.
|
||||
# You can use CoffeeScript in this file: http://coffeescript.org/
|
||||
13
app/assets/stylesheets/application.css
Normal file
13
app/assets/stylesheets/application.css
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
||||
* listed below.
|
||||
*
|
||||
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
||||
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
||||
*
|
||||
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
||||
* compiled file, but it's generally better to create a new file per style scope.
|
||||
*
|
||||
*= require_self
|
||||
*= require_tree .
|
||||
*/
|
||||
324
app/assets/stylesheets/main.css
Normal file
324
app/assets/stylesheets/main.css
Normal file
@@ -0,0 +1,324 @@
|
||||
|
||||
@font-face {
|
||||
font-family: 'Oxygen';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(oxygen400.ttf) format('truetype');
|
||||
src: url(oxygen400.woff) format('woff');
|
||||
src: url(oxygen400.eot);
|
||||
src: local('Oxygen'), local('Oxygen-Regular'), url(oxygen400.eot) format('embedded-opentype'), url(oxygen400.woff) format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Oxygen';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: url(oxygen700.ttf) format('truetype');
|
||||
src: url(oxygen700.woff) format('woff');
|
||||
src: url(oxygen400.eot);
|
||||
src: local('Oxygen Bold'), local('Oxygen-Bold'), url(oxygen700.eot) format('embedded-opentype'), url(oxygen700.woff) format('woff');
|
||||
}
|
||||
|
||||
|
||||
html {
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Oxygen, sans-serif;
|
||||
font-size: 16px;
|
||||
min-width: 320px;
|
||||
background-color: #ecebe6;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.main {
|
||||
padding: 10px;
|
||||
max-width: 820px;
|
||||
min-width: 320px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
font-size: .9em;
|
||||
line-height: 1.7;
|
||||
color: #666;
|
||||
border-top: 1px solid #ccc;
|
||||
padding: 5px;
|
||||
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
z-index: -1;
|
||||
min-width: 320px;
|
||||
}
|
||||
|
||||
.home {
|
||||
text-align: center;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.wins {
|
||||
text-align: left;
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
width: 80%;
|
||||
margin: 20px auto;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.word {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.topnav {
|
||||
overflow: hidden;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.title, .titlenum {
|
||||
font-weight: bold;
|
||||
font-size: 1.6em;
|
||||
line-height: 1;
|
||||
color: #faa51a;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.title {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.titlenum {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.nav {
|
||||
text-align: center;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.nav span {
|
||||
display: inline-block;
|
||||
padding: 0px 10px;
|
||||
cursor: pointer;
|
||||
color: #666;
|
||||
border: 1px solid #faa51a;
|
||||
line-height: 1.5;
|
||||
margin: 0px 5px;
|
||||
}
|
||||
|
||||
.timer {
|
||||
color: #aaa;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
text-align: center;
|
||||
padding-top: 10px;
|
||||
min-width: 340px;
|
||||
}
|
||||
|
||||
.content {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
|
||||
|
||||
body {
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-o-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.squares table {
|
||||
width: 100%;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
.squares tr {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.squares td {
|
||||
text-align: center;
|
||||
width: 16%;
|
||||
height: 62px;
|
||||
}
|
||||
|
||||
.letters {
|
||||
margin: 5px;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
-khtml-user-select: none;
|
||||
font-size: 1.8em;
|
||||
line-height: 1.8;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
background-color: #FAA51A;
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
|
||||
.puznum {
|
||||
font-size: 1em;
|
||||
padding: 5px;
|
||||
margin: 20px auto;
|
||||
border: 1px solid #333;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 0 10px;
|
||||
margin-left: 5px;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
-khtml-user-select: none;
|
||||
font-size: 1.1em;
|
||||
line-height: 1.6;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
background-color: #FAA51A;
|
||||
border: none;
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.clues {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.clues ul {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
list-style-type: none;
|
||||
}
|
||||
.clues li {
|
||||
cursor: default;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.clues li:nth-child(odd) {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.answer {
|
||||
margin: 15px auto;
|
||||
border: 1px solid #aaa;
|
||||
overflow: hidden;
|
||||
padding: 5px 5px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.answertext, .reset, .guess {
|
||||
margin: 14px 20px 10px;
|
||||
}
|
||||
|
||||
.reset {
|
||||
color: #aaa;
|
||||
padding: 5px 13px;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
top: 8px;
|
||||
margin: 0px;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.answertext {
|
||||
font-weight: bold;
|
||||
font-size: 2em;
|
||||
color: #faa51a;
|
||||
}
|
||||
|
||||
.correct {
|
||||
color: #faa51a;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.squares h1 {
|
||||
text-align: center;
|
||||
margin: 20px;
|
||||
font-size: 3em;
|
||||
color: green;
|
||||
}
|
||||
|
||||
.squares h3 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.share {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.share i {
|
||||
display: inline-block;
|
||||
padding-top: 3px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
vertical-align: middle;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url(data:image/png;base64,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);
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 959px) {
|
||||
|
||||
.forkme{
|
||||
display:none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media (max-width: 480px) {
|
||||
|
||||
body{
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.clues{
|
||||
overflow: auto;
|
||||
height: 140px;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.nav {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.letters {
|
||||
margin: 1px;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.squares td{
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.forkme{
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
396
app/assets/stylesheets/normalize.css
vendored
Normal file
396
app/assets/stylesheets/normalize.css
vendored
Normal file
@@ -0,0 +1,396 @@
|
||||
/*! normalize.css v2.1.0 | MIT License | git.io/normalize */
|
||||
|
||||
/* ==========================================================================
|
||||
HTML5 display definitions
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Correct `block` display not defined in IE 8/9.
|
||||
*/
|
||||
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
main,
|
||||
nav,
|
||||
section,
|
||||
summary {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct `inline-block` display not defined in IE 8/9.
|
||||
*/
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
video {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent modern browsers from displaying `audio` without controls.
|
||||
* Remove excess height in iOS 5 devices.
|
||||
*/
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 8/9.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Base
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Set default font family to sans-serif.
|
||||
* 2. Prevent iOS text size adjust after orientation change, without disabling
|
||||
* user zoom.
|
||||
*/
|
||||
|
||||
html {
|
||||
font-family: sans-serif; /* 1 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
-ms-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove default margin.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Links
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address `outline` inconsistency between Chrome and other browsers.
|
||||
*/
|
||||
|
||||
a:focus {
|
||||
outline: thin dotted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Improve readability when focused and also mouse hovered in all browsers.
|
||||
*/
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Typography
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address variable `h1` font-size and margin within `section` and `article`
|
||||
* contexts in Firefox 4+, Safari 5, and Chrome.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 8/9, Safari 5, and Chrome.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: 1px dotted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in Safari 5 and Chrome.
|
||||
*/
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address differences between Firefox and other browsers.
|
||||
*/
|
||||
|
||||
hr {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 8/9.
|
||||
*/
|
||||
|
||||
mark {
|
||||
background: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct font family set oddly in Safari 5 and Chrome.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
/**
|
||||
* Improve readability of pre-formatted text in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set consistent quote types.
|
||||
*/
|
||||
|
||||
q {
|
||||
quotes: "\201C" "\201D" "\2018" "\2019";
|
||||
}
|
||||
|
||||
/**
|
||||
* Address inconsistent and variable font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove border when inside `a` element in IE 8/9.
|
||||
*/
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct overflow displayed oddly in IE 9.
|
||||
*/
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Figures
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address margin not present in IE 8/9 and Safari 5.
|
||||
*/
|
||||
|
||||
figure {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Define consistent border, margin, and padding.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct `color` not being inherited in IE 8/9.
|
||||
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
||||
*/
|
||||
|
||||
legend {
|
||||
border: 0; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct font family not being inherited in all browsers.
|
||||
* 2. Correct font size not being inherited in all browsers.
|
||||
* 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit; /* 1 */
|
||||
font-size: 100%; /* 2 */
|
||||
margin: 0; /* 3 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
||||
* the UA stylesheet.
|
||||
*/
|
||||
|
||||
button,
|
||||
input {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
||||
* All other form control elements do not inherit `text-transform` values.
|
||||
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
|
||||
* Correct `select` style inheritance in Firefox 4+ and Opera.
|
||||
*/
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
||||
* and `video` controls.
|
||||
* 2. Correct inability to style clickable `input` types in iOS.
|
||||
* 3. Improve usability and consistency of cursor style between image-type
|
||||
* `input` and others.
|
||||
*/
|
||||
|
||||
button,
|
||||
html input[type="button"], /* 1 */
|
||||
input[type="reset"],
|
||||
input[type="submit"] {
|
||||
-webkit-appearance: button; /* 2 */
|
||||
cursor: pointer; /* 3 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-set default cursor for disabled elements.
|
||||
*/
|
||||
|
||||
button[disabled],
|
||||
html input[disabled] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Address box sizing set to `content-box` in IE 8/9.
|
||||
* 2. Remove excess padding in IE 8/9.
|
||||
*/
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
|
||||
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
|
||||
* (include `-moz` to future-proof).
|
||||
*/
|
||||
|
||||
input[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
-moz-box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box; /* 2 */
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove inner padding and search cancel button in Safari 5 and Chrome
|
||||
* on OS X.
|
||||
*/
|
||||
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove inner padding and border in Firefox 4+.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove default vertical scrollbar in IE 8/9.
|
||||
* 2. Improve readability and alignment in all browsers.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto; /* 1 */
|
||||
vertical-align: top; /* 2 */
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Tables
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove most spacing between table cells.
|
||||
*/
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
BIN
app/assets/stylesheets/oxygen400.eot
Normal file
BIN
app/assets/stylesheets/oxygen400.eot
Normal file
Binary file not shown.
BIN
app/assets/stylesheets/oxygen400.ttf
Normal file
BIN
app/assets/stylesheets/oxygen400.ttf
Normal file
Binary file not shown.
BIN
app/assets/stylesheets/oxygen400.woff
Normal file
BIN
app/assets/stylesheets/oxygen400.woff
Normal file
Binary file not shown.
BIN
app/assets/stylesheets/oxygen700.eot
Normal file
BIN
app/assets/stylesheets/oxygen700.eot
Normal file
Binary file not shown.
BIN
app/assets/stylesheets/oxygen700.ttf
Normal file
BIN
app/assets/stylesheets/oxygen700.ttf
Normal file
Binary file not shown.
BIN
app/assets/stylesheets/oxygen700.woff
Normal file
BIN
app/assets/stylesheets/oxygen700.woff
Normal file
Binary file not shown.
20
app/controllers/application_controller.rb
Normal file
20
app/controllers/application_controller.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
class ApplicationController < ActionController::Base
|
||||
# Prevent CSRF attacks by raising an exception.
|
||||
# For APIs, you may want to use :null_session instead.
|
||||
protect_from_forgery with: :exception
|
||||
|
||||
#before_filter :set_default_response_format
|
||||
#
|
||||
#private
|
||||
#def set_default_response_format
|
||||
# request.format = :json
|
||||
#end
|
||||
|
||||
before_filter :allow_cors
|
||||
def allow_cors
|
||||
headers['Access-Control-Allow-Origin'] = '*'
|
||||
headers['Access-Control-Allow-Methods'] = 'POST, PUT, DELETE, GET, OPTIONS'
|
||||
headers['Access-Control-Request-Method'] = '*'
|
||||
headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept, Authorization'
|
||||
end
|
||||
end
|
||||
0
app/controllers/concerns/.keep
Normal file
0
app/controllers/concerns/.keep
Normal file
34
app/controllers/guesses_controller.rb
Normal file
34
app/controllers/guesses_controller.rb
Normal file
@@ -0,0 +1,34 @@
|
||||
class GuessesController < ApplicationController
|
||||
skip_before_filter :verify_authenticity_token
|
||||
#before_filter :allow_cors
|
||||
|
||||
|
||||
# GET /guesses
|
||||
# GET /guesses.json
|
||||
def index
|
||||
@guesses = Guess.all.order("created_at DESC")
|
||||
end
|
||||
|
||||
|
||||
# POST /guesses
|
||||
# POST /guesses.json
|
||||
def create
|
||||
@guess = Guess.new
|
||||
@guess.username = params[:username]
|
||||
@guess.definition = params[:definition]
|
||||
Rails.logger.debug(params.inspect)
|
||||
|
||||
respond_to do |format|
|
||||
if @guess.save
|
||||
format.json { render action: 'show', status: :created, location: @guess }
|
||||
else
|
||||
format.json { render json: @guess.errors, status: :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
@guess = Guess.find(params[:id])
|
||||
end
|
||||
end
|
||||
|
||||
45
app/controllers/results_controller.rb
Normal file
45
app/controllers/results_controller.rb
Normal file
@@ -0,0 +1,45 @@
|
||||
class ResultsController < ApplicationController
|
||||
before_action :set_result, only: [:show, :edit, :update, :destroy]
|
||||
|
||||
# GET /results
|
||||
# GET /results.json
|
||||
def index
|
||||
@results = Result.all
|
||||
end
|
||||
|
||||
# GET /results/1
|
||||
# GET /results/1.json
|
||||
def show
|
||||
end
|
||||
|
||||
|
||||
|
||||
# POST /results
|
||||
# POST /results.json
|
||||
def create
|
||||
@result = Result.new(result_params)
|
||||
|
||||
respond_to do |format|
|
||||
if @result.save
|
||||
format.html { redirect_to @result, notice: 'Result was successfully created.' }
|
||||
format.json { render action: 'show', status: :created, location: @result }
|
||||
else
|
||||
format.html { render action: 'new' }
|
||||
format.json { render json: @result.errors, status: :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
private
|
||||
# Use callbacks to share common setup or constraints between actions.
|
||||
def set_result
|
||||
@result = Result.find(params[:id])
|
||||
end
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def result_params
|
||||
params.require(:result).permit(:user_id, :time)
|
||||
end
|
||||
end
|
||||
37
app/controllers/solutions_controller.rb
Normal file
37
app/controllers/solutions_controller.rb
Normal file
@@ -0,0 +1,37 @@
|
||||
class SolutionsController < ApplicationController
|
||||
|
||||
skip_before_filter :verify_authenticity_token
|
||||
|
||||
#before_filter :allow_cors
|
||||
|
||||
# GET /solutions
|
||||
# GET /solutions.json
|
||||
def index
|
||||
@solutions = Solution.all
|
||||
end
|
||||
|
||||
# GET /solutions/1
|
||||
# GET /solutions/1.json
|
||||
def show
|
||||
@solution = Solution.find(params[:id])
|
||||
end
|
||||
|
||||
|
||||
# POST /solutions
|
||||
# POST /solutions.json
|
||||
def create
|
||||
@solution = Solution.new
|
||||
@solution.time = params[:time]
|
||||
@solution.number = params[:number].to_i
|
||||
@solution.username = params[:username]
|
||||
|
||||
respond_to do |format|
|
||||
if @solution.save
|
||||
format.json { render action: 'show', status: :created, location: @solution }
|
||||
else
|
||||
format.json { render json: @solution.errors, status: :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
12
app/controllers/users_controller.rb
Normal file
12
app/controllers/users_controller.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class UsersController < ApplicationController
|
||||
|
||||
|
||||
# GET /users
|
||||
# GET /users.json
|
||||
def index
|
||||
username = params[:username]
|
||||
@solutions = Solution.all.where(:username => username).order("created_at DESC")
|
||||
@guesses = Guess.all.where(:username => username).order("created_at DESC")
|
||||
end
|
||||
|
||||
end
|
||||
2
app/helpers/application_helper.rb
Normal file
2
app/helpers/application_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module ApplicationHelper
|
||||
end
|
||||
2
app/helpers/guesses_helper.rb
Normal file
2
app/helpers/guesses_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module GuessesHelper
|
||||
end
|
||||
2
app/helpers/results_helper.rb
Normal file
2
app/helpers/results_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module ResultsHelper
|
||||
end
|
||||
2
app/helpers/solutions_helper.rb
Normal file
2
app/helpers/solutions_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module SolutionsHelper
|
||||
end
|
||||
2
app/helpers/users_helper.rb
Normal file
2
app/helpers/users_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module UsersHelper
|
||||
end
|
||||
0
app/mailers/.keep
Normal file
0
app/mailers/.keep
Normal file
0
app/models/.keep
Normal file
0
app/models/.keep
Normal file
0
app/models/concerns/.keep
Normal file
0
app/models/concerns/.keep
Normal file
10
app/models/concerns/formatable.rb
Normal file
10
app/models/concerns/formatable.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
module Formatable
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
||||
def created_at_formatted
|
||||
created_at.in_time_zone("Europe/Sarajevo").strftime("%d.%m.%Y %H:%M")
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
3
app/models/guess.rb
Normal file
3
app/models/guess.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
class Guess < ActiveRecord::Base
|
||||
include Formatable
|
||||
end
|
||||
3
app/models/solution.rb
Normal file
3
app/models/solution.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
class Solution < ActiveRecord::Base
|
||||
include Formatable
|
||||
end
|
||||
2
app/models/user.rb
Normal file
2
app/models/user.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
class User < ActiveRecord::Base
|
||||
end
|
||||
9
app/views/guesses/index.html.erb
Normal file
9
app/views/guesses/index.html.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<div class="puzhome">
|
||||
|
||||
<h1> Najnoviji uspjesi</h1>
|
||||
|
||||
<% @guesses.each do |guess| %>
|
||||
<div><%= guess.created_at_formatted %><h3> <%= link_to( guess.username, users_url + "?username=" + guess.username.to_s) %>: <%= guess.definition %></h3> </div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
4
app/views/guesses/index.json.jbuilder
Normal file
4
app/views/guesses/index.json.jbuilder
Normal file
@@ -0,0 +1,4 @@
|
||||
json.array!(@guesses) do |guess|
|
||||
json.extract! guess, :username, :definition
|
||||
json.url guess_url(guess, format: :json)
|
||||
end
|
||||
1
app/views/guesses/show.html.erb
Normal file
1
app/views/guesses/show.html.erb
Normal file
@@ -0,0 +1 @@
|
||||
Nothing to see here - move along!
|
||||
3
app/views/guesses/show.json.jbuilder
Normal file
3
app/views/guesses/show.json.jbuilder
Normal file
@@ -0,0 +1,3 @@
|
||||
json.extract! guess, :username, :definition
|
||||
|
||||
|
||||
28
app/views/layouts/application.html.erb
Normal file
28
app/views/layouts/application.html.erb
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" itemscope itemtype="http://schema.org/Organization">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Rijeci</title>
|
||||
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
|
||||
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
||||
<%= csrf_meta_tags %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="main">
|
||||
<div class="topnav">
|
||||
<h1 class="title"></h1>
|
||||
<h1 class="titlenum"></h1>
|
||||
</div>
|
||||
<div class="content">
|
||||
<%= yield %>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<a href="http://www.islambosna.ba"><img src="http://www.islambosna.ba/wp-content/uploads/2013/06/logotip_noba_520t.png" /></a>
|
||||
Developed by Ahmed Islamovic.
|
||||
</div>
|
||||
</div>
|
||||
<a class="forkme" href="https://github.com/senaduka/flip"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
|
||||
</body>
|
||||
</html>
|
||||
25
app/views/results/_form.html.erb
Normal file
25
app/views/results/_form.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<%= form_for(@result) do |f| %>
|
||||
<% if @result.errors.any? %>
|
||||
<div id="error_explanation">
|
||||
<h2><%= pluralize(@result.errors.count, "error") %> prohibited this result from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<% @result.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :user_id %><br>
|
||||
<%= f.number_field :user_id %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= f.label :time %><br>
|
||||
<%= f.text_field :time %>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<%= f.submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
6
app/views/results/edit.html.erb
Normal file
6
app/views/results/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing result</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @result %> |
|
||||
<%= link_to 'Back', results_path %>
|
||||
29
app/views/results/index.html.erb
Normal file
29
app/views/results/index.html.erb
Normal file
@@ -0,0 +1,29 @@
|
||||
<h1>Listing results</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>User</th>
|
||||
<th>Time</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @results.each do |result| %>
|
||||
<tr>
|
||||
<td><%= result.user_id %></td>
|
||||
<td><%= result.time %></td>
|
||||
<td><%= link_to 'Show', result %></td>
|
||||
<td><%= link_to 'Edit', edit_result_path(result) %></td>
|
||||
<td><%= link_to 'Destroy', result, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<%= link_to 'New Result', new_result_path %>
|
||||
4
app/views/results/index.json.jbuilder
Normal file
4
app/views/results/index.json.jbuilder
Normal file
@@ -0,0 +1,4 @@
|
||||
json.array!(@results) do |result|
|
||||
json.extract! result, :user_id, :time
|
||||
json.url result_url(result, format: :json)
|
||||
end
|
||||
5
app/views/results/new.html.erb
Normal file
5
app/views/results/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New result</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', results_path %>
|
||||
14
app/views/results/show.html.erb
Normal file
14
app/views/results/show.html.erb
Normal file
@@ -0,0 +1,14 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<strong>User:</strong>
|
||||
<%= @result.user_id %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Time:</strong>
|
||||
<%= @result.time %>
|
||||
</p>
|
||||
|
||||
<%= link_to 'Edit', edit_result_path(@result) %> |
|
||||
<%= link_to 'Back', results_path %>
|
||||
1
app/views/results/show.json.jbuilder
Normal file
1
app/views/results/show.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.extract! @result, :user_id, :time, :created_at, :updated_at
|
||||
11
app/views/solutions/index.html.erb
Normal file
11
app/views/solutions/index.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="puzhome">
|
||||
|
||||
<h1> Najnovije pobjede</h1>
|
||||
<% i = 1 %>
|
||||
<% @solutions.each do |solution| %>
|
||||
<div><%=i%>. <%= solution.created_at_formatted %> <%= link_to( solution.username, users_url + "?username=" + solution.username) %>: <%= solution.number %> u vremenu <%=solution.time%></div>
|
||||
<% i += 1%>
|
||||
<% end %>
|
||||
|
||||
|
||||
</div>
|
||||
4
app/views/solutions/index.json.jbuilder
Normal file
4
app/views/solutions/index.json.jbuilder
Normal file
@@ -0,0 +1,4 @@
|
||||
json.array!(@solutions) do |solution|
|
||||
json.extract! solution, :number, :time, :username
|
||||
json.url solution_url(solution, format: :json)
|
||||
end
|
||||
1
app/views/solutions/show.json.jbuilder
Normal file
1
app/views/solutions/show.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.extract! @solution, :number, :time, :username, :created_at, :updated_at
|
||||
19
app/views/users/index.html.erb
Normal file
19
app/views/users/index.html.erb
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="puzhome">
|
||||
|
||||
<h1> Najnovije pobjede</h1>
|
||||
<% i = 1 %>
|
||||
<% @solutions.each do |solution| %>
|
||||
<div><%=i%>. <%= solution.created_at_formatted %> <%= solution.username %>: <%= solution.number %> u vremenu <%=solution.time%></div>
|
||||
<% i += 1%>
|
||||
<% end %>
|
||||
|
||||
<h1> Najnoviji uspjesi</h1>
|
||||
|
||||
<% @guesses.each do |guess| %>
|
||||
<div><%= guess.created_at_formatted %><h3><%= guess.username %>: <%= guess.definition %></h3> </div>
|
||||
<% end %>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user