https://codefirst.iut.uca.fr/documentation/julien.riboulet/docusaurus/Blazor/add-item/local-storage/pull/3/head
parent
ce2799ee91
commit
466f77e644
@ -0,0 +1,3 @@
|
|||||||
|
@page "/admin"
|
||||||
|
|
||||||
|
<h3>Index</h3>
|
@ -0,0 +1,2 @@
|
|||||||
|
@page "/admin/users"
|
||||||
|
<h3>Users</h3>
|
@ -0,0 +1 @@
|
|||||||
|
@layout AdminLayout
|
@ -0,0 +1,41 @@
|
|||||||
|
@page "/list"
|
||||||
|
@using Models
|
||||||
|
|
||||||
|
<h3>List</h3>
|
||||||
|
|
||||||
|
@if (items != null)
|
||||||
|
{
|
||||||
|
<!---->
|
||||||
|
<!---->
|
||||||
|
<!---->
|
||||||
|
<DataGrid TItem="Item"
|
||||||
|
Data="@items"
|
||||||
|
PageSize="10"
|
||||||
|
ReadData="@OnReadData"
|
||||||
|
TotalItems="@totalItems"
|
||||||
|
ShowPager
|
||||||
|
Responsive>
|
||||||
|
|
||||||
|
<DataGridColumn TItem="Item" Field="@nameof(Item.Id)" Caption="#" />
|
||||||
|
<DataGridColumn TItem="Item" Field="@nameof(Item.DisplayName)" Caption="Displaye name" />
|
||||||
|
<DataGridColumn TItem="Item" Field="@nameof(Item.StackSize)" Caption="Stack size" />
|
||||||
|
<DataGridColumn TItem="Item" Field="@nameof(Item.MaxDurability)" Caption="Max durability" />
|
||||||
|
<DataGridColumn TItem="Item" Field="@nameof(Item.EnchantCategories)" Caption="Enchant categories">
|
||||||
|
<DisplayTemplate>
|
||||||
|
@(string.Join(", ", ((Item)context).EnchantCategories))
|
||||||
|
</DisplayTemplate>
|
||||||
|
</DataGridColumn>
|
||||||
|
<DataGridColumn TItem="Item" Field="@nameof(Item.RepairWith)" Caption="Repair with">
|
||||||
|
<DisplayTemplate>
|
||||||
|
@(string.Join(", ", ((Item)context).RepairWith))
|
||||||
|
</DisplayTemplate>
|
||||||
|
</DataGridColumn>
|
||||||
|
<DataGridColumn TItem="Item"
|
||||||
|
Field="@nameof(Item.CreatedDate)"
|
||||||
|
Caption="Created on"
|
||||||
|
DisplayFormat="{0:d}"
|
||||||
|
DisplayFormatProvider="@System.Globalization.CultureInfo.GetCultureInfo("fr-FR")" />
|
||||||
|
|
||||||
|
</DataGrid>
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
@inherits LayoutComponentBase
|
||||||
|
|
||||||
|
|
||||||
|
<header><h1>Welcome to admin</h1></header>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<a href="/admin">home</a>
|
||||||
|
<a href="/admin/users">users</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<main role="main" class="pb-3">
|
||||||
|
@Body
|
||||||
|
</main>
|
||||||
|
</div>
|
@ -1,19 +1,15 @@
|
|||||||
@inherits LayoutComponentBase
|
@inherits LayoutComponentBase
|
||||||
|
|
||||||
<PageTitle>blazor_lab</PageTitle>
|
<header><h1>blabla topic stuff</h1></header>
|
||||||
|
|
||||||
<div class="page">
|
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<NavMenu/>
|
<NavMenu/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<main>
|
<div class="container">
|
||||||
<div class="top-row px-4">
|
<main role="main" class="pb-3">
|
||||||
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<article class="content px-4">
|
|
||||||
@Body
|
@Body
|
||||||
</article>
|
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<footer>blabla trademark stuff</footer>
|
@ -1,70 +0,0 @@
|
|||||||
.page {
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
main {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar {
|
|
||||||
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-row {
|
|
||||||
background-color: #f7f7f7;
|
|
||||||
border-bottom: 1px solid #d6d5d5;
|
|
||||||
justify-content: flex-end;
|
|
||||||
height: 3.5rem;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-row ::deep a, .top-row .btn-link {
|
|
||||||
white-space: nowrap;
|
|
||||||
margin-left: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-row a:first-child {
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 640.98px) {
|
|
||||||
.top-row:not(.auth) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-row.auth {
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-row a, .top-row .btn-link {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 641px) {
|
|
||||||
.page {
|
|
||||||
flex-direction: row;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar {
|
|
||||||
width: 250px;
|
|
||||||
height: 100vh;
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-row {
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-row, article {
|
|
||||||
padding-left: 2rem !important;
|
|
||||||
padding-right: 1.5rem !important;
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,217 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"displayname": "Rodemco",
|
||||||
|
"name": "rodemco",
|
||||||
|
"stacksize": 22,
|
||||||
|
"maxdurability": 69,
|
||||||
|
"enchantcategories": [
|
||||||
|
"armor_chest",
|
||||||
|
"vanishable",
|
||||||
|
"weapon"
|
||||||
|
],
|
||||||
|
"repairwith": [],
|
||||||
|
"createddate": "2016-03-23",
|
||||||
|
"updateddate": "2014-06-06"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"displayname": "Candecor",
|
||||||
|
"name": "candecor",
|
||||||
|
"stacksize": 63,
|
||||||
|
"maxdurability": 109,
|
||||||
|
"enchantcategories": [
|
||||||
|
"digger"
|
||||||
|
],
|
||||||
|
"repairwith": [
|
||||||
|
"oak_planks"
|
||||||
|
],
|
||||||
|
"createddate": "2018-07-06",
|
||||||
|
"updateddate": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"displayname": "Cuizine",
|
||||||
|
"name": "cuizine",
|
||||||
|
"stacksize": 1,
|
||||||
|
"maxdurability": 23,
|
||||||
|
"enchantcategories": [
|
||||||
|
"weapon"
|
||||||
|
],
|
||||||
|
"repairwith": [],
|
||||||
|
"createddate": "2020-01-13",
|
||||||
|
"updateddate": "2016-01-20"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"displayname": "Bluplanet",
|
||||||
|
"name": "bluplanet",
|
||||||
|
"stacksize": 13,
|
||||||
|
"maxdurability": 95,
|
||||||
|
"enchantcategories": [],
|
||||||
|
"repairwith": [
|
||||||
|
"dark_oak_planks",
|
||||||
|
"warped_planks"
|
||||||
|
],
|
||||||
|
"createddate": "2020-11-24",
|
||||||
|
"updateddate": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"displayname": "Neurocell",
|
||||||
|
"name": "neurocell",
|
||||||
|
"stacksize": 34,
|
||||||
|
"maxdurability": 35,
|
||||||
|
"enchantcategories": [
|
||||||
|
"armor_head",
|
||||||
|
"digger",
|
||||||
|
"breakable"
|
||||||
|
],
|
||||||
|
"repairwith": [
|
||||||
|
"crimson_planks",
|
||||||
|
"oak_planks"
|
||||||
|
],
|
||||||
|
"createddate": "2019-12-10",
|
||||||
|
"updateddate": "2017-05-09"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6,
|
||||||
|
"displayname": "Adornica",
|
||||||
|
"name": "adornica",
|
||||||
|
"stacksize": 7,
|
||||||
|
"maxdurability": 75,
|
||||||
|
"enchantcategories": [
|
||||||
|
"weapon"
|
||||||
|
],
|
||||||
|
"repairwith": [
|
||||||
|
"oak_planks"
|
||||||
|
],
|
||||||
|
"createddate": "2015-11-20",
|
||||||
|
"updateddate": "2022-01-16"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 7,
|
||||||
|
"displayname": "Magnina",
|
||||||
|
"name": "magnina",
|
||||||
|
"stacksize": 63,
|
||||||
|
"maxdurability": 117,
|
||||||
|
"enchantcategories": [],
|
||||||
|
"repairwith": [],
|
||||||
|
"createddate": "2014-08-27",
|
||||||
|
"updateddate": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 8,
|
||||||
|
"displayname": "Entroflex",
|
||||||
|
"name": "entroflex",
|
||||||
|
"stacksize": 38,
|
||||||
|
"maxdurability": 50,
|
||||||
|
"enchantcategories": [
|
||||||
|
"armor",
|
||||||
|
"digger",
|
||||||
|
"armor_head"
|
||||||
|
],
|
||||||
|
"repairwith": [
|
||||||
|
"crimson_planks",
|
||||||
|
"oak_planks"
|
||||||
|
],
|
||||||
|
"createddate": "2021-11-20",
|
||||||
|
"updateddate": "2017-06-29"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 9,
|
||||||
|
"displayname": "Comcur",
|
||||||
|
"name": "comcur",
|
||||||
|
"stacksize": 20,
|
||||||
|
"maxdurability": 13,
|
||||||
|
"enchantcategories": [],
|
||||||
|
"repairwith": [
|
||||||
|
"jungle_planks",
|
||||||
|
"birch_planks"
|
||||||
|
],
|
||||||
|
"createddate": "2014-06-24",
|
||||||
|
"updateddate": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10,
|
||||||
|
"displayname": "Quarx",
|
||||||
|
"name": "quarx",
|
||||||
|
"stacksize": 64,
|
||||||
|
"maxdurability": 79,
|
||||||
|
"enchantcategories": [],
|
||||||
|
"repairwith": [
|
||||||
|
"jungle_planks",
|
||||||
|
"spruce_planks"
|
||||||
|
],
|
||||||
|
"createddate": "2019-07-03",
|
||||||
|
"updateddate": "2018-09-30"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11,
|
||||||
|
"displayname": "Parcoe",
|
||||||
|
"name": "parcoe",
|
||||||
|
"stacksize": 26,
|
||||||
|
"maxdurability": 97,
|
||||||
|
"enchantcategories": [
|
||||||
|
"breakable",
|
||||||
|
"armor"
|
||||||
|
],
|
||||||
|
"repairwith": [
|
||||||
|
"crimson_planks"
|
||||||
|
],
|
||||||
|
"createddate": "2018-03-25",
|
||||||
|
"updateddate": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12,
|
||||||
|
"displayname": "Dogspa",
|
||||||
|
"name": "dogspa",
|
||||||
|
"stacksize": 45,
|
||||||
|
"maxdurability": 95,
|
||||||
|
"enchantcategories": [
|
||||||
|
"vanishable"
|
||||||
|
],
|
||||||
|
"repairwith": [],
|
||||||
|
"createddate": "2014-07-03",
|
||||||
|
"updateddate": "2021-12-29"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 13,
|
||||||
|
"displayname": "Buzzmaker",
|
||||||
|
"name": "buzzmaker",
|
||||||
|
"stacksize": 55,
|
||||||
|
"maxdurability": 85,
|
||||||
|
"enchantcategories": [],
|
||||||
|
"repairwith": [
|
||||||
|
"crimson_planks"
|
||||||
|
],
|
||||||
|
"createddate": "2015-06-23",
|
||||||
|
"updateddate": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 14,
|
||||||
|
"displayname": "Realysis",
|
||||||
|
"name": "realysis",
|
||||||
|
"stacksize": 52,
|
||||||
|
"maxdurability": 72,
|
||||||
|
"enchantcategories": [
|
||||||
|
"weapon"
|
||||||
|
],
|
||||||
|
"repairwith": [
|
||||||
|
"oak_planks"
|
||||||
|
],
|
||||||
|
"createddate": "2019-12-26",
|
||||||
|
"updateddate": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 15,
|
||||||
|
"displayname": "Decratex",
|
||||||
|
"name": "decratex",
|
||||||
|
"stacksize": 15,
|
||||||
|
"maxdurability": 101,
|
||||||
|
"enchantcategories": [],
|
||||||
|
"repairwith": [],
|
||||||
|
"createddate": "2017-06-20",
|
||||||
|
"updateddate": "2016-09-04"
|
||||||
|
}
|
||||||
|
]
|
Loading…
Reference in new issue