-
Notifications
You must be signed in to change notification settings - Fork 109
/
index.html
133 lines (111 loc) · 4.12 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Voice Assistant</title>
<link rel="stylesheet" href="./style.css">
<style>
.circle {
height: 24px;
width: 24px;
border-radius: 50%;
position: fixed;
background-color: black;
/* Default color of circles */
pointer-events: none;
/* Prevent interaction with circles */
z-index: 9999;
transition: transform 0.1s ease-out;
}
</style>
</head>
<body>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<script>
// Store the mouse coordinates
const coords = { x: 0, y: 0 };
// Select all circles (you can add more circles to HTML as needed)
const circles = document.querySelectorAll(".circle");
// Customize the colors for the circles (optional)
const colors = ["#ffb56b", "#fdaf69", "#f89d63", "#f59761", "#ef865e", "#ec805d", "#e36e5c", "#df685c", "#d5585c", "#d1525c", "#c5415d", "#c03b5d", "#b22c5e", "#ac265e", "#9c155f", "#950f5f", "#830060", "#7c0060", "#680060", "#60005f", "#48005f", "#3d005e"];
// Initialize circle positions
circles.forEach((circle, index) => {
circle.x = 0;
circle.y = 0;
circle.style.backgroundColor = colors[index % colors.length]; // Assign colors
});
// Update mouse coordinates on move
window.addEventListener("mousemove", (e) => {
coords.x = e.clientX;
coords.y = e.clientY;
});
// Animation loop for circles
function animateCircles() {
let x = coords.x;
let y = coords.y;
circles.forEach((circle, index) => {
circle.style.left = `${x - 12}px`; // Offset for center alignment
circle.style.top = `${y - 12}px`;
circle.style.transform = `scale(${(circles.length - index) / circles.length})`; // Shrink effect
circle.x = x;
circle.y = y;
const nextCircle = circles[index + 1] || circles[0];
x += (nextCircle.x - x) * 0.3;
y += (nextCircle.y - y) * 0.3;
});
requestAnimationFrame(animateCircles);
}
// Start animation
animateCircles();
</script>
<!-- nav bar -->
<nav class="nav">
<h1><a class="logo">VOICE.py</a></h1>
<div class="nav-right">
<h1><a href="">Home</a></h1>
<h1><a href="">Features</a></h1>
<h1><a href="contact.html">Contact</a></h1>
<h1><a href="">About</a></h1>
<h1><a href="faq.html">FAQ</a></h1>
</div>
</nav>
<!-- nav bar end -->
<!-- <div class="A">
<h3>🚧 NOTICE: THIS SITE IS UNDER MAINTENANCE 🚧</h3>
</div> -->
<div class="B">
<p>Welcome to VOICE.py!</p>
<p>Our assistant is currently being updated for better performance.</p>
<p>Stay tuned for exciting new features!</p>
</div>
<div id="assistant">
<div id="animation"></div>
<button id="start-button">Speak to the Assistant</button>
</div>
<script src="./script.js"></script>
</body>
</html>