-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
130 lines (105 loc) · 3.18 KB
/
main.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
import "./css/home.css";
// prettier-ignore
document.querySelector('#app').innerHTML = //html
`
<div>
<!-- LOADER#1 START -->
<div class="container_loader">
<div id="loader"></div>
</div>
<!-- LOADER#1 END -->
</div>
<div style="display:none;" id="containerView1" class="animate-bottom">
<!-- VIEW #1 start-->
<div class="container_menu_hamburgueza">
<div class="center">
<div class="menu no_animation">
<div class="top active no-anim"></div>
<div class="middle active no-anim"></div>
<div class="bottom active no-anim"></div>
</div>
</div>
<div class="containerWindow"></div>
</div>
<div class="containerTwo">
<!-- modal -->
<!-- Trigger/Open The Modal -->
<!-- <button id="myBtn">Open Modal</button> -->
<!-- The Modal -->
<div id="myModal" class="modal">
<!-- Modal content -->
<div class="modal_content">
<span class="close">×</span>
<img src="./" alt="" />
<!--<img src="./images/hina-cyborg-perfil-1.png" alt="hina">-->
<div class="user_cards" data-card-container>
<template data-template-users>
<div class="card">
<div class="header" data-header-card>
name
<div class="body_card" data-body-card>
</div></div></div>
</template>
</div>
</div>
</div>
<!--SEARCH HERE-->
<div class="search_engine"></div>
<br />
<br>
<div class="portada">
<div class="img_portada">
<img src="./images/vinne-anime-recortada.png" alt="vinne">
</div>
</div>
</div>
</div>
</div>
`
// MENU ANIMATION,CONFIG START
const menu = document.getElementsByClassName("menu")[0];
const container_menu_hamburgueza = document.getElementsByClassName(
"container_menu_hamburgueza"
)[0];
const bars = menu.children;
container_menu_hamburgueza.addEventListener("click", () => {
for (const element of bars) {
element.classList.remove("no-anim");
element.classList.toggle("active");
}
});
// MENU ANIMATION END
const menuActive = document.getElementsByClassName("active_menu");
const menuDisplay = menuActive;
const bars2 = menu.classList;
const leftActive = document.getElementsByClassName("center")[0];
const linksInsideWindow = document.getElementsByClassName("containerWindow")[0];
function behavior_of_containerWindow() {
menu.classList.toggle("active_menu");
// document.getElementsByClassName('active_menu')[0].style.display='block';
container_menu_hamburgueza.classList.toggle("fullScreenContainer");
leftActive.classList.toggle("center_active");
if (menu.classList.contains("active_menu")) {
linksInsideWindow.style.display = "block";
linksInsideWindow.innerHTML =
//html
`
<div class="containerWindow">
<div>home</div>
<div>about</div>
<div>contact</div>
</div>
`;
} else {
linksInsideWindow.style.display = "none";
}
}
container_menu_hamburgueza.addEventListener("click", () => {
behavior_of_containerWindow
? behavior_of_containerWindow()
: container_menu_hamburgueza.removeEventListener(
"click",
behavior_of_containerWindow
);
});