Stylize the store

This commit is contained in:
2025-05-15 21:42:09 -07:00
parent a9f2bf24bd
commit 177a7da5f3
5 changed files with 75 additions and 45 deletions
+5
View File
@@ -14,3 +14,8 @@ ProjectMistData.cs
ForgotPassword Email / Resetpassword Email ForgotPassword Email / Resetpassword Email
Needs styles that match the theme of the website Needs styles that match the theme of the website
Manage / Data tabs in Account settings
Theme needs to be updated to match
Delete button doesn't shade when mouse hovers
frame that comes up isnt themed either
@@ -57,7 +57,7 @@
bool success = result == "true" ? true : false; bool success = result == "true" ? true : false;
if (success){ if (success){
Result = "Password changed successfully"; Result = "Password changed successfully";
await Task.Delay(2000); Thread.Sleep(2000);
Nav.NavigateTo("/", true); Nav.NavigateTo("/", true);
}else{ }else{
Result = "Something is wrong"; Result = "Something is wrong";
@@ -10,7 +10,7 @@
</div> </div>
<div> <div>
<label for="Description">Description</label> <label for="Description">Description</label>
<input type="text" placeholder="Description" @bind-value=obj.Description /> <textarea type="text" placeholder="Description" @bind-value=obj.Description />
</div> </div>
<div> <div>
<label for="Images">Images</label> <label for="Images">Images</label>
@@ -64,6 +64,7 @@
public async Task Submit() { public async Task Submit() {
HttpResponseMessage response = await Http.PostAsJsonAsync( "api/product/create", obj ); HttpResponseMessage response = await Http.PostAsJsonAsync( "api/product/create", obj );
Result = await response.Content.ReadAsStringAsync(); Result = await response.Content.ReadAsStringAsync();
Nav.NavigateTo("/store/catalog", true);
} }
public void RemoveImage(int index) { public void RemoveImage(int index) {
@@ -1,8 +1,8 @@
@page "/admin/product/edit" @page "/admin/product/edit"
@attribute [Authorize(Roles = "Admin")] @attribute [Authorize(Roles = "Admin")]
<div class="big-frame background-border horizontal-center">
<h3>EditProduct</h3> <h3>EditProduct</h3>
@if( product != null ) { @if( product != null ) {
<div> <div>
<span>Name</span> <span>Name</span>
@@ -10,7 +10,7 @@
</div> </div>
<div> <div>
<span>Description</span> <span>Description</span>
<input type="text" value="@product.Description" /> <textarea type="text" value="@product.Description" />
</div> </div>
<div> <div>
<span>Cost</span> <span>Cost</span>
@@ -24,13 +24,13 @@
@foreach( string img in product.Images ) { @foreach( string img in product.Images ) {
<div> <div>
<img src="@img" alt="not found" /> <img src="@img" alt="not found" />
<input type="button" value="Remove" @onclick="() => { product.Images.Remove(img); }"></input> <input type="button" value="Remove" @onclick="() => { product.Images.Remove(img); }" />
</div> </div>
} }
<InputFile OnChange="@OnFileUpload" multiple /> <InputFile OnChange="@OnFileUpload" multiple />
</div> </div>
<div> <div>
<input type="button" value="Submit" @onclick="onSubmit"></input> <input type="button" value="Submit" @onclick="onSubmit" />
</div> </div>
<div> <div>
<span>@Result</span> <span>@Result</span>
@@ -38,6 +38,7 @@
}else{ }else{
<h1>Product Doesnt Exist</h1> <h1>Product Doesnt Exist</h1>
} }
</div>
@code { @code {
@@ -75,6 +76,7 @@
protected async void onSubmit() { protected async void onSubmit() {
HttpResponseMessage TestLogin = await Http.PostAsJsonAsync("api/product/update", product); HttpResponseMessage TestLogin = await Http.PostAsJsonAsync("api/product/update", product);
Result = await TestLogin.Content.ReadAsStringAsync(); Result = await TestLogin.Content.ReadAsStringAsync();
Nav.NavigateTo("/store/catalog", true);
} }
} }
@@ -1,6 +1,6 @@
.gameCard { .gameCard {
position: relative; position: relative;
background-color: var(--Secondary-Button-Color); background-color: var(--Mistox-Black);
float: left; float: left;
box-sizing: border-box; box-sizing: border-box;
margin: 0; margin: 0;
@@ -9,6 +9,12 @@
border-radius: 10px; border-radius: 10px;
break-inside: avoid; break-inside: avoid;
margin-bottom: 2rem; margin-bottom: 2rem;
border: solid 2px var(--Mistox-Background);
transition-duration: 1s;
}
.gameCard :hover{
border-color: var(--Mistox-Light);
} }
.gameCard-Name { .gameCard-Name {
@@ -62,7 +68,7 @@
.gameCard-Next, .gameCard-Next,
.gameCard-Prev { .gameCard-Prev {
background-color: transparent; background-color: transparent;
color: #fff; color: var(--Mistox-White);
padding: 16px; padding: 16px;
margin-top: -22px; margin-top: -22px;
font-size: 18px; font-size: 18px;
@@ -90,7 +96,7 @@
.gameCard-Desc { .gameCard-Desc {
font-size: 13px; font-size: 13px;
margin: 5px; margin: 5px;
color: #ccc; color: var(--Mistox-Light);
} }
.gameCard-Price { .gameCard-Price {
@@ -105,17 +111,33 @@
width: 40%; width: 40%;
margin: 5px 5%; margin: 5px 5%;
height: 38.4px; height: 38.4px;
color: var(--Mistox-Black);
background-color: var(--Mistox-Light);
font-size: 16px;
text-decoration: none;
text-transform: uppercase;
overflow: hidden;
transition: 0.5s;
letter-spacing: 2px;
border: 1px solid var(--Mistox-Light);
border-radius: 5px;
}
.gameCard-Button :hover{
background-color: var(--Mistox-Light);
color: var(--Mistox-White);
box-shadow: 4px 3px 6px var(--Mistox-Dark);
} }
.cartopen { .cartopen {
position: absolute; position: absolute;
background: #2c2946AA; background: var(--Mistox-Offset);
right: 10px; right: 10px;
top: 55px; top: 55px;
width: 400px; width: 400px;
border-radius: 5px; border-radius: 5px;
backdrop-filter: blur(3px); backdrop-filter: blur(3px);
border: 1px solid #00f; border: 1px solid var(--Mistox-Light);
} }
.cartclosed { .cartclosed {