Store hero

This commit is contained in:
Matt Stevens
2025-12-17 20:11:07 +00:00
parent cb69593be1
commit 0334844da0
4 changed files with 84 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
@using Sandbox;
@using Sandbox.UI;
@using Sandbox.UI.Navigation;
@inherits Panel
@namespace Menu
@if ( DateTimeOffset.UtcNow >= EndTime )
{
return;
}
<root onclick=@OpenStore class="active">
<div class="time-left">
<span class="number">@DaysLeft</span>
<span class="text">days left</span>
</div>
</root>
@code {
public DateTimeOffset EndTime { get; set; } = DateTimeOffset.FromUnixTimeSeconds(1767258000);
public int DaysLeft => (int)Math.Floor((EndTime - DateTimeOffset.UtcNow).TotalDays);
void OpenStore()
{
this.Navigate( "/itemstore" );
}
}

View File

@@ -0,0 +1,51 @@
StoreHero {
&:not(.active) {
display: none;
}
width: 450px;
height: 300px;
flex-direction: column;
align-items: center;
justify-content: space-between;
pointer-events: all;
cursor: pointer;
border: 1px solid #2e344b44;
border-radius: 16px;
padding: 16px 32px;
transition: all 0.1s linear;
color: #aab3cc;
background-image: url( 'ui/mainmenu/xmas-store-hero.png' );
background-size: cover;
margin-top: 50px;
position: relative;
.time-left {
position: absolute;
top: 116px;
left: 10px;
font-weight: 900;
font-size: 4rem;
text-transform: uppercase;
transform: rotate(-2deg);
font-family: Poppins;
align-items: center;
gap: 0.75rem;
text-shadow: 1px 1px 10px #000000;
text-stroke: 5px #fff;
.number {
font-size: 5rem;
color: #a51c1f;
}
.text {
color: #1da43d;
font-size: 3.25rem;
}
}
&:hover {
transform: scale( 1.05 );
}
}

View File

@@ -16,6 +16,8 @@
</div>
<div class="right">
<StoreHero></StoreHero>
<div class="spacer"></div>
<Button class="clicky" Icon="checkroom" Help="Change your avatar's clothes and stuff" Text="#avatar.change" @onmousedown=@OpenAvatarScene></Button>
<Button class="clicky" icon="@CurrentModelIcon" Text="@CurrentModelMode" @onmousedown=@ToggleHuman></Button>
</div>

View File

@@ -39,6 +39,10 @@ FrontPage .right
padding: 32px;
}
.spacer {
flex: 1;
}
FrontPage button.button
{
border: 1px solid #2e344b44;