diff options
Diffstat (limited to 'app/assets')
49 files changed, 464 insertions, 34 deletions
diff --git a/app/assets/images/Plus.png b/app/assets/images/Plus.png Binary files differnew file mode 100644 index 0000000..fa6a7a5 --- /dev/null +++ b/app/assets/images/Plus.png diff --git a/app/assets/images/bg.png b/app/assets/images/bg.png Binary files differnew file mode 100644 index 0000000..91c77c8 --- /dev/null +++ b/app/assets/images/bg.png diff --git a/app/assets/images/chess_icon.png b/app/assets/images/chess_icon.png Binary files differnew file mode 100644 index 0000000..6bcffe6 --- /dev/null +++ b/app/assets/images/chess_icon.png diff --git a/app/assets/images/league_icon.gif b/app/assets/images/league_icon.gif Binary files differnew file mode 100644 index 0000000..1f0fa43 --- /dev/null +++ b/app/assets/images/league_icon.gif diff --git a/app/assets/javascripts/alerts/edit.js.coffee b/app/assets/javascripts/alerts/edit.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/alerts/edit.js.coffee diff --git a/app/assets/javascripts/alerts/index.js.coffee b/app/assets/javascripts/alerts/index.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/alerts/index.js.coffee diff --git a/app/assets/javascripts/alerts/new.js.coffee b/app/assets/javascripts/alerts/new.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/alerts/new.js.coffee diff --git a/app/assets/javascripts/alerts/show.js.coffee b/app/assets/javascripts/alerts/show.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/alerts/show.js.coffee diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index d6925fa..1130838 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -13,4 +13,8 @@ //= require jquery //= require jquery_ujs //= require turbolinks -//= require_tree . +//= require 'drag.js' +//= require 'dragsort.js' +//= require 'coordinates.js' +// +//= require_tree ./application diff --git a/app/assets/javascripts/application/.keep b/app/assets/javascripts/application/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/application/.keep diff --git a/app/assets/javascripts/brackets/edit.js.coffee b/app/assets/javascripts/brackets/edit.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/brackets/edit.js.coffee diff --git a/app/assets/javascripts/brackets/index.js.coffee b/app/assets/javascripts/brackets/index.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/brackets/index.js.coffee diff --git a/app/assets/javascripts/brackets/new.js.coffee b/app/assets/javascripts/brackets/new.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/brackets/new.js.coffee diff --git a/app/assets/javascripts/brackets/show.js.coffee b/app/assets/javascripts/brackets/show.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/brackets/show.js.coffee diff --git a/app/assets/javascripts/games/edit.js.coffee b/app/assets/javascripts/games/edit.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/games/edit.js.coffee diff --git a/app/assets/javascripts/games/index.js.coffee b/app/assets/javascripts/games/index.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/games/index.js.coffee diff --git a/app/assets/javascripts/games/new.js.coffee b/app/assets/javascripts/games/new.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/games/new.js.coffee diff --git a/app/assets/javascripts/games/show.js.coffee b/app/assets/javascripts/games/show.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/games/show.js.coffee diff --git a/app/assets/javascripts/main/homepage.js.coffee b/app/assets/javascripts/main/homepage.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/main/homepage.js.coffee diff --git a/app/assets/javascripts/matches/show.js.coffee b/app/assets/javascripts/matches/show.js.coffee new file mode 100644 index 0000000..2609a69 --- /dev/null +++ b/app/assets/javascripts/matches/show.js.coffee @@ -0,0 +1,2 @@ +window.onload = -> + BetterDragSort.makeListSortable(document.getElementById("boxes")); diff --git a/app/assets/javascripts/pms/edit.js.coffee b/app/assets/javascripts/pms/edit.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/pms/edit.js.coffee diff --git a/app/assets/javascripts/pms/index.js.coffee b/app/assets/javascripts/pms/index.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/pms/index.js.coffee diff --git a/app/assets/javascripts/pms/new.js.coffee b/app/assets/javascripts/pms/new.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/pms/new.js.coffee diff --git a/app/assets/javascripts/pms/show.js.coffee b/app/assets/javascripts/pms/show.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/pms/show.js.coffee diff --git a/app/assets/javascripts/search/go.js.coffee b/app/assets/javascripts/search/go.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/search/go.js.coffee diff --git a/app/assets/javascripts/server/edit.js.coffee b/app/assets/javascripts/server/edit.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/server/edit.js.coffee diff --git a/app/assets/javascripts/server/show.js.coffee b/app/assets/javascripts/server/show.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/server/show.js.coffee diff --git a/app/assets/javascripts/sessions/new.js.coffee b/app/assets/javascripts/sessions/new.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/sessions/new.js.coffee diff --git a/app/assets/javascripts/teams/edit.js.coffee b/app/assets/javascripts/teams/edit.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/teams/edit.js.coffee diff --git a/app/assets/javascripts/teams/index.js.coffee b/app/assets/javascripts/teams/index.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/teams/index.js.coffee diff --git a/app/assets/javascripts/teams/new.js.coffee b/app/assets/javascripts/teams/new.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/teams/new.js.coffee diff --git a/app/assets/javascripts/teams/show.js.coffee b/app/assets/javascripts/teams/show.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/teams/show.js.coffee diff --git a/app/assets/javascripts/tournaments/edit.js.coffee b/app/assets/javascripts/tournaments/edit.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/tournaments/edit.js.coffee diff --git a/app/assets/javascripts/tournaments/index.js.coffee b/app/assets/javascripts/tournaments/index.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/tournaments/index.js.coffee diff --git a/app/assets/javascripts/tournaments/new.js.coffee b/app/assets/javascripts/tournaments/new.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/tournaments/new.js.coffee diff --git a/app/assets/javascripts/tournaments/show.js.coffee b/app/assets/javascripts/tournaments/show.js.coffee new file mode 100644 index 0000000..8620210 --- /dev/null +++ b/app/assets/javascripts/tournaments/show.js.coffee @@ -0,0 +1,32 @@ +json_url = window.location.href.replace(/\.[^/]*$/,'')+".json" + +update = (tournament) -> + here = tournament["players"].length + needed = (tournament["min_teams_per_match"] * tournament["min_players_per_team"]) + pct_complete = here / needed + + $("#prog-bar").width (pct_complete * 100) + "%" + $("#players-needed").text here + " " + ((if here is 1 then "player has" else "players have")) + " signed up. " + needed + " players needed. " + + # Update the user list + players = "" + for player in tournament["players"] + players = players + "<li><span class=\"black\">" + player["user_name"] + "</span></li>" + $("#tournament-users").html players + + # Enable/disable the "start" button depending on the number of players + $("input[value=\"Start Tournament\"]").prop "disabled", (if (pct_complete >= 1) then false else true) + + # Switch views if the tournament has been started + if tournament["status"] is 1 + window.location.reload true + + # Do it all again + setTimeout (-> + $.ajax(url: json_url).done update + return + ), 2000 + +# Now kick off the whole process +window.onload = -> + $.ajax(url: json_url).done update diff --git a/app/assets/javascripts/users/edit.js.coffee b/app/assets/javascripts/users/edit.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/users/edit.js.coffee diff --git a/app/assets/javascripts/users/index.js.coffee b/app/assets/javascripts/users/index.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/users/index.js.coffee diff --git a/app/assets/javascripts/users/new.js.coffee b/app/assets/javascripts/users/new.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/users/new.js.coffee diff --git a/app/assets/javascripts/users/show.js.coffee b/app/assets/javascripts/users/show.js.coffee new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/javascripts/users/show.js.coffee diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 3192ec8..677791c 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -11,3 +11,14 @@ *= require_self *= require_tree . */ + +#query{ + background-color: #303030; + border: 2px solid #ED9C28; + border-radius: 5px; + color: #FFF; + font-weight: bold; + height: 30px; + padding: 0px 5px; +} + diff --git a/app/assets/stylesheets/custom.css.scss b/app/assets/stylesheets/custom.css.scss new file mode 100644 index 0000000..b456893 --- /dev/null +++ b/app/assets/stylesheets/custom.css.scss @@ -0,0 +1,96 @@ +@import "bootstrap"; + +$page-color: #444; +$toolbar-color: black; +$orange: #DD9125; +$darker-orange: #9D4102; +$link-yellow: #FFC50D; + +header > nav { + @extend .navbar; + @extend .navbar-inverse; + color: white; + + #log-buttons { + margin-top: 8px; + form { display: inline; } + } + form.search { + @extend .navbar-form; + @extend .navbar-right; + input[type="submit"] { + @extend .btn-warning; margin-top: -3px; margin-right: 8px; + } + } +} + + +a, input[type="submit"] { + @extend .btn; + &.user { @extend .btn-info; } + &.signup { @extend .btn-success; } + &.signin { @extend .btn-warning; } + &.signout { @extend .btn-danger; } + &.server { @extend .btn-danger; } + font-weight: bold !important; +} + + +input[type="text"], input[type="password"], textarea{ + -webkit-box-shadow: inset 0 0 8px rgba(0,0,0,0.1), 0 0 16px rgba(0,0,0,0.1); + -moz-box-shadow: inset 0 0 8px rgba(0,0,0,0.1), 0 0 16px rgba(0,0,0,0.1); + box-shadow: inset 0 0 8px rgba(0,0,0,0.1), 0 0 16px rgba(0,0,0,0.1); + + border: 3px inset #A5A5A5; + padding: 8px; + color: $orange !important; + background: rgba(0,0,0,0.5); + margin: 0 0 5px 0; +} + +select { + background-color: #333; + padding: 5px; + border: none; + color: #DD9125 !important; +} + +p.errors { + background-color: rgba(0,0,0,0.5);; + color: red; + border-radius: 7px; + padding: 10px; +} + +#error_explanation { + width: 450px; + border: 2px solid red; + padding: 7px; + padding-bottom: 0; + margin-bottom: 20px; + background-color: #f0f0f0; + h2 { + text-align: left; + font-weight: bold; + padding: 5px 5px 5px 15px; + font-size: 12px; + margin: -7px; + margin-bottom: 0px; + background-color: #c00; + color: #fff; + } + ul li { + font-size: 12px; + list-style: square; + } +} + +// Limitation: Only one box can be expanded at a time +.collapsible { + .collapsed { display: block; } + .expanded { display: none; } + &:target { + .collapsed { display: none; } + .expanded { display: block; } + } +} diff --git a/app/assets/stylesheets/main.css.scss b/app/assets/stylesheets/main.css.scss index a0d94c1..3859f53 100644 --- a/app/assets/stylesheets/main.css.scss +++ b/app/assets/stylesheets/main.css.scss @@ -1,3 +1,14 @@ // Place all the styles related to the main controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ + +.jumbotron { + background-color: #FFF; + box-shadow: 1px 1px 20px black; + width: 93%; + + p { + line-height: 1.5em; + } + +} diff --git a/app/assets/stylesheets/matches.css.scss b/app/assets/stylesheets/matches.css.scss index 4c396e3..ee43ab4 100644 --- a/app/assets/stylesheets/matches.css.scss +++ b/app/assets/stylesheets/matches.css.scss @@ -1,3 +1,69 @@ // Place all the styles related to the matches controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ +#boxes li { + cursor: move; + position: relative; + float: left; + margin: 5px; + width: 180px; + height: 240px; + border: 1px solid rgb(0, 0, 0); + text-align: center; + padding-top: 10px; + background-color: rgb(238, 238, 255); +} +#numeric li { + cursor: move; + position: relative; + float: left; + margin: 5px; + width: 180px; + height: 240px; + border: 1px solid rgb(0, 0, 0); + text-align: center; + padding-top: 10px; + background-color: rgb(238, 238, 255); +} + +#match-stats { + padding-bottom: 10px; + border-bottom: thick dashed #F0AD4E; +} + +#match-winner { + margin: 0 auto; + text-align: center; + font-size: 2em; +} + +#current-id { + display: none; +} + + + +/**** INDEX PAGE - TABLE AND GRAPH ****/ +#matches-table { + @extend .table; + color: #FFF; + + form { + color: #333; + } +} + +svg { + min-width: 600px; +} + +@media (max-width: 900px) { + svg text { + font-size: 200%; + } +} +@media (max-width: 700px) { + svg text { + font-size: 150%; + } +}
\ No newline at end of file diff --git a/app/assets/stylesheets/pms.css.scss b/app/assets/stylesheets/pms.css.scss index 5106093..a14299e 100644 --- a/app/assets/stylesheets/pms.css.scss +++ b/app/assets/stylesheets/pms.css.scss @@ -1,3 +1,11 @@ // Place all the styles related to the pms controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ + +p, li { + color: #DD9125; +} +td, th { + padding: 0px; + color: #DD9125; +}
\ No newline at end of file diff --git a/app/assets/stylesheets/scaffolds.css.scss b/app/assets/stylesheets/scaffolds.css.scss index 6ec6a8f..eb1f751 100644 --- a/app/assets/stylesheets/scaffolds.css.scss +++ b/app/assets/stylesheets/scaffolds.css.scss @@ -1,9 +1,30 @@ +@import "bootstrap"; + +$page-color: #444; +$toolbar-color: black; +$orange: #DD9125; +$darker-orange: #9D4102; +$link-yellow: #FFC50D; + +html{ + height: 100%; +} + body { - background-color: #fff; - color: #333; + background: asset-url("bg.png", image) repeat scroll 0 0 $page-color; + color: $page-color; font-family: verdana, arial, helvetica, sans-serif; font-size: 13px; line-height: 18px; + height: 100%; +} + +h1, h2, h3, h4, h5, p, li, label{ + color: $orange; +} + +h1, h2, h3, h4, h5 { + text-shadow: 0px 0px 2px $darker-orange; } p, ol, ul, td { @@ -12,6 +33,26 @@ p, ol, ul, td { line-height: 18px; } +/* NAVBAR */ + +.navbar-brand { + @extend .no-dec; + a{ + color: white; + &:hover, &:active, &:focus { + color: white; + font-weight: normal; + text-decoration: none; + } + } +} + +.navbar-inverse, header > nav { + background-color: $toolbar-color; + border-radius: 0px 0px 5px 5px; + box-shadow: 0px 0px 5px black; +} + pre { background-color: #eee; padding: 10px; @@ -19,13 +60,10 @@ pre { } a { - color: #000; - &:visited { - color: #666; - } - &:hover { - color: #fff; - background-color: #000; + color: $link-yellow; + &:hover { + color: #FFEF00; + text-decoration: none; } } @@ -36,34 +74,43 @@ div { } #notice { - color: green; + background-color: rgba(0,0,0,0.5); + border-radius: 7px; + padding: 10px; + width: 80%; + margin: 0px auto; + text-align: center; + + p{ + color: lightgreen !important; + font-weight: bold; + } } .field_with_errors { - padding: 2px; - background-color: red; + padding: 1px; + background-color: #FF4C4C; + box-shadow: 0px 0px 5px red; display: table; } -#error_explanation { - width: 450px; - border: 2px solid red; - padding: 7px; - padding-bottom: 0; - margin-bottom: 20px; - background-color: #f0f0f0; - h2 { - text-align: left; - font-weight: bold; - padding: 5px 5px 5px 15px; - font-size: 12px; - margin: -7px; - margin-bottom: 0px; - background-color: #c00; - color: #fff; - } - ul li { - font-size: 12px; - list-style: square; - } +.wrapper { + width: 80%; + margin-top: 10px; + min-height: 80%; + height: auto !important; + height: 99%; + margin: 0 auto; } + +button, input[type="submit"] { + @extend .btn; +} + +footer { + clear: both; + border-top: solid 1px $orange; + text-align: center; + margin: 0 auto; + width: 90%; +}
\ No newline at end of file diff --git a/app/assets/stylesheets/servers.css.scss b/app/assets/stylesheets/servers.css.scss index 4710386..1ff4536 100644 --- a/app/assets/stylesheets/servers.css.scss +++ b/app/assets/stylesheets/servers.css.scss @@ -1,3 +1,26 @@ // Place all the styles related to the servers controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ + +$page-color: #444; +$toolbar-color: black; +$orange: #DD9125; +$darker-orange: #9D4102; +$link-yellow: #FFC50D; + +.edit_server { + + legend { + color: #EEE; + } + color: #FFF; + + input[type="submit"] { + color: $page-color; + } + + li { + list-style: none; + } + +}
\ No newline at end of file diff --git a/app/assets/stylesheets/tournaments.css.scss b/app/assets/stylesheets/tournaments.css.scss index e372b90..cc55253 100644 --- a/app/assets/stylesheets/tournaments.css.scss +++ b/app/assets/stylesheets/tournaments.css.scss @@ -1,3 +1,95 @@ // Place all the styles related to the tournaments controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ + +p.default-field { + display: inline; +} + +span.default-explanation { + color: gray; + font-style: italic; +} + +#players-needed { + text-align: center; + font-style: italic; +} + +#tournament-side-params { + background: none repeat scroll 0 0 rgba(0,0,0,0.5); + border-radius: 5px; + float: right; + font-size: 7px; + padding: 10px; + + p { + font-size: 10px; + margin-bottom: 5px; + } + +} + +#tournament-users{ + + li { + color: #10A010; + } + + .black { + color: white; + } +} + + +/* Style of a tournament listing div */ +div.tournament-listing { + margin: 10px 0px; + border-radius: 5px; + box-shadow: 0px 0px 3px #B8B8B8; + background-color: rgba(0, 0, 0, 0.6); + border: 1px solid #AAAAAA; + min-height: 100px; + padding: 8px 4px; + + /* AKA the listing title */ + h3 { + margin-top: 0px; + color: #F0AD4E; + font-weight: bold; + } + + h3:hover { + color: #D09D3E; + } + + /* host of the tournament */ + .host { + font-weight: bold; + color: #FFF; + } + + .col-md-8 { + padding: 0; + a { + padding: 5px 0 0 0; + } + } + + .t-game{ + font-weight: bold; + text-align: center; + } + + .t-image{ + display: block; + margin:auto; + } +} + +div.leave-buttons { + margin-top: 50px; + form { + display: inline; + } +}
\ No newline at end of file diff --git a/app/assets/stylesheets/users.css.scss b/app/assets/stylesheets/users.css.scss index 1efc835..5df7aee 100644 --- a/app/assets/stylesheets/users.css.scss +++ b/app/assets/stylesheets/users.css.scss @@ -1,3 +1,41 @@ // Place all the styles related to the users controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ + + +/*** FOR NEW USER - AKA SIGN UP ***/ +.simple_captcha { + background-color: rgba(255, 255, 255, 0.7); + margin: 10px 0px; +} + + +div.user-listing { + margin: 10px 0px; + border-radius: 5px; + box-shadow: 0px 0px 3px #B8B8B8; + background-color: rgba(0, 0, 0, 0.6); + border: 1px solid #AAAAAA; + min-height: 100px; + padding: 8px 4px; + display: inline-table; + + /* AKA the listing title */ + h3 { + margin-top: 0px; + color: #F0AD4E; + font-weight: bold; + } + + h3:hover { + color: #D09D3E; + } + + .things { + padding: 0px 10px; + } + + p { + margin: 0; + } +}
\ No newline at end of file |