Добавил пару новых страниц
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<div class="text-center mx-auto mb-4 font-bold text-4xl md:text-5xl w-max justify-center italic">Поздравляем!</div>
|
||||
<img class="w-96 h-96 mx-auto" src="img/party-popper.svg" alt=""/>
|
||||
<div class="flex flex-col space-y-4 lg:flex-row lg:space-x-4 lg:space-y-0 mt-4">
|
||||
<a href="/otchislenie/statement" class="btn w-full lg:w-48 h-12 btn-primary rounded-full text-2xl">
|
||||
<a href="/otchislenie/result" class="btn w-full lg:w-48 h-12 btn-primary rounded-full text-2xl">
|
||||
Назад
|
||||
</a>
|
||||
<a href="/" class="btn w-full lg:w-48 h-12 btn-primary rounded-full text-2xl">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@page "/otchislenie/questionnaire"
|
||||
@using Otchinslator.Components.Layout
|
||||
@layout OtchislenieLayout
|
||||
<h3>questionnaire</h3>
|
||||
<a href="/otchislenie/statement">questionnaire</a>
|
||||
|
||||
@code {
|
||||
|
||||
|
||||
42
src/Otchinslator/Components/Pages/Result.razor
Normal file
42
src/Otchinslator/Components/Pages/Result.razor
Normal file
@@ -0,0 +1,42 @@
|
||||
@page "/otchislenie/result"
|
||||
@using Otchinslator.Components.Layout
|
||||
@layout OtchislenieLayout
|
||||
|
||||
<script>
|
||||
function showCongratulation() {
|
||||
document.getElementById('congratulation').classList.remove('hidden');
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="w-full">
|
||||
<div class="flex flex-col space-y-4 w-96 mx-auto">
|
||||
<div class="card rounded-badge bg-base-200 p-4">
|
||||
<div class="flex flex-col space-y-4 mt-1">
|
||||
<button class="btn h-16 btn-primary rounded-full text-2xl relative">
|
||||
Отправить директору
|
||||
</button>
|
||||
<button id="downloadPDF" onclick="showCongratulation()" class="btn h-16 btn-primary rounded-full text-2xl relative">
|
||||
Скачать PDF
|
||||
<div class="absolute bg-base-200 rounded-full right-1 w-14 h-14">
|
||||
<img class="p-3" src="img/pdf.svg" alt=""/>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@* TODO: Сделать адаптив *@
|
||||
@* <div class="mt-9 flex flex-col space-y-4 lg:flex-row lg:space-x-4 lg:space-y-0 w-96 mx-auto" > *@
|
||||
<div class="mt-9 flex flex-col space-y-4 w-96 mx-auto" >
|
||||
<a href="/otchislenie/statement" class="btn w-96 h-14 btn-primary rounded-full text-2xl">
|
||||
Назад
|
||||
</a>
|
||||
<a href="/" class="btn w-96 h-14 btn-primary rounded-full text-2xl">
|
||||
Выход
|
||||
</a>
|
||||
</div>
|
||||
<div class="w-96 mx-auto mt-6">
|
||||
<a id="congratulation" href="/otchislenie/congratulation" class="btn w-full h-16 btn-primary rounded-full text-2xl hidden">
|
||||
Страница поздравления
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,7 +1,7 @@
|
||||
@page "/otchislenie/statement"
|
||||
@using Otchinslator.Components.Layout
|
||||
@layout OtchislenieLayout
|
||||
<h3>Statement</h3>
|
||||
<a href="/otchislenie/result">Statement</a>
|
||||
|
||||
@code {
|
||||
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
@page "/weather"
|
||||
@attribute [StreamRendering]
|
||||
|
||||
<PageTitle>Weather</PageTitle>
|
||||
|
||||
<h1>Weather</h1>
|
||||
|
||||
<p>This component demonstrates showing data.</p>
|
||||
|
||||
@if (forecasts == null)
|
||||
{
|
||||
<p>
|
||||
<em>Loading...</em>
|
||||
</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Temp. (C)</th>
|
||||
<th>Temp. (F)</th>
|
||||
<th>Summary</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var forecast in forecasts)
|
||||
{
|
||||
<tr>
|
||||
<td>@forecast.Date.ToShortDateString()</td>
|
||||
<td>@forecast.TemperatureC</td>
|
||||
<td>@forecast.TemperatureF</td>
|
||||
<td>@forecast.Summary</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
|
||||
@code {
|
||||
private WeatherForecast[]? forecasts;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
// Simulate asynchronous loading to demonstrate streaming rendering
|
||||
await Task.Delay(500);
|
||||
|
||||
var startDate = DateOnly.FromDateTime(DateTime.Now);
|
||||
var summaries = new[] { "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" };
|
||||
forecasts = 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();
|
||||
}
|
||||
|
||||
private class WeatherForecast
|
||||
{
|
||||
public DateOnly Date { get; set; }
|
||||
public int TemperatureC { get; set; }
|
||||
public string? Summary { get; set; }
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user