From fd5158e7127fa1814f13128b084450667230f98a Mon Sep 17 00:00:00 2001 From: "Jesse C. Fisher" Date: Fri, 20 Nov 2015 17:52:18 -0800 Subject: [PATCH] Stash moar --- README.md | 17 ++- app/assets/javascripts/components/game.js.jsx | 47 ++++---- .../javascripts/components/inventory.js.jsx | 4 +- .../javascripts/components/player.js.jsx | 16 +-- .../javascripts/components/player_list.js.jsx | 27 +++-- app/assets/javascripts/header-scroll.js | 38 +++++++ app/assets/stylesheets/application.css.sass | 22 ++-- app/assets/stylesheets/game.css.sass | 102 ++++++++++++++++++ app/assets/stylesheets/games.css.sass | 7 +- app/views/games/_form.html.haml | 2 +- app/views/games/new.html.haml | 2 - app/views/games/show.html.haml | 2 +- app/views/layouts/_navigation_links.html.erb | 2 +- spec/features/plays_spec.rb | 2 +- 14 files changed, 226 insertions(+), 64 deletions(-) create mode 100644 app/assets/javascripts/header-scroll.js diff --git a/README.md b/README.md index e461717..a0c2cf5 100644 --- a/README.md +++ b/README.md @@ -4,23 +4,24 @@ Thirteen Tien Len TODO ---- +- flexbox layout: http://codepen.io/anon/pen/ojJOjq + - graphics - Remove PlayToBeat model and table. -- Implement run including face cards +- Implement run including face cards (done?) - BUG TODO: First player / lowest card holder should not be able to pass first play -- Fix tests. They mostly pass when run individually. Explore if `game_setup` - is causing a bleedover between scenarios - - Bug: Players should not be able to pass outside of their turn. Validate play: play.player == game.current_player - Replace publicly displayed emails with usernames +- Review attributions and license compliance + ## Proposed Schema Table @@ -114,3 +115,11 @@ Rails Composer is open source and supported by subscribers. Please join RailsApp License ------- + +Attributions +------------ + +## Felt subtle pattern + +Source: http://subtlepatterns.com/felt/ +Author: http://atle.co/ diff --git a/app/assets/javascripts/components/game.js.jsx b/app/assets/javascripts/components/game.js.jsx index 15a63a2..cc89e1e 100644 --- a/app/assets/javascripts/components/game.js.jsx +++ b/app/assets/javascripts/components/game.js.jsx @@ -89,31 +89,28 @@ var Game = React.createClass({ return
Loading...
; } return ( -
-
Title: {this.state.data.title}
-
Game Id: {this.state.data.id}
-
Current Player: {this.state.data.controlling_player_id}
-
Hand to beat: {this.state.data.play_to_beat_string}
-
- -
-
- {/* TODO: If not joinable, show why. i.e. game full*/ } - {this.state.data.is_joinable ? : null } - {/* TODO: If not startable, show why. i.e. need more players */} - {this.state.data.is_started ? null : } -
-
- {this.state.data.winner_player_id ? "Winner: " + this.state.data.winner_player_id : null} -
+
+

{this.state.data.title}

+ + {this.state.data.is_started + ? + null + : +
+ {/* TODO: If not joinable, show why. i.e. game full*/ } + {this.state.data.is_joinable ? : null } + {/* TODO: If not startable, show why. i.e. need more players */} +
+ {this.state.data.is_started ? null : } +
+
+ } + + + + {this.state.data.winner_player_id ? "Winner: " + this.state.data.winner_player_id : null}
); } diff --git a/app/assets/javascripts/components/inventory.js.jsx b/app/assets/javascripts/components/inventory.js.jsx index 4cd733a..f5ef9bb 100644 --- a/app/assets/javascripts/components/inventory.js.jsx +++ b/app/assets/javascripts/components/inventory.js.jsx @@ -12,9 +12,9 @@ var Inventory = React.createClass({ render: function() { if (this.props.cards) { return ( -