-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
51 lines (40 loc) · 1.44 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
const home = window.location.href;
if (sessionStorage.getItem('path') == null) {
sessionStorage.setItem('path', home)
console.log(sessionStorage.getItem('path'))
}
const mainsection = document.getElementById('container-iframe')
const maingalery = document.getElementById('galery')
const maintitle = document.getElementById('block-descript')
const menu = document.getElementById('responsive-menu')
var mainframe = document.getElementById('myObject')
function expandlink(source, size){
maingalery.style.display = 'none';
maintitle.style.display = 'none';
mainsection.style.display = 'block';
mainsection.style.height = size;
mainframe.style.display = 'flex';
mainframe.src = source
mainframe.width="100%"
mainframe.height="100%"
mainframe.scrolling="no"
}
function remObject(){
console.log(`MainHome: ${sessionStorage.getItem('path')}}`)
window.location.href = sessionStorage.getItem('path')
}
openMenu.addEventListener('click', () => {
menuLinks.style.display = "flex"
menuLinks.style.width = "100%"
menuLinks.style.opacity = 1
menuLinks.style.background = 'white'
openMenu.style.display = "none"
})
closeMenu.addEventListener('click', () => {
menuLinks.style.opacity = '0'
menuLinks.style.right = (menuLinks.offsetWidth * -1) + 'px'
setTimeout(()=> {
menuLinks.removeAttribute('style')
openMenu.removeAttribute('style')
}, 600);
})