101 lines
3.8 KiB
Plaintext
101 lines
3.8 KiB
Plaintext
@{
|
|
ViewData["Title"] = "Home Page";
|
|
}
|
|
|
|
@model PokemonSleepDto
|
|
<!--
|
|
<div class="text-center">
|
|
<h1 class="display-4">Welcome</h1>
|
|
<p>Learn about <a href="https://learn.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
|
|
<button>Add Pokemon</button>
|
|
</div>
|
|
<div style ="margin: auto; width: 600px; max-width: 50%; ">
|
|
<table class="table" style="text-align: center; border: 1px solid purple;">
|
|
<thead style="border-bottom: 1px solid purple;">
|
|
<tr>
|
|
<th scope="col" style="width: 50%;"></th>
|
|
<th scope="col">#</th>
|
|
<th scope="col">Pokemon</th>
|
|
<th scope="col">Sleep Type</th>
|
|
<th scope="col" style="padding-right: 30px;">Speciality</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var pokemon in Model.pokemonList)
|
|
{
|
|
string URL = "https://www.serebii.net/pokemonsleep/pokemon/" + pokemon.Id + ".png";
|
|
string ShinyURL = "https://www.serebii.net/pokemonsleep/pokemon/shiny/" + pokemon.Id + ".png";
|
|
|
|
<tr style=" text-align: center; margin:0; padding: 0; border-bottom: 1px solid purple;">
|
|
<td style="display: block; margin:0; padding: 0;">
|
|
<img style=" width: 90px; height: 90px; " src=@URL />
|
|
<img style=" width: 90px; height: 90px; " src=@ShinyURL />
|
|
</td>
|
|
<th scope="row">@pokemon.Id</th>
|
|
<td> @pokemon.Name</td>
|
|
<td>@pokemon.SleepType</td>
|
|
<td style="padding-right: 30px;">@pokemon.Speciality</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
-->
|
|
|
|
<div class="card shadow border-0 mt-4" style ="margin: auto; width: 900px; max-width: 60%; ">
|
|
<div class="card-header bg-secondary bg-gradient ml-0 py-3">
|
|
<div class="row">
|
|
<div class="col-12 text-center">
|
|
<h1 class="text-info">Available Pokemon</h1>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body p-4">
|
|
<div class="row pb-3">
|
|
<div class="col-6">
|
|
</div>
|
|
<div class="col-6 text-end">
|
|
<a asp-controller="Pokemon" asp-action="PokemonCreate" class="btn btn-outline-primary"><i class="bi bi-plus-square"></i> Add New Pokemon</a>
|
|
|
|
</div>
|
|
</div>
|
|
<table class="table">
|
|
<tr>
|
|
<th scope="col" style="width: 50%;"></th>
|
|
<th scope="col">#</th>
|
|
<th scope="col">Pokemon</th>
|
|
<th scope="col">Sleep Type</th>
|
|
<th scope="col" style="padding-right: 30px;">Speciality</th>
|
|
<th scope="col"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var pokemon in Model.pokemonList)
|
|
{
|
|
string URL = "https://www.serebii.net/pokemonsleep/pokemon/" + pokemon.Id + ".png";
|
|
string ShinyURL = "https://www.serebii.net/pokemonsleep/pokemon/shiny/" + pokemon.Id + ".png";
|
|
|
|
<tr style=" text-align: center; margin:0; padding: 0; border-bottom: 1px solid purple;">
|
|
<td style="display: block; margin:0; padding: 0;">
|
|
<img style=" width: 90px; height: 90px; " src=@URL />
|
|
<img style=" width: 90px; height: 90px; " src=@ShinyURL />
|
|
</td>
|
|
<th scope="row">@pokemon.Id</th>
|
|
<td> @pokemon.Name</td>
|
|
<td>@pokemon.SleepType</td>
|
|
<td style="padding-right: 30px;">@pokemon.Speciality</td>
|
|
<td>
|
|
<a asp-controller="Pokemon" asp-action="PokemonDelete" asp-route-Id="@pokemon.Id" class="btn btn-danger">
|
|
<i class="bi bi-trash"></i>
|
|
</a>
|
|
</td>
|
|
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|