about summary refs log tree commit diff stats
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/pokeviewer/pokemon_helper.rb34
1 files changed, 33 insertions, 1 deletions
diff --git a/app/helpers/pokeviewer/pokemon_helper.rb b/app/helpers/pokeviewer/pokemon_helper.rb index 9524914..e1c7223 100644 --- a/app/helpers/pokeviewer/pokemon_helper.rb +++ b/app/helpers/pokeviewer/pokemon_helper.rb
@@ -81,8 +81,40 @@ module Pokeviewer
81 points: points.map { |point| point * "," } * " ", 81 points: points.map { |point| point * "," } * " ",
82 class: "pkcv-data") 82 class: "pkcv-data")
83 83
84 svg.rect(
85 x: -40,
86 y: 460,
87 rx: 10,
88 ry: 10,
89 width: 490,
90 height: 60,
91 class: "pkcv-sheen-bg")
92
93 if revision.sheen > 0
94 svg.rect(
95 x: -37,
96 y: 460,
97 width: revision.sheen * 490 / 10 - 6,
98 height: 60,
99 class: "pkcv-sheen-data")
100 end
101
102 svg.rect(
103 x: -40,
104 y: 460,
105 rx: 10,
106 ry: 10,
107 width: 490,
108 height: 60,
109 class: "pkcv-sheen-border")
110
111 svg.text("SHEEN",
112 x: -20,
113 y: 500,
114 class: "pkcv-sheen-label")
115
84 tag.svg(svg.to_s.html_safe, 116 tag.svg(svg.to_s.html_safe,
85 viewBox: "-80 -30 570 430", 117 viewBox: "-80 -30 570 560",
86 width: "100%", 118 width: "100%",
87 class: "pokemon-condition") 119 class: "pokemon-condition")
88 end 120 end