-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
210 lines (208 loc) · 7.33 KB
/
index.html
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- bootstrap -->
<link rel="stylesheet" href="./assets/bootstrap/css/bootstrap.min.css" />
<!-- my css -->
<link rel="stylesheet" href="./style.css" />
<title>GrandNative</title>
</head>
<body>
<!-- header -->
<header>
<nav class="nvabar navbar-expand-lg fixed-top">
<ul class="navbar-nav justify-content-center">
<li class="nav-item"><button class="nav-link" onclick="nav1()">home</button></li>
<li class="nav-item"><button class="nav-link" onclick="nav2()">about</button></li>
<li class="nav-item"><button class="nav-link" onclick="nav3()">contact</button></li>
</ul>
</nav>
</header>
<!-- hero -->
<section id="hero">
<div class="container">
<div class="row">
<div class="col-4"></div>
<div id="heroText" class="col-4 text-center">
<h1>F* Society</h1>
<h6></h6>
<p>
Hi, i`m morteza
</p>
<button class="hovers" id="btn1">yes</button>
<button class="hovers" id="btn2">yes</button>
</div>
<div class="col-4"></div>
</div>
</div>
</section>
<!-- describe -->
<section id="describe">
<div>
<button id="dot1" onclick="dot1f()" class="dot"></button>
<button id="dot2" onclick="dot2f()" class="dot"></button>
<button id="dot3" onclick="dot3f()" class="dot"></button>
</div>
<div class="container">
<div class="row">
<div id="describeTitle" class="col-6 mt-5">
<h1 id="t1">the title of site</h1>
</div>
<div id="describeText" class="col-6 mt-5">
<h2 id="t2">F Society</h2>
<p id="p1">
hi, i`m morteza
</p>
</div>
</div>
<div class="row">
<div class="col-4">
<img
class="img-fluid describe-img"
src="./assets/pics/bg.jpg"
alt=""
/>
</div>
<div class="col-4">
<img
class="img-fluid describe-img"
src="./assets/pics/bg.jpg"
alt=""
/>
</div>
<div class="col-4">
<img
class="img-fluid describe-img"
src="./assets/pics/bg.jpg"
alt=""
/>
</div>
</div>
</div>
</section>
<!-- contact -->
<section id="contact">
<div class="spacer"></div>
<div id="formdiv">
<form id="form" action="">
<h1>contact us</h1>
<input id="email" class="inputs" type="email" placeholder="email">
<input id="message" class="inputs" type="text" placeholder="message">
<button id="submit">submit</button>
</form>
</div>
</section>
<!-- js -->
<script>
// calling
let btn1 = document.getElementById("btn1");
let btn2 = document.getElementById("btn2");
let hero = document.getElementById("hero");
let dog = document.getElementById("dog");
let cat = document.getElementById("cat");
// hero section hover animation
btn1.addEventListener("mouseenter", function () {
document.getElementById("hero").style.backgroundImage =
"url(./assets/pics/btn1bg.gif)";
});
btn1.addEventListener("mouseleave", function () {
document.getElementById("hero").style.backgroundImage =
"url(./assets/pics/normal.gif)";
});
btn2.addEventListener("mouseenter", function () {
document.getElementById("hero").style.backgroundImage =
"url(./assets/pics/btn2bg.gif)";
});
btn2.addEventListener("mouseleave", function () {
document.getElementById("hero").style.backgroundImage =
"url(./assets/pics/normal.gif)";
});
// .......................................
//describe animation
// calling
let dot1 = document.getElementById("dot1");
let dot2 = document.getElementById("dot2");
let dot3 = document.getElementById("dot3");
let describe = document.getElementById("describe");
let t1 = document.getElementById("t1");
let t2 = document.getElementById("t2");
let p1 = document.getElementById("p1");
let p2 = document.getElementById("p2");
function dot1f() {
setTimeout(function () {
describe.style.animationName = "trans";
describe.style.animationDuration = "0.5s";
describe.style.animtationIterationCount = "1";
describe.style.backgroundColor = "#4b6d85";
t1.innerText = "the title of site";
t2.innerText = "hello world";
p1.innerText =
'Lorem ipsum dolor sit amet consectetur adipisicing eli';
p2.innerText =
"Lorem ipsum dolor sit amet consectetur adipisicing eli";
}, 100);
console.log("worked1");
}
function dot2f() {
setTimeout(function () {
describe.style.animationName = "trans2";
describe.style.animationDuration = "0.5s";
describe.style.animtationIterationCount = "1";
describe.style.backgroundColor = "#750a75";
t1.innerText = "new text title";
t2.innerText = "hello world";
p1.innerText =
"so this is the new section as you can see babe yeah its cool";
p2.innerText =
"so this is the new section as you can see babe yeah its cool too";
}, 100);
console.log("worked1");
}
function dot3f() {
setTimeout(function () {
describe.style.animationName = "trans3";
describe.style.animationDuration = "0.5s";
describe.style.animtationIterationCount = "1";
describe.style.backgroundColor = "#ff55c6";
t1.innerText = "new text title";
t2.innerText = "i fucking did it";
p1.innerText =
"so this is the new section as you can see babe yeah its cool";
p2.innerText =
"so this is the new section as you can see babe yeah its cool too";
}, 100);
console.log("worked1");
}
// ........................................
// navbar
let contact = document.getElementById("contact");
function nav1(){
hero.style.display='block';
describe.style.display='none'
contact.style.display='none'
hero.style.animationName = "in";
hero.style.animationDuration = "1s";
hero.style.animtationIterationCount = "1";
}
function nav2(){
describe.style.display='block';
hero.style.display='none'
contact.style.display='none'
describe.style.animationName = "in";
describe.style.animationDuration = "1s";
describe.style.animtationIterationCount = "1";
}
function nav3(){
contact.style.display='block';
describe.style.display='none'
hero.style.display='none'
contact.style.animationName = "in";
contact.style.animationDuration = "1s";
contact.style.animtationIterationCount = "1";
}
</script>
</body>
</html>