From 07dbbeb404dedcf9733262ae2ce9cdddc086bb0e Mon Sep 17 00:00:00 2001 From: nfoy Date: Sun, 27 Apr 2014 19:12:01 -0400 Subject: Tournament index now displays game images. Images must be named the exact name of the game and be of the .png format. --- app/assets/images/chess.png | Bin 0 -> 893 bytes app/assets/images/chess_icon.png | Bin 893 -> 0 bytes app/assets/images/league_icon.gif | Bin 8207 -> 0 bytes app/assets/images/league_of_legends.png | Bin 0 -> 10078 bytes app/views/common/_show_tournament.html.erb | 4 +++- app/views/users/show.html.erb | 2 +- 6 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 app/assets/images/chess.png delete mode 100644 app/assets/images/chess_icon.png delete mode 100644 app/assets/images/league_icon.gif create mode 100644 app/assets/images/league_of_legends.png diff --git a/app/assets/images/chess.png b/app/assets/images/chess.png new file mode 100644 index 0000000..6bcffe6 Binary files /dev/null and b/app/assets/images/chess.png differ diff --git a/app/assets/images/chess_icon.png b/app/assets/images/chess_icon.png deleted file mode 100644 index 6bcffe6..0000000 Binary files a/app/assets/images/chess_icon.png and /dev/null differ diff --git a/app/assets/images/league_icon.gif b/app/assets/images/league_icon.gif deleted file mode 100644 index 1f0fa43..0000000 Binary files a/app/assets/images/league_icon.gif and /dev/null differ diff --git a/app/assets/images/league_of_legends.png b/app/assets/images/league_of_legends.png new file mode 100644 index 0000000..9a78047 Binary files /dev/null and b/app/assets/images/league_of_legends.png differ diff --git a/app/views/common/_show_tournament.html.erb b/app/views/common/_show_tournament.html.erb index a9569b6..280d59d 100644 --- a/app/views/common/_show_tournament.html.erb +++ b/app/views/common/_show_tournament.html.erb @@ -1,5 +1,6 @@
-
<%= image_tag('http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(target.hosts.first.email) + '?s=100&d=mm', class: "t-image") %> +
+ <%= image_tag(target.game.name.downcase.tr(" ", "_") + ".png", class: "t-image") %>

<%= Game.find(target.game_id).name %>

@@ -8,6 +9,7 @@
Hosted by: <%= target.hosts.first.name %> + <%= image_tag('http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(target.hosts.first.email) + '?s=45&d=identicon', class: "t-image") %>

Players per team: <%= target.min_players_per_team %>

diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index a67aed9..b408589 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -2,7 +2,7 @@

<%= @user.user_name %>'s Profile

- <%= image_tag 'http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(@user.email) + '?s=100&d=mm' %> + <%= image_tag 'http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(@user.email) + '?s=100&d=identicon' %>

-- cgit v1.1-4-g5e80