Improve style

This commit is contained in:
Jesse C. Fisher 2019-10-26 05:20:15 -07:00
parent f82590d31f
commit 0e45a8d621
2 changed files with 5 additions and 19 deletions

View File

@ -40,7 +40,7 @@ h1
header header
font-size: 3vmin font-size: 3vmin
margin-bottom: 10vmin // margin-bottom: 10vmin
nav nav
padding: 1vmin padding: 1vmin
background: #222 background: #222

View File

@ -8,16 +8,12 @@
- unless current_user.soft_token == @game.controlling_player.try("soft_token") - unless current_user.soft_token == @game.controlling_player.try("soft_token")
= javascript_include_tag 'table-loader' = javascript_include_tag 'table-loader'
%h1= @table.title %p= @table.title
- if @game.startable? && @game.already_has?(current_user) - if @game.startable? && @game.already_has?(current_user)
= button_to 'Start', start_game_path(@game) = button_to 'Start', start_game_path(@game)
-#.debug -# .players
= button_to 'Debug Start', game_start_path(@game), method: :get
= link_to 'Edit Game', edit_game_path(@game)
.players
%b Players: %b Players:
%ol %ol
- @game.players.each do |player| - @game.players.each do |player|
@ -25,28 +21,18 @@
= player.display_name = player.display_name
// Show the user which player they are // Show the user which player they are
= "Me" if player.soft_token == current_user.soft_token = "Me" if player.soft_token == current_user.soft_token
// Show whose turn it is // Show whose turn it is
- if @game.controlling_player_id - if @game.controlling_player_id
%strong= "Taking Turn " if @game.controlling_player == player %strong= "Taking Turn " if @game.controlling_player == player
// Show the players' cards // Show the players' cards
- if player.user == current_user && player.inventory.empty? == false - if player.user == current_user && player.inventory.empty? == false
-##inventory -##inventory
%p
%b Game:
= @game.title
%p
= @game.status
-# TODO better logic, not in view -# TODO better logic, not in view
- unless @game.status == nil - unless @game.status == nil
.table .table
-# TODO better logic, not in view. Set play to beat = nil; instead of view logic -# 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 - if @game.play_to_beat.play
%h1 %h1
Hand to beat Hand to beat
@ -55,7 +41,7 @@
- @game.play_to_beat.play.player_cards.each do |card| - @game.play_to_beat.play.player_cards.each do |card|
= card.to_s = card.to_s
%span.player= @game.play_to_beat.play.player.display_name %span.player= @game.play_to_beat.play.player.display_name
- else -# - else
%h1 Open table %h1 Open table
#game-component #game-component