Add game header #5
@@ -11,13 +11,18 @@
|
||||
}
|
||||
|
||||
/***** Navigation Theme *****/
|
||||
.navigation .selected {
|
||||
display: none;
|
||||
.navigation {
|
||||
padding: 4px 8px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.navigation .select-label:hover {
|
||||
color: var(--light-grey);
|
||||
}
|
||||
.navigation .selected {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.navigation:hover {
|
||||
background: var(--violet-selected);
|
||||
}
|
||||
|
||||
/***** Sort Theme *****/
|
||||
.sort .select-label:hover {
|
||||
|
||||
@@ -5,28 +5,33 @@
|
||||
<div class="select-button">
|
||||
@Button
|
||||
</div>
|
||||
<div @ref=Container class="select-container" tabindex="1000"
|
||||
@onfocusout=HandleFocusOut>
|
||||
<div class="select-content @(ContentVisile ? string.Empty : "invisible") @(Enum.GetName(Theme)?.ToLower())">
|
||||
@foreach (var item in Headers)
|
||||
{
|
||||
<SelectListElement TItem="TItem"
|
||||
Value="item"
|
||||
ValueChanged="HandleHeaderClicked"
|
||||
Theme="Theme"/>
|
||||
}
|
||||
@if (Headers.Any())
|
||||
{
|
||||
<span class="line"></span>
|
||||
}
|
||||
@foreach (var item in Items)
|
||||
{
|
||||
<SelectListElement TItem="TItem"
|
||||
Value="item"
|
||||
ValueChanged="HandleItemClicked"
|
||||
Theme="Theme" />
|
||||
}
|
||||
</div>
|
||||
<div @ref=Container @onfocusout=HandleFocusOut
|
||||
class="select-container @(AlignRight ? "align-right" : "")"
|
||||
tabindex="1000">
|
||||
|
||||
@if (ContentVisile)
|
||||
{
|
||||
<div class="select-content @(Enum.GetName(Theme)?.ToLower())">
|
||||
@foreach (var item in Headers)
|
||||
{
|
||||
<SelectListElement TItem="TItem"
|
||||
Value="item"
|
||||
ValueChanged="HandleHeaderClicked"
|
||||
Theme="Theme" />
|
||||
}
|
||||
@if (Headers.Any())
|
||||
{
|
||||
<span class="line"></span>
|
||||
}
|
||||
@foreach (var item in Items)
|
||||
{
|
||||
<SelectListElement TItem="TItem"
|
||||
Value="item"
|
||||
ValueChanged="HandleItemClicked"
|
||||
Theme="Theme" />
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ public partial class SelectList<TItem>
|
||||
selectedValue.IsSelected = true;
|
||||
Value = selectedValue.Item;
|
||||
await ValueChanged.InvokeAsync(Value);
|
||||
Close();
|
||||
}
|
||||
|
||||
private async Task HandleHeaderClicked(SelectElement<TItem> selectedValue)
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
.select-content {
|
||||
.select-list {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.select-container {
|
||||
margin-top: 4px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.align-right {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.select-content {
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-radius: var(--small-radius);
|
||||
position: fixed;
|
||||
animation-name: fade-in;
|
||||
animation-duration: 0.4s;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.invisible {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.line {
|
||||
@@ -18,19 +25,16 @@
|
||||
border-bottom: 2px solid var(--light-grey);
|
||||
}
|
||||
|
||||
|
||||
/***** Navigation Theme *****/
|
||||
.select-content.navigation {
|
||||
gap: 4px;
|
||||
background: var(--violet);
|
||||
box-shadow: var(--drop-shadow);
|
||||
padding: 4px 6px;
|
||||
}
|
||||
|
||||
/***** Sort Theme *****/
|
||||
.select-content.sort {
|
||||
gap: 4px;
|
||||
background: var(--black);
|
||||
box-shadow: var(--drop-shadow);
|
||||
padding: 4px 6px;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
<SelectList TItem="AddType"
|
||||
Items="SelectElements"
|
||||
ValueChanged=HandleAddTypeClickedAsync
|
||||
Theme="SelectListTheme.Navigation">
|
||||
Theme="SelectListTheme.Navigation"
|
||||
AlignRight=true>
|
||||
<Button>
|
||||
<div class="second-button button">
|
||||
<svg class="button-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
flex-direction: row;
|
||||
background: var(--violet);
|
||||
border-radius: var(--small-radius);
|
||||
overflow: hidden;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.button {
|
||||
|
||||
Reference in New Issue
Block a user