mirror of
https://github.com/Shchoholiev/shopping-assistant-web-client.git
synced 2025-04-04 16:49:36 +00:00
create button
This commit is contained in:
parent
1656f10967
commit
ff7db5aa74
@ -1,4 +1,4 @@
|
||||
<div style="@leftFrameStyle" class="left_frame">
|
||||
<div id="leftframe" class="left_frame">
|
||||
|
||||
|
||||
<div class="logo">
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
<div class="menu">
|
||||
|
||||
<a @onclick="ChangeButtonStyle" class="button_close_menu">
|
||||
<a id="button_close" class="button_close_menu">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
@ -52,19 +52,25 @@
|
||||
</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 string leftFrameStyle = "transform: translateX(0%);";
|
||||
|
||||
private void ChangeButtonStyle()
|
||||
{
|
||||
if (leftFrameStyle.Contains("transform: translateX(0%);"))
|
||||
{
|
||||
leftFrameStyle = "transform: translateX(-110%);";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private List<Models.Wishlist> wishlist;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
|
@ -4,6 +4,7 @@
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
transition: 1s;
|
||||
transform: translateX(0%);
|
||||
}
|
||||
.logo {
|
||||
height: 5em;
|
||||
|
Loading…
Reference in New Issue
Block a user