From 13f4f6ca06a216962f4c25fa0d6041945cfb3fb5 Mon Sep 17 00:00:00 2001 From: David Gay Date: Fri, 3 Nov 2023 01:27:49 -0400 Subject: Better trainer card --- app/views/users/show.html.erb | 49 ++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 22 deletions(-) (limited to 'app/views/users/show.html.erb') diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 4df3273..f11b01f 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,25 +1,30 @@ -
-

- TRAINER CARD - <%= @user.name || "???" %> -

-

ID No. <%= @user.id %>

- - <% if @user == current_user %> - <%= link_to "Edit trainer card", edit_user_url(@user) %> - <% end %> - - - -

<%= pluralize(@user.runs.count, "run") %>

+
+
+
+
TRAINER CARD
+
ID No. <%= @user.id %>
+
+
+

NAME: <%= @user.name || "???" %> +

POKéDEX: <%= @user.pokedex_captured_count %>

+

TIME: <%= distance_of_time_in_words_to_now(@user.created_at) %>

+
+ <% if @user == current_user %> +

<%= link_to "Edit trainer card", edit_user_url(@user) %>

+ <% end %> +
+
+
+

<%= pluralize(@user.runs.count, "run") %>

-

<%= link_to "Start a run", new_run_path %>

+

<%= link_to "Start a run", new_run_path %>

-
    - <% @user.runs.each do |run| %> -
  • <%= run.game.title %> - <%= link_to run.title, run_path(run) %>
  • - <% end %> -
+
    + <% @user.runs.each do |run| %> +
  • <%= run.game.title %> - <%= link_to run.title, run_path(run) %>
  • + <% end %> +
+
+
+ -- cgit v1.2.3