Залил изменения за долгое время

This commit is contained in:
2024-12-12 04:05:09 +03:00
parent 27d4b7fbeb
commit 619a158d13
30 changed files with 1549 additions and 1399 deletions

View File

@@ -1,64 +1,64 @@
@inject NavigationManager Navigation
@code {
private int _lvl = 0;
private Dictionary<string, string> _links = new()
{
{ "Анкета", "/otchislenie/questionnaire" },
{ "Заявление", "/otchislenie/statement" },
{ "Отправка", "/otchislenie/result" },
{ "Свобода", "/otchislenie/congratulation" }
};
// TODO: Упростить это
protected override void OnInitialized()
{
base.OnInitialized();
switch (Navigation.ToBaseRelativePath(Navigation.Uri))
{
case "otchislenie/questionnaire":
case "otchislenie":
_lvl = 1;
break;
case "otchislenie/statement":
_lvl = 2;
break;
case "otchislenie/result":
_lvl = 3;
break;
case "otchislenie/congratulation":
_lvl = 4;
break;
}
}
}
<footer class="card fixed bottom-0 w-96 h-20 bg-base-200 rounded-badge p-4 mb-3">
<div class="flex justify-center items-center">
<ul class="steps justify-center center">
<a href="/" class="step step-primary text-gray-500">Выбор</a>
@foreach (int i in Enumerable.Range(1, 4))
{
if (_lvl == 4 && i == 4)
{
<a href="/otchislenie/congratulation" class="step step-primary select-none " data-content="♿">Свобода</a>
continue;
}
if (_lvl == i)
{
<i class="step select-none step-primary">@_links.ElementAt(i - 1).Key</i>
}
else if (_lvl > i)
{
<a href="@_links.ElementAt(i - 1).Value" class="step step-primary select-none text-gray-500">@_links.ElementAt(i - 1).Key</a>
}
else
{
<i class="step select-none"> @_links.ElementAt(i - 1).Key</i>
}
}
</ul>
</div>
@inject NavigationManager Navigation
@code {
private int _lvl = 0;
private Dictionary<string, string> _links = new()
{
{ "Анкета", "/otchislenie/questionnaire" },
{ "Заявление", "/otchislenie/statement" },
{ "Отправка", "/otchislenie/result" },
{ "Свобода", "/otchislenie/congratulation" }
};
// TODO: Упростить это
protected override void OnInitialized()
{
base.OnInitialized();
switch (Navigation.ToBaseRelativePath(Navigation.Uri))
{
case "otchislenie/questionnaire":
case "otchislenie":
_lvl = 1;
break;
case "otchislenie/statement":
_lvl = 2;
break;
case "otchislenie/result":
_lvl = 3;
break;
case "otchislenie/congratulation":
_lvl = 4;
break;
}
}
}
<footer class="card fixed bottom-0 w-96 h-20 bg-base-200 rounded-badge p-4 mb-3">
<div class="flex justify-center items-center">
<ul class="steps justify-center center">
<a href="/" class="step step-primary text-gray-500">Выбор</a>
@foreach (int i in Enumerable.Range(1, 4))
{
if (_lvl == 4 && i == 4)
{
<a href="/otchislenie/congratulation" class="step step-primary select-none " data-content="♿">Свобода</a>
continue;
}
if (_lvl == i)
{
<i class="step select-none step-primary">@_links.ElementAt(i - 1).Key</i>
}
else if (_lvl > i)
{
<a href="@_links.ElementAt(i - 1).Value" class="step step-primary select-none text-gray-500">@_links.ElementAt(i - 1).Key</a>
}
else
{
<i class="step select-none"> @_links.ElementAt(i - 1).Key</i>
}
}
</ul>
</div>
</footer>