Starting creation of Opening page

arthur_opening
Arthur VALIN 2 years ago
parent 6633055249
commit 41c947b0e2

@ -6,7 +6,7 @@
</Found> </Found>
<NotFound> <NotFound>
<CascadingAuthenticationState> <CascadingAuthenticationState>
<LayoutView Layout="@typeof(MainLayout)"> <LayoutView Layout="@typeof(CraftLayout)">
<p>Sorry, there's nothing at this address.</p> <p>Sorry, there's nothing at this address.</p>
</LayoutView> </LayoutView>
</CascadingAuthenticationState> </CascadingAuthenticationState>

@ -4,6 +4,14 @@ namespace CraftSharp.Factories
{ {
public static class ItemFactory public static class ItemFactory
{ {
public static Item GetRandomItem(Item[] items)
{
Random rnd = new Random();
int idx = rnd.Next(items.Count());
return items[idx];
}
public static ItemModel ToModel(Item item, byte[] imageContent) public static ItemModel ToModel(Item item, byte[] imageContent)
{ {
return new ItemModel return new ItemModel

@ -0,0 +1,3 @@
<h3>Opening</h3>

@ -0,0 +1,6 @@
namespace CraftSharp.Pages
{
public partial class Opening
{
}
}
Loading…
Cancel
Save