-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
132 lines (110 loc) · 3.56 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body,
html {
font-family: Outfit, ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
background-color: #0E1117;
color: white;
margin: 0;
padding: 0;
height: 100%;
box-sizing: border-box;
}
#main-content {
min-height: calc(100vh - 40px);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
h1 {
font-size: 2.5em;
color: #ffa500;
}
p {
font-size: 1.2em;
margin-top: 20px;
}
.button {
padding: 10px 30px;
background-color: #ffa500;
color: #121212;
text-decoration: none;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s, transform 0.2s;
}
.button:hover {
background-color: #ffd700;
transform: scale(1.05);
}
@keyframes blink-caret {
from,
to {
border-color: transparent
}
50% {
border-color: black
}
}
#changing-text {
border-right: 0.1em solid black;
white-space: nowrap;
overflow: hidden;
color: #ffffff;
animation: blink-caret 0.75s step-end infinite;
}
footer {
text-align: center;
font-size: 0.8em;
padding: 10px 20px;
width: 100%;
}
</style>
</head>
<body>
<div id="main-content">
<h1>Your Merchant Assistant About <span id="changing-text"></span></h1>
<p>Track Key Business Events Impacting Your Sells. Powered by AI</p>
<!-- <button class="button">Learn More</button> -->
</div>
<script>
const phrases = ['Ratings', 'Trends', 'Scibidi', 'Menu Creation', 'Nutritional Help'];
let currentPhrase = 0;
let currentCharacter = 0;
let htmlElement = document.getElementById('changing-text');
let forward = true;
let intervalId = null;
let typingSpeed = 200;
let delayBeforeDelete = 1000;
function typeWriter() {
if (forward) {
if (currentCharacter < phrases[currentPhrase].length) {
currentCharacter++;
htmlElement.textContent = phrases[currentPhrase].substr(0, currentCharacter);
} else {
forward = false;
clearInterval(intervalId);
setTimeout(() => {
intervalId = setInterval(typeWriter, typingSpeed);
}, delayBeforeDelete); // Wait before starting to delete
}
} else {
if (currentCharacter > 0) {
currentCharacter--;
htmlElement.textContent = phrases[currentPhrase].substr(0, currentCharacter);
} else {
forward = true;
currentPhrase = (currentPhrase + 1) % phrases.length; // Move to the next phrase
}
}
}
intervalId = setInterval(typeWriter, typingSpeed);
</script>
</body>
</html>