diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-10-13 10:31:45 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-10-13 10:31:45 -0400 |
commit | cb6eebdf05c95f15ad6ce8968838772a2b915755 (patch) | |
tree | 608fddb105ea5787cdbd7ccaa2d690f5846d74ef /app/helpers | |
parent | a1a5cb52277d45be323528159addab7971e585a5 (diff) | |
download | pokeviewer-cb6eebdf05c95f15ad6ce8968838772a2b915755.tar.gz pokeviewer-cb6eebdf05c95f15ad6ce8968838772a2b915755.tar.bz2 pokeviewer-cb6eebdf05c95f15ad6ce8968838772a2b915755.zip |
Added sheen to Pokémon contest stats
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/pokeviewer/pokemon_helper.rb | 34 |
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 |