align items

master
Lilian BRETON 2 years ago
parent 6d1bbdff48
commit 1c9db4691a

@ -5,9 +5,14 @@
<h3>Inventory</h3> <h3>Inventory</h3>
<p>
<b>CurrentCulture</b>: @CultureInfo.CurrentCulture
</p>
<div class="body">
<div class="align-start">
<div class="inventory-items"> <div class="inventory-items">
<InventoryItem Index="0" Item=@itemsInventory.ElementAt(0)/> <InventoryItem Index="0" />
<InventoryItem Index="1" /> <InventoryItem Index="1" />
<InventoryItem Index="2" /> <InventoryItem Index="2" />
<InventoryItem Index="3" /> <InventoryItem Index="3" />
@ -26,19 +31,17 @@
<InventoryItem Index="16" /> <InventoryItem Index="16" />
<InventoryItem Index="17" /> <InventoryItem Index="17" />
</div> </div>
</div>
<div class="css-grid"> <div class="css-grid">
@foreach (var item in itemsInventory) @*@foreach (var item in itemsInventory)
{ {
<CraftingItem Item="item" NoDrop="true" /> <CraftingItem Item="item" NoDrop="true" />
} }*@
<p>
<b>CurrentCulture</b>: @CultureInfo.CurrentCulture
</p>
</div> </div>
<div id="ItemList"> <div id="ItemList" class="align-end">
<div> <div>
<p> <p>
List of items List of items
@ -48,7 +51,7 @@
</div> </div>
<DataGrid TItem="Item" <DataGrid TItem="Item"
Data="@items" Data="@itemsInventory"
ReadData="@OnReadData" ReadData="@OnReadData"
TotalItems="@totalItem" TotalItems="@totalItem"
PageSize="10" PageSize="10"
@ -70,3 +73,4 @@
</DataGridColumn> </DataGridColumn>
</DataGrid> </DataGrid>
</div> </div>
</div>

@ -1,6 +1,21 @@
.inventory-items { .body {
display: flex;
}
.inventory-items {
grid-template-columns: repeat(6,minmax(0,1fr)); grid-template-columns: repeat(6,minmax(0,1fr));
gap: 10px; gap: 10px;
display: grid; display: grid;
width: 40%; width: 40%;
} }
.align-start {
align-items: flex-start;
justify-content: start
}
.align-end {
align-content: flex-end;
justify-content: end;
width: 400px;
}
Loading…
Cancel
Save