mirror of
https://github.com/Shchoholiev/shopping-assistant-web-client.git
synced 2025-06-29 18:21:09 +00:00
feature/SA-210 Add Amazon disclaimer
This commit is contained in:
parent
325eb7a8e5
commit
1242d22963
@ -12,4 +12,5 @@
|
|||||||
<div class="right-frame">
|
<div class="right-frame">
|
||||||
@Body
|
@Body
|
||||||
</div>
|
</div>
|
||||||
|
<span class="amazon-associate">As an Amazon Associate we earn from qualifying purchases.</span>
|
||||||
</div>
|
</div>
|
@ -69,6 +69,8 @@
|
|||||||
function changetyle() {
|
function changetyle() {
|
||||||
var left_frame = document.querySelector('.sidebar-menu');
|
var left_frame = document.querySelector('.sidebar-menu');
|
||||||
var right_frame = document.querySelector('.right-frame');
|
var right_frame = document.querySelector('.right-frame');
|
||||||
|
var amazonAssociate = document.querySelector('.amazon-associate');
|
||||||
|
|
||||||
var computedStyles = getComputedStyle(left_frame);
|
var computedStyles = getComputedStyle(left_frame);
|
||||||
var transformValue = computedStyles.transform;
|
var transformValue = computedStyles.transform;
|
||||||
var button_open = document.querySelector('.button_open_menu');
|
var button_open = document.querySelector('.button_open_menu');
|
||||||
@ -77,11 +79,13 @@
|
|||||||
left_frame.style.transform = 'translateX(-110%)';
|
left_frame.style.transform = 'translateX(-110%)';
|
||||||
button_open.style.visibility = 'visible';
|
button_open.style.visibility = 'visible';
|
||||||
right_frame.style.left = '1.25em';
|
right_frame.style.left = '1.25em';
|
||||||
|
amazonAssociate.style.left='50%'
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
left_frame.style.transform = 'translateX(0)';
|
left_frame.style.transform = 'translateX(0)';
|
||||||
button_open.style.visibility = 'hidden';
|
button_open.style.visibility = 'hidden';
|
||||||
right_frame.style.left = '23.25em';
|
right_frame.style.left = '23.25em';
|
||||||
|
amazonAssociate.style.left='calc(50% + 20em)'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
document.getElementById('button_close').addEventListener('click', changetyle);
|
document.getElementById('button_close').addEventListener('click', changetyle);
|
||||||
|
@ -22,4 +22,18 @@
|
|||||||
top: 1.25em;
|
top: 1.25em;
|
||||||
bottom: 1.25em;
|
bottom: 1.25em;
|
||||||
transition: 1s;
|
transition: 1s;
|
||||||
|
}
|
||||||
|
.amazon-associate {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: calc(50% + 20em);
|
||||||
|
transform: translateX(-50%);
|
||||||
|
font-size: 0.7em;
|
||||||
|
color: #000;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: none;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
transition: 1s;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user