Skip to content

Commit

Permalink
Merge pull request #8 from funkyFangs/a-few-more-improvements
Browse files Browse the repository at this point in the history
A few more improvements
  • Loading branch information
funkyFangs authored Nov 2, 2024
2 parents c0b7a26 + c8223a6 commit c5ba17c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib/menu/tracker/sprites/Sprite.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts">
import type { Sprites } from '$lib/api/SpritesResource'
import { formatPokemonSpeciesName } from '$lib/api/PokemonSpeciesResource.js'
import { base } from '$app/paths'
export let sprites: Sprites
export let pokemon: string
Expand All @@ -15,11 +16,17 @@
$: normalAlt = isFemale
? `The sprite for female ${formatPokemonSpeciesName(pokemon)}`
: `The sprite for ${formatPokemonSpeciesName(pokemon)}`
function onError(event: Event) {
const target = event.target as HTMLImageElement
target.src = `${base}/assets/unknown.gif`
}
</script>

<div class="sprite-root">
<div class="sprite-container">
<img
on:error={onError}
id="shiny-{pokemon}-sprite"
class="sprite"
src={shinySprite}
Expand Down
4 changes: 4 additions & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@
font-size: 150%;
}
button.primary-button {
width: 100%;
}
main {
padding: calc(var(--top-bar-height) + var(--gap-length)) var(--gap-length);
margin: auto;
Expand Down
Binary file added static/assets/unknown.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c5ba17c

Please sign in to comment.