shopping-assistant-web-client/ShoppingAssistantWebClient.Web/Shared/NavMenu.razor
2023-10-20 13:45:27 +00:00

92 lines
2.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div id="leftframe" class="left_frame">
<div class="logo">
<img src="/images/logo.svg" alt="Logo site">
<span class="logo_name">CARTAID</span>
</div>
<div class="menu">
<a id="button_close" class="button_close_menu">
<span></span>
<span></span>
<span></span>
</a>
<div class="elements_wishlisht">
<div class="add_chat">
<a href="/">
<span>Search</span>
<span class="plus" >+</span>
</a>
</div>
<div class="wishlist_names">
@foreach(var item in wishlist){
<section class="cont_wishlist">
<div id="wishlist_id_@item.Id" class="wishlist_name">@item.Name</div>
<img class="button_delete_chat" src="/images/icon_delete.svg" alt="Delete wishlist">
<img class="button_open_card" src="/images/icon_open_card.svg" alt="Card open">
</section>
}
</div>
</div>
<div class="line"></div>
<div class="elements">
<div class="info_user">
<img src="/images/avatar.jpg" alt="Avatar user">
<span class="user_name">Semen Semenov</span>
</div>
</div>
</div>
</div>
<script>
function changetyle() {
var element = document.getElementById('leftframe');
var computedStyles = getComputedStyle(element);
var transformValue = computedStyles.transform;
if (transformValue === 'matrix(1, 0, 0, 1, 0, 0)') {
element.style.transform = 'translateX(-110%)';
} else {
element.style.transform = 'translateX(0%)';
}
}
document.getElementById('button_close').addEventListener('click', changetyle);
</script>
@code {
private List<Models.Wishlist> wishlist;
protected override async Task OnInitializedAsync()
{
wishlist = new List<Models.Wishlist>
{
new Models.Wishlist {Id = "0", Name = "Gift for Jessica", Type="product", CreateById="0"},
new Models.Wishlist {Id = "1", Name = "Secret Santa", Type="gift", CreateById="1"},
new Models.Wishlist {Id = "2", Name = "Marks Birthday", Type="product", CreateById="2"},
new Models.Wishlist {Id = "3", Name = "Garden tools", Type="product", CreateById="2"},
new Models.Wishlist {Id = "4", Name = "Phone charger ", Type="product", CreateById="2"},
new Models.Wishlist {Id = "5", Name = "Garden tools", Type="product", CreateById="2"}
};
}
}