diff --git a/Portfolio.WebUI.Server/Components/Component/PokemonCard.razor b/Portfolio.WebUI.Server/Components/Component/PokemonCard.razor index 58b8ef3..c5f73cc 100644 --- a/Portfolio.WebUI.Server/Components/Component/PokemonCard.razor +++ b/Portfolio.WebUI.Server/Components/Component/PokemonCard.razor @@ -1,72 +1,40 @@ -
+@attribute [StreamRendering] +@rendermode InteractiveServer -
-
- @if (_pokemon.IsVariation) - { -
-

@_pokemon.VariationName @_pokemon.PokemonName

-
-
-

Pokédex #@_pokemon.PokemonId

-
- } - else - { -
-

@_pokemon.PokemonName

-
-
-

Pokédex #@_pokemon.PokemonId

-
- } +
+ +
+ @if (_pokemon.IsVariation) + { +

@_pokemon.VariationName @_pokemon.PokemonName

+ } + else + { +

@_pokemon.PokemonName

+ } +
+

Pokédex #@_pokemon.PokemonId

- -
+ +
- - + +
+
+

[ Pokemon Flavor Text Placeholder ]

+
+ +
-
-
-

@_pokemon.SleepType

-

@_pokemon.Speciality

-
+
+

@_pokemon.SleepType

+

@_pokemon.Speciality

- -@code { - - [Parameter] - public Pokemon Pokemon { get; set; } - - private Pokemon _pokemon { get; set; } - - private bool isShiny = false; - - protected override void OnParametersSet() - { - if(Pokemon != null) - { - _pokemon = Pokemon; - - } - } - - private void ToggleImage() - { - isShiny = !isShiny; - StateHasChanged(); - } - - - - -} diff --git a/Portfolio.WebUI.Server/Components/Component/PokemonCard.razor.cs b/Portfolio.WebUI.Server/Components/Component/PokemonCard.razor.cs new file mode 100644 index 0000000..f20140b --- /dev/null +++ b/Portfolio.WebUI.Server/Components/Component/PokemonCard.razor.cs @@ -0,0 +1,30 @@ +using Microsoft.AspNetCore.Components; +using Portfolio.Domain.Features.Pokemon; + +namespace Portfolio.WebUI.Server.Components.Component +{ + public partial class PokemonCard + { + [Parameter] + public Pokemon Pokemon { get; set; } + + private Pokemon _pokemon { get; set; } + + private bool isShiny = false; + + protected override void OnParametersSet() + { + if (Pokemon != null) + { + _pokemon = Pokemon; + + } + } + + private void ToggleImage() + { + isShiny = !isShiny; + StateHasChanged(); + } + } +} diff --git a/Portfolio.WebUI.Server/Components/Component/PokemonCard.razor.css b/Portfolio.WebUI.Server/Components/Component/PokemonCard.razor.css index 5f40610..3ff2b26 100644 --- a/Portfolio.WebUI.Server/Components/Component/PokemonCard.razor.css +++ b/Portfolio.WebUI.Server/Components/Component/PokemonCard.razor.css @@ -1,9 +1,60 @@ - +.pokemon-card { + position: relative; + width: 24rem; + height: 32rem; + max-width: 24rem; + max-height: 32rem; + border-radius: 5% / 3.5%; +} + +.pokemon-name { + position: absolute; + top: 0 !important; + left: 0 !important; + margin-top: 1.5rem !important; + margin-left: 0.5rem !important; + transform: translateY(-50%) !important; + font-size: 2.5rem; +} + +.pokemon-number { + position: absolute; + top: 0 !important; + left: 0 !important; + margin-top: 3rem !important; + margin-left: 1.5rem !important; + transform: translateY(-50%) !important; + font-size: .75rem; +} + +.pokemon-image { + width: 100%; /* Look to flip-container for the width/height of image */ + height: 100%; + position: absolute; + top: 0; + left: 0; +} + +.pokemon-flavor-text { + position: absolute; + top: 60% !important; + left: 50% !important; + width: 90%; + height: 20%; + padding: 0.5rem; + margin-top: 3rem !important; + transform: translateX(-50%) !important; +} + .flip-container { + position: absolute !important; + top: 40% !important; + left: 50% !important; + transform: translate(-50%, -50%) !important; perspective: 1000px; display: inline-block; - width: 100%; - height: 100%; + width: 20rem; + height: 20rem; cursor: pointer; } @@ -19,6 +70,7 @@ transform: rotateY(180deg); } + .front, .back { width: 100%; height: 100%; @@ -45,7 +97,7 @@ top: 50%; left: 50%; transform: translate(-50%, -50%); - font-size: 13px; + font-size: .8rem; } .dozing { diff --git a/Portfolio.WebUI.Server/Components/Pages/PokemonEdit.razor b/Portfolio.WebUI.Server/Components/Pages/PokemonEdit.razor index f59a242..8cb4507 100644 --- a/Portfolio.WebUI.Server/Components/Pages/PokemonEdit.razor +++ b/Portfolio.WebUI.Server/Components/Pages/PokemonEdit.razor @@ -31,7 +31,7 @@ else
# - +
diff --git a/Portfolio.WebUI.Server/Components/Pages/PokemonRate.razor b/Portfolio.WebUI.Server/Components/Pages/PokemonRate.razor index 3c4541e..12cb33c 100644 --- a/Portfolio.WebUI.Server/Components/Pages/PokemonRate.razor +++ b/Portfolio.WebUI.Server/Components/Pages/PokemonRate.razor @@ -18,28 +18,31 @@ } else { -
+ +
-
+ +
-
+

Pokémon Rater

-
- -
-
+ +
+ +
+ - @if(SelectedPokemon != null) - { -
+
+ +
+
+ + + @if (SelectedPokemon != null) + { +
+ +
+
+ +
+
+ + +

Select Nature & Subskills

-
-
+
+
- @foreach (var nature in NatureList) { @@ -82,81 +96,90 @@ else
- -
- -
- - -
- -
- - -
- -
- - -
-
-
- -
- - -
- -
- - -
-
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +

+ @FinalScore +

+
+
- } - -
- @if(SelectedPokemon != null) - { -
-
- -

Final Score: @FinalScore

-
} -
} diff --git a/Portfolio.WebUI.Server/Components/Pages/PokemonRate.razor.css b/Portfolio.WebUI.Server/Components/Pages/PokemonRate.razor.css index bc759f1..a8abed4 100644 --- a/Portfolio.WebUI.Server/Components/Pages/PokemonRate.razor.css +++ b/Portfolio.WebUI.Server/Components/Pages/PokemonRate.razor.css @@ -6,6 +6,10 @@ } +.pokemon-search { + width: 95%; +} + .flip-container { perspective: 1000px; display: inline-block; @@ -80,8 +84,6 @@ } .finalScore { - width: 30px; - height: 30px; color: white; padding: 4px 8px; text-align: center;