about summary refs log tree commit diff stats
path: root/app/assets
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-09-29 18:36:57 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-09-29 18:36:57 -0400
commit6dff23b065bd933ff2f571d2264c86902173d40b (patch)
tree1b7853fce373897068d244cd2ae1487bf49cef6e /app/assets
parentdc4a4d2f9a338e3d3560c514b0c97cb8bfea36b1 (diff)
downloadpokeviewer-6dff23b065bd933ff2f571d2264c86902173d40b.tar.gz
pokeviewer-6dff23b065bd933ff2f571d2264c86902173d40b.tar.bz2
pokeviewer-6dff23b065bd933ff2f571d2264c86902173d40b.zip
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.
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/pokeviewer/pokemon.js.coffee12
-rw-r--r--app/assets/stylesheets/pokeviewer/pokemon.css.scss46
2 files changed, 36 insertions, 22 deletions
diff --git a/app/assets/javascripts/pokeviewer/pokemon.js.coffee b/app/assets/javascripts/pokeviewer/pokemon.js.coffee index f82f196..28a1ec1 100644 --- a/app/assets/javascripts/pokeviewer/pokemon.js.coffee +++ b/app/assets/javascripts/pokeviewer/pokemon.js.coffee
@@ -1,7 +1,7 @@
1$ -> 1$ ->
2 $(".pc-pokemon").mouseover -> 2 $(".pkv-has-hover").mouseover ->
3 $(this).children(".pc-data").show() 3 $(this).children(".pkv-hover").show()
4 $(".pc-pokemon").mouseout -> 4 $(".pkv-has-hover").mouseout ->
5 $(this).children(".pc-data").hide() 5 $(this).children(".pkv-hover").hide()
6 $(".pc-pokemon").mousemove (event) -> 6 $(".pkv-has-hover").mousemove (event) ->
7 $(this).children(".pc-data").offset({left: event.pageX + 16, top: event.pageY - 16}) 7 $(this).children(".pkv-hover").offset({left: event.pageX + 16, top: event.pageY - 16})
diff --git a/app/assets/stylesheets/pokeviewer/pokemon.css.scss b/app/assets/stylesheets/pokeviewer/pokemon.css.scss index 2a75730..f44b499 100644 --- a/app/assets/stylesheets/pokeviewer/pokemon.css.scss +++ b/app/assets/stylesheets/pokeviewer/pokemon.css.scss
@@ -152,21 +152,19 @@ body {
152 } 152 }
153} 153}
154 154
155.pc-pokemon { 155.pkv-hover {
156 .pc-data { 156 display: none;
157 display: none; 157 background-color: #111;
158 background-color: #111; 158 color: #fff;
159 color: #fff; 159 z-index: 1;
160 z-index: 1; 160 padding: .5em;
161 padding: .5em; 161 box-shadow: 0px 0px 2px 1px #B3B3B3;
162 box-shadow: 0px 0px 2px 1px #B3B3B3; 162 border-radius: 4px;
163 border-radius: 4px; 163 position: absolute;
164 position: absolute; 164
165 165 .pc-data-name {
166 .pc-data-name { 166 font-weight: bold;
167 font-weight: bold; 167 white-space: pre;
168 white-space: pre;
169 }
170 } 168 }
171} 169}
172 170
@@ -203,7 +201,6 @@ body {
203 201
204 .pd-details { 202 .pd-details {
205 color: white; 203 color: white;
206 font-size: bold;
207 padding: .25em .5em; 204 padding: .25em .5em;
208 } 205 }
209 206
@@ -355,4 +352,21 @@ body {
355 stroke-linejoin: butt; 352 stroke-linejoin: butt;
356 } 353 }
357 } 354 }
355
356 .pokemon-ribbons {
357 .pd-details {
358 background-color: #ffc8c8;
359 }
360
361 ul {
362 display: flex;
363 flex-wrap: wrap;
364 padding: 0;
365 margin: 0.5em;
366
367 li {
368 display: block;
369 }
370 }
371 }
358} 372}