Counter and FecthData delete, changing the home page

master
Dorian HODIN 2 years ago
parent 6a4f2db396
commit b8d938ec72

Binary file not shown.

@ -1,11 +1,14 @@
<CascadingBlazoredModal>
<Router AppAssembly="@typeof(App).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<p role="alert">Sorry, there's nothing at this address.</p>
<LayoutView Layout="@typeof(MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
</CascadingBlazoredModal>

@ -1,13 +0,0 @@
namespace ProjetBlazor.Data
{
public class WeatherForecast
{
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
public string? Summary { get; set; }
}
}

@ -1,20 +0,0 @@
namespace ProjetBlazor.Data
{
public class WeatherForecastService
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
public Task<WeatherForecast[]> GetForecastAsync(DateTime startDate)
{
return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = startDate.AddDays(index),
TemperatureC = Random.Shared.Next(-20, 55),
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
}).ToArray());
}
}
}

@ -1,20 +1,19 @@
@using System.Globalization
@using Blazorise
@using Components
@using ProjetBlazor.Components
@page "/"
<PageTitle>Index</PageTitle>
<h1>Hello, world!</h1>
<h1>Hello world!</h1>
Welcome to your new app.
<SurveyPrompt Title="How is Blazor working for you?" />
Bienvenue sur ce site representant les différents TP de Blazor.
<p>
<b>CurrentCulture</b>: @CultureInfo.CurrentCulture
<b>Langue Actuelle :</b>: @CultureInfo.CurrentCulture
</p>
<div>
<Crafting Items="Items" Recipes="Recipes" />
</div>

@ -3,7 +3,7 @@
<p>
<label>
Select your locale:
Select your language:
<select @bind="Culture">
@foreach (var culture in supportedCultures)
{

@ -0,0 +1,23 @@
@inherits LayoutComponentBase
<PageTitle>ProjetBlazor</PageTitle>
<div class="page">
<div class="sidebar">
<NavMenu />
</div>
<main>
<div class="top-row px-4">
<a href="https://www.minecraft.net/fr-fr" target="_blank">Minecraft Website</a>
<div class="px-4">
<CultureSelector />
</div>
</div>
<article class="content px-4">
@Body
</article>
</main>
</div>

@ -0,0 +1,70 @@
.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;
}
}

File diff suppressed because one or more lines are too long

@ -64,6 +64,10 @@ build_metadata.AdditionalFiles.CssScope = b-c5pe2f0rgk
build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50c1xDcmFmdGluZ0l0ZW0ucmF6b3I=
build_metadata.AdditionalFiles.CssScope = b-au53a972a0
[C:/Users/Dorian/Documents/Blazor/Code/ProjetBlazor/Shared/MainLayout.razor]
build_metadata.AdditionalFiles.TargetPath = U2hhcmVkXE1haW5MYXlvdXQucmF6b3I=
build_metadata.AdditionalFiles.CssScope = b-6fq4tjte4h
[C:/Users/Dorian/Documents/Blazor/Code/ProjetBlazor/Shared/NavMenu.razor]
build_metadata.AdditionalFiles.TargetPath = U2hhcmVkXE5hdk1lbnUucmF6b3I=
build_metadata.AdditionalFiles.CssScope = b-kggv4tdhwh

@ -1 +1 @@
a6db260dd09fce3e1910e4b0025973704e2c951f
e8ebd628603808f91b55bbe2dea9540085b9d592

@ -67,7 +67,6 @@ C:\Users\Dorian\Documents\Blazor\Code\ProjetBlazor\obj\Debug\net6.0\staticwebass
C:\Users\Dorian\Documents\Blazor\Code\ProjetBlazor\obj\Debug\net6.0\staticwebassets.pack.json
C:\Users\Dorian\Documents\Blazor\Code\ProjetBlazor\obj\Debug\net6.0\staticwebassets.build.json
C:\Users\Dorian\Documents\Blazor\Code\ProjetBlazor\obj\Debug\net6.0\staticwebassets.development.json
C:\Users\Dorian\Documents\Blazor\Code\ProjetBlazor\obj\Debug\net6.0\scopedcss\Shared\MainLayout.razor.rz.scp.css
C:\Users\Dorian\Documents\Blazor\Code\ProjetBlazor\obj\Debug\net6.0\scopedcss\Shared\NavMenu.razor.rz.scp.css
C:\Users\Dorian\Documents\Blazor\Code\ProjetBlazor\obj\Debug\net6.0\scopedcss\bundle\ProjetBlazor.styles.css
C:\Users\Dorian\Documents\Blazor\Code\ProjetBlazor\obj\Debug\net6.0\scopedcss\projectbundle\ProjetBlazor.bundle.scp.css
@ -91,3 +90,4 @@ C:\Users\Dorian\Documents\Blazor\Code\ProjetBlazor\obj\Debug\net6.0\ProjetBlazor
C:\Users\Dorian\Documents\Blazor\Code\ProjetBlazor\obj\Debug\net6.0\fr-FR\ProjetBlazor.resources.dll
C:\Users\Dorian\Documents\Blazor\Code\ProjetBlazor\obj\Debug\net6.0\scopedcss\Components\Crafting.razor.rz.scp.css
C:\Users\Dorian\Documents\Blazor\Code\ProjetBlazor\obj\Debug\net6.0\scopedcss\Components\CraftingItem.razor.rz.scp.css
C:\Users\Dorian\Documents\Blazor\Code\ProjetBlazor\obj\Debug\net6.0\scopedcss\Shared\MainLayout.razor.rz.scp.css

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
{
"Version": 1,
"Hash": "a/XDG19R4UMCyCt38hxsXXwEOf4lm79LhUAWYOunxH4=",
"Hash": "OvJftrrldKFbkCCc/3cpv4qCbv9Nkn+jFa/lknXhSEU=",
"Source": "ProjetBlazor",
"BasePath": "_content/ProjetBlazor",
"Mode": "Default",
@ -1018,6 +1018,23 @@
"CopyToOutputDirectory": "Never",
"CopyToPublishDirectory": "PreserveNewest",
"OriginalItemSpec": "wwwroot\\images\\default.png"
},
{
"Identity": "C:\\Users\\Dorian\\Documents\\Blazor\\Code\\ProjetBlazor\\wwwroot\\images\\dognosis.png",
"SourceId": "ProjetBlazor",
"SourceType": "Discovered",
"ContentRoot": "C:\\Users\\Dorian\\Documents\\Blazor\\Code\\ProjetBlazor\\wwwroot\\",
"BasePath": "_content/ProjetBlazor",
"RelativePath": "images/dognosis.png",
"AssetKind": "All",
"AssetMode": "All",
"AssetRole": "Primary",
"RelatedAsset": "",
"AssetTraitName": "",
"AssetTraitValue": "",
"CopyToOutputDirectory": "Never",
"CopyToPublishDirectory": "PreserveNewest",
"OriginalItemSpec": "wwwroot\\images\\dognosis.png"
}
]
}

File diff suppressed because one or more lines are too long

@ -68,6 +68,10 @@
"Id": "C:\\Users\\Dorian\\Documents\\Blazor\\Code\\ProjetBlazor\\wwwroot\\images\\default.png",
"PackagePath": "staticwebassets\\images\\default.png"
},
{
"Id": "C:\\Users\\Dorian\\Documents\\Blazor\\Code\\ProjetBlazor\\wwwroot\\images\\dognosis.png",
"PackagePath": "staticwebassets\\images\\dognosis.png"
},
{
"Id": "obj\\Debug\\net6.0\\staticwebassets\\msbuild.ProjetBlazor.Microsoft.AspNetCore.StaticWebAssets.props",
"PackagePath": "build\\Microsoft.AspNetCore.StaticWebAssets.props"

@ -256,6 +256,22 @@
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<OriginalItemSpec>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\images\default.png))</OriginalItemSpec>
</StaticWebAsset>
<StaticWebAsset Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\images\dognosis.png))">
<SourceType>Package</SourceType>
<SourceId>ProjetBlazor</SourceId>
<ContentRoot>$(MSBuildThisFileDirectory)..\staticwebassets\</ContentRoot>
<BasePath>_content/ProjetBlazor</BasePath>
<RelativePath>images/dognosis.png</RelativePath>
<AssetKind>All</AssetKind>
<AssetMode>All</AssetMode>
<AssetRole>Primary</AssetRole>
<RelatedAsset></RelatedAsset>
<AssetTraitName></AssetTraitName>
<AssetTraitValue></AssetTraitValue>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<OriginalItemSpec>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\images\dognosis.png))</OriginalItemSpec>
</StaticWebAsset>
<StaticWebAsset Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\ProjetBlazor.bundle.scp.css))">
<SourceType>Package</SourceType>
<SourceId>ProjetBlazor</SourceId>

Loading…
Cancel
Save