style boost
This commit is contained in:
@@ -1,12 +1,6 @@
|
||||
.MainLayout {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
grid-template-rows: 100vh;
|
||||
grid-template-rows: auto 1fr;
|
||||
place-items: stretch;
|
||||
}
|
||||
|
||||
@media all and (max-width: 600px) {
|
||||
.MainLayout {
|
||||
grid-template-columns: min-content max-content;
|
||||
}
|
||||
}
|
||||
gap: 5px;
|
||||
}
|
||||
@@ -1,52 +1,61 @@
|
||||
@inject NavigationManager navigator
|
||||
@inject ShogiApi Api
|
||||
|
||||
<div class="NavMenu PrimaryTheme ThemeVariant--Contrast">
|
||||
<nav class="NavMenu PrimaryTheme ThemeVariant--Contrast">
|
||||
<h1>Shogi</h1>
|
||||
<p>
|
||||
<a href="">Home</a>
|
||||
</p>
|
||||
<a href="">Home</a>
|
||||
|
||||
<p>
|
||||
<a href="search">Search</a>
|
||||
</p>
|
||||
<a href="search">Search</a>
|
||||
|
||||
<AuthorizeView>
|
||||
<p>
|
||||
<button class="href" @onclick="CreateSession">Create</button>
|
||||
</p>
|
||||
<button class="href" @onclick="CreateSession">Create</button>
|
||||
</AuthorizeView>
|
||||
|
||||
<div class="spacer" />
|
||||
|
||||
<AuthorizeView>
|
||||
<Authorized>
|
||||
<p>@context.User.Identity?.Name</p>
|
||||
<p>
|
||||
<a href="logout">Logout</a>
|
||||
</p>
|
||||
<span>@context.User.Identity?.Name</span>
|
||||
<a href="logout">Logout</a>
|
||||
</Authorized>
|
||||
<NotAuthorized>
|
||||
<p>
|
||||
<a href="login">Login</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="register">Register</a>
|
||||
</p>
|
||||
<a href="login">Login</a>
|
||||
<a href="register">Register</a>
|
||||
</NotAuthorized>
|
||||
</AuthorizeView>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
async Task CreateSession()
|
||||
|
||||
|
||||
|
||||
{
|
||||
|
||||
|
||||
|
||||
var sessionId = await Api.PostSession();
|
||||
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(sessionId))
|
||||
|
||||
|
||||
|
||||
{
|
||||
|
||||
|
||||
|
||||
navigator.NavigateTo($"play/{sessionId}");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
.NavMenu {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-direction: row;
|
||||
border-right: 2px solid #444;
|
||||
place-items: baseline;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.NavMenu > * {
|
||||
padding: 0 0.5rem;
|
||||
}
|
||||
.NavMenu h1 {
|
||||
padding: 0 0.5rem !important;
|
||||
}
|
||||
|
||||
.NavMenu .spacer {
|
||||
|
||||
Reference in New Issue
Block a user