From 6dff23b065bd933ff2f571d2264c86902173d40b Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 29 Sep 2017 18:36:57 -0400 Subject: Added ribbons Gift ribbons currently partially work: the correct ribbon image and name is shown, but the ribbon description is not yet extracted from the game and thus is just blank. --- app/views/pokeviewer/pokemon/index.html.haml | 8 ++++---- app/views/pokeviewer/pokemon/show.html.haml | 13 ++++++++++++- 2 files changed, 16 insertions(+), 5 deletions(-) (limited to 'app/views') diff --git a/app/views/pokeviewer/pokemon/index.html.haml b/app/views/pokeviewer/pokemon/index.html.haml index 7cee27a..f16f0bc 100644 --- a/app/views/pokeviewer/pokemon/index.html.haml +++ b/app/views/pokeviewer/pokemon/index.html.haml @@ -17,12 +17,12 @@ - box.contents.each_slice(6) do |row| %tr - row.each do |p| - %td.pc-pokemon + %td.pc-pokemon.pkv-has-hover - if p.nil? .spacer - else = link_to image_tag(p.icon_path), p - .pc-data + .pc-data.pkv-hover .pc-data-name= p.revisions.last.nickname .pc-data-ot OT/ @@ -33,9 +33,9 @@ %h2 Pokémon Not In Any Game %ul.pokemon-list - @unaccounted.each do |p| - %li.pc-pokemon + %li.pc-pokemon.pkv-has-hover = link_to image_tag(p.icon_path), p - .pc-data + .pc-data.pkv-hover .pc-data-name= p.revisions.last.nickname .pc-data-ot OT/ diff --git a/app/views/pokeviewer/pokemon/show.html.haml b/app/views/pokeviewer/pokemon/show.html.haml index 3a04914..e90148e 100644 --- a/app/views/pokeviewer/pokemon/show.html.haml +++ b/app/views/pokeviewer/pokemon/show.html.haml @@ -76,4 +76,15 @@ %span.pokemon-nature<= @pokemon.nature.titlecase nature. %p= @pokemon.display_met - = condition_diagram @pokemon.revisions.last + .pokemon-contest + .pd-details Contest Condition + = condition_diagram @pokemon.revisions.last + .pokemon-ribbons + .pd-details Ribbons + %ul + - @pokemon.revisions.last.ribbons.each do |ribbon| + %li.pkv-has-hover + = image_tag("pokeviewer/ribbons/#{ribbon[:filename]}") + .pkv-hover + .pc-data-name= ribbon[:name] + = ribbon[:description] -- cgit 1.4.1