1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00
chess/lib/chess_web/templates/game/index.html.eex
Dan Barber bedd6605ef
Redesign whole site in B&W
* Forms and board tweaks for small screen sizes
* Re-style game status indicators
* Re-style viewing/offline indicator
* Better eyecons 👁
* Re-organise CSS according to ITCSS principles
* Pick new font from Google Fonts
* Fix up tests
* Move some things into partials
2018-09-16 14:02:52 -04:00

38 lines
1.1 KiB
Elixir

<h2><%= gettext "Listing games" %></h2>
<table class="games-list">
<tbody>
<%= for game <- @games do %>
<tr class="<%= turn_class(@conn, game) %>">
<td>
<span class="games-list__player-indicator">
<img src="images/pawn_<%= player_colour(@conn, game) %>.svg">
</span>
<%= link gettext(
"Game with %{name}",
name: opponent(game, current_user(@conn).id).name
),
to: game_path(@conn, :show, game),
class: "btn btn-default btn-xs" %>
</td>
<td>
<%= state(@conn, game) %>
</td>
<td>
<%= won_lost(@conn, game) %>
</td>
<td class="text-right">
<%= link gettext("Delete"),
to: game_path(@conn, :delete, game),
method: :delete,
data: [confirm: gettext("Are you sure?")] %>
</td>
</tr>
<% end %>
</tbody>
</table>
<p>
<%= link gettext("New game"), to: game_path(@conn, :new), class: "button" %>
</p>