-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
138 lines (126 loc) · 3.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1, minimum-scale=1"
/>
<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=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet"
/>
<title>Satpal's Intro</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
transition: all 1s ease;
}
body {
width: 100%;
height: 100vh;
background: #f1f1f1;
font-family: "Poppins", sans-serif;
}
section {
width: 100%;
padding: 2rem;
display: flex;
gap: 1rem;
}
.df {
display: flex;
}
.fd-c {
flex-direction: column;
}
.f-je {
justify-content: flex-end;
}
.f-as {
align-items: flex-start;
}
#Chat {
width: 100%;
gap: 0.4rem;
}
p {
overflow: hidden;
padding: 8px 24px 8px 16px;
max-width: calc(2rem * 20);
background-color: #ffffff;
border-radius: 24px 24px 24px 0;
box-shadow: 0px 10px 20px 20px rgba(0, 0, 0, 0.05);
animation: fadeInFromLeft 1s cubic-bezier(0.165, 0.84, 0.44, 1);
transform-origin: 0% 2%;
}
@keyframes fadeInFromLeft {
0% {
opacity: 0;
transform: translateX(-1rem);
}
20% {
opacity: 0;
transform: translateX(-1rem);
}
100% {
opacity: 1;
transform: translateX(0);
}
}
@keyframes fadeInFromRight {
0% {
opacity: 0;
transform: translateX(1rem);
}
20% {
opacity: 0;
transform: translateX(1rem);
}
100% {
opacity: 1;
transform: translateX(0);
}
}
@media only screen and (min-width: 768px) {
p {
font-size: 2rem;
}
}
</style>
</head>
<body class="df fd-c f-je f-as">
<section class="df fd-c f-je f-as">
<div class="df fd-c f-je f-as" id="Chat"></div>
</section>
</body>
<script>
const chatContainer = document.getElementById("Chat");
const messages = [
"Hello, 👋",
"I'm SATPAL! 😎",
"Nice to meet you. 🫠",
"BTW, this is just an into page.",
"I'll update it soon. Thank you! 🤝",
];
let currentIndex = 0;
function addMessage() {
if (currentIndex < messages.length) {
const message = messages[currentIndex];
const messageElement = document.createElement("p");
messageElement.innerHTML = message;
chatContainer.appendChild(messageElement);
currentIndex++;
void messageElement.offsetWidth;
messageElement.style.opacity = 1;
}
}
setInterval(() => {
addMessage();
}, 1000);
</script>
</html>