Improve style
This commit is contained in:
parent
175bb04d31
commit
5e3cd7b8ce
@ -40,7 +40,7 @@ h1
|
||||
|
||||
header
|
||||
font-size: 3vmin
|
||||
margin-bottom: 10vmin
|
||||
// margin-bottom: 10vmin
|
||||
nav
|
||||
padding: 1vmin
|
||||
background: #222
|
||||
|
||||
@ -8,16 +8,12 @@
|
||||
- unless current_user.soft_token == @game.controlling_player.try("soft_token")
|
||||
= javascript_include_tag 'table-loader'
|
||||
|
||||
%h1= @table.title
|
||||
%p= @table.title
|
||||
|
||||
- if @game.startable? && @game.already_has?(current_user)
|
||||
= button_to 'Start', start_game_path(@game)
|
||||
|
||||
-#.debug
|
||||
= button_to 'Debug Start', game_start_path(@game), method: :get
|
||||
= link_to 'Edit Game', edit_game_path(@game)
|
||||
|
||||
.players
|
||||
-# .players
|
||||
%b Players:
|
||||
%ol
|
||||
- @game.players.each do |player|
|
||||
@ -25,28 +21,18 @@
|
||||
= player.display_name
|
||||
// Show the user which player they are
|
||||
= "Me" if player.soft_token == current_user.soft_token
|
||||
|
||||
// Show whose turn it is
|
||||
- if @game.controlling_player_id
|
||||
%strong= "Taking Turn " if @game.controlling_player == player
|
||||
|
||||
// Show the players' cards
|
||||
- if player.user == current_user && player.inventory.empty? == false
|
||||
-##inventory
|
||||
|
||||
%p
|
||||
%b Game:
|
||||
= @game.title
|
||||
|
||||
%p
|
||||
= @game.status
|
||||
|
||||
|
||||
-# TODO better logic, not in view
|
||||
- unless @game.status == nil
|
||||
.table
|
||||
-# TODO better logic, not in view. Set play to beat = nil; instead of view logic
|
||||
- if @game.play_to_beat && @game.player_to_beat != @game.controlling_player
|
||||
-# - if @game.play_to_beat && @game.player_to_beat != @game.controlling_player
|
||||
- if @game.play_to_beat.play
|
||||
%h1
|
||||
Hand to beat
|
||||
@ -55,7 +41,7 @@
|
||||
- @game.play_to_beat.play.player_cards.each do |card|
|
||||
= card.to_s
|
||||
%span.player= @game.play_to_beat.play.player.display_name
|
||||
- else
|
||||
-# - else
|
||||
%h1 Open table
|
||||
|
||||
#game-component
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user