about summary refs log tree commit diff stats
path: root/app/views/pokemon
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/pokemon')
-rw-r--r--app/views/pokemon/_embed_code.html.haml1
-rw-r--r--app/views/pokemon/embed.html.haml17
-rw-r--r--app/views/pokemon/index.html.haml42
-rw-r--r--app/views/pokemon/show.html.haml4
4 files changed, 64 insertions, 0 deletions
diff --git a/app/views/pokemon/_embed_code.html.haml b/app/views/pokemon/_embed_code.html.haml new file mode 100644 index 0000000..6bbff69 --- /dev/null +++ b/app/views/pokemon/_embed_code.html.haml
@@ -0,0 +1 @@
%iframe{ src: embed_pokemon_url(@pokemon), frameborder: 0, width: 382, height: 298 } \ No newline at end of file
diff --git a/app/views/pokemon/embed.html.haml b/app/views/pokemon/embed.html.haml new file mode 100644 index 0000000..17fc7ba --- /dev/null +++ b/app/views/pokemon/embed.html.haml
@@ -0,0 +1,17 @@
1!!! 5
2%html
3 %head
4 %title Pokeviewer
5 %meta{ name: "viewport", content: "width=device-width,initial-scale=1" }
6 = stylesheet_link_tag "application", media: "all"
7 = javascript_include_tag "application"
8 = csrf_meta_tags
9 = csp_meta_tag
10 %body#pokemon-embed
11 %ul#pokemon-embed-tabs
12 %li.ptabe-button.ptabe-details= link_to "Details", "\#", data: {tab: "details"}
13 %li.ptabe-button.ptabe-stats= link_to "Stats", "\#", data: {tab: "stats"}
14 %li.ptabe-button.ptabe-moves= link_to "Moves", "\#", data: {tab: "moves"}
15 %li.ptabe-button.ptabe-contest= link_to "Contest", "\#", data: {tab: "contest"}
16 %li.ptabe-button.ptabe-ribbons= link_to "Ribbons", "\#", data: {tab: "ribbons"}
17 = render @revision
diff --git a/app/views/pokemon/index.html.haml b/app/views/pokemon/index.html.haml new file mode 100644 index 0000000..67ea2cf --- /dev/null +++ b/app/views/pokemon/index.html.haml
@@ -0,0 +1,42 @@
1- @trainers.each do |trainer, party, boxes|
2 .trainer
3 .trainer-info{ class: trainer.game }
4 %h2= trainer.name
5 %span.tid= trainer.display_number
6 .pc-boxes
7 %ul.party.pc-box
8 %h3 Party
9 - party.each do |p|
10 %li
11 %span.party-icon= image_tag p.current.icon_path
12 %span.party-name= link_to p.current.nickname, p
13 - boxes.each do |box|
14 .pc-box
15 %h3= box[:name]
16 %table.pc-contents
17 - box[:pokemon].each_slice(6) do |row|
18 %tr
19 - row.each do |p|
20 %td.pc-pokemon.pkv-has-hover
21 - if p.nil?
22 .spacer
23 - else
24 = link_to image_tag(p.current.icon_path), p
25 .pc-data.pkv-hover
26 .pc-data-name= p.current.nickname
27 .pc-data-ot
28 OT/
29 %span{ class: p.ot_gender }>= p.ot_name
30- if @unaccounted.any?
31 .trainer
32 .trainer-info.unaccounted
33 %h2 Pokémon Not In Any Game
34 %ul.pokemon-list
35 - @unaccounted.each do |p|
36 %li.pc-pokemon.pkv-has-hover
37 = link_to image_tag(p.current.icon_path), p
38 .pc-data.pkv-hover
39 .pc-data-name= p.current.nickname
40 .pc-data-ot
41 OT/
42 %span{ class: p.ot_gender }>= p.ot_name
diff --git a/app/views/pokemon/show.html.haml b/app/views/pokemon/show.html.haml new file mode 100644 index 0000000..cbd879b --- /dev/null +++ b/app/views/pokemon/show.html.haml
@@ -0,0 +1,4 @@
1= render @revision
2%details#pk-embed-code
3 %summary Embed code
4 %textarea{ readonly: true }= CGI.escapeHTML(render partial: "embed_code").html_safe