-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcooking.html
134 lines (110 loc) · 3.51 KB
/
cooking.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
<!DOCTYPE html>
<html dir="rtl">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, width=device-width">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Kalnia:wght@100..700&display=swap" rel="stylesheet">
<!-- https://favicon.io/emoji-favicons/money-bag/ -->
<link rel="icon" type="image/x-icon" href="logo.ico">
<link href="cooking.css" rel="stylesheet">
<title>Chabab'in </title>
</head>
<body>
<!-- bacground -->
<div class="bouncing-blobs-container">
<div class="bouncing-blobs-glass"></div>
<div class="bouncing-blobs">
<div class="bouncing-blob bouncing-blob--blue"></div>
<div class="bouncing-blob bouncing-blob--blue"></div>
<div class="bouncing-blob bouncing-blob--blue"></div>
<div class="bouncing-blob bouncing-blob--white"></div>
<div class="bouncing-blob bouncing-blob--purple"></div>
<div class="bouncing-blob bouncing-blob--purple"></div>
<div class="bouncing-blob bouncing-blob--pink"></div>
</div>
</div>
<!--hero-->
<div class="hero">
<h2>أهلًا وسهلًا</h2>
<p>هذا القسم لا يزال قيد الإنشاء.
يمكنك العثور على مزيد من المعلومات في وسائل التواصل الاجتماعي الخاصة بنا.</p>
<div class="mix">
<div id="app">
<span class="text">
<a href="index.html" class="button-59">الرجوع </a></span>
<span class="shimmer"></span>
</div>
<div id="app">
<span class="text"> <a href="https://www.facebook.com/profile.php?id=61557797535319&mibextid=qi2Omg&rdid=pQK9mBhI1eovdj8r" class="button-59">
اكتشف المزيد</a></span>
<span class="shimmer"></span>
</div>
</div>
</div>
<!-- script section -->
<script>
const MIN_SPEED = 1.5
const MAX_SPEED = 2.5
function randomNumber(min, max) {
return Math.random() * (max - min) + min
}
class Blob {
constructor(el) {
this.el = el
const boundingRect = this.el.getBoundingClientRect()
this.size = boundingRect.width
this.initialX = randomNumber(0, window.innerWidth - this.size)
this.initialY = randomNumber(0, window.innerHeight - this.size)
this.el.style.top = `${this.initialY}px`
this.el.style.left = `${this.initialX}px`
this.vx =
randomNumber(MIN_SPEED, MAX_SPEED) * (Math.random() > 0.5 ? 1 : -1)
this.vy =
randomNumber(MIN_SPEED, MAX_SPEED) * (Math.random() > 0.5 ? 1 : -1)
this.x = this.initialX
this.y = this.initialY
}
update() {
this.x += this.vx
this.y += this.vy
if (this.x >= window.innerWidth - this.size) {
this.x = window.innerWidth - this.size
this.vx *= -1
}
if (this.y >= window.innerHeight - this.size) {
this.y = window.innerHeight - this.size
this.vy *= -1
}
if (this.x <= 0) {
this.x = 0
this.vx *= -1
}
if (this.y <= 0) {
this.y = 0
this.vy *= -1
}
}
move() {
this.el.style.transform = `translate(${this.x - this.initialX}px, ${
this.y - this.initialY
}px)`
}
}
function initBlobs() {
const blobEls = document.querySelectorAll('.bouncing-blob')
const blobs = Array.from(blobEls).map((blobEl) => new Blob(blobEl))
function update() {
requestAnimationFrame(update)
blobs.forEach((blob) => {
blob.update()
blob.move()
})
}
requestAnimationFrame(update)
}
initBlobs()
</script>
</body>
</html>