-
Notifications
You must be signed in to change notification settings - Fork 0
/
anim.html
197 lines (180 loc) · 6.34 KB
/
anim.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Devender's Portfolio</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<style>
body {
font-family: Arial, sans-serif;
background: url('animation/bg.jpg') no-repeat center center fixed;
background-size: 20%;
height: 40vh;
display: flex;
justify-content: center;
align-items: center;
}
/* Chatbot styles */
#chat-container {
position: fixed;
bottom: 20px;
right: 20px;
width: 350px;
max-width: 100%;
z-index: 1000;
}
#chatbox {
position: relative;
background-color: #ffffff;
border-radius: 10px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
padding: 20px;
display: none;
opacity: 0;
transition: opacity 0.3s;
}
#chatbox h3 {
font-size: 18px;
margin-bottom: 15px;
}
.option-btn {
display: block;
width: 100%;
padding: 10px;
background-color: #5c6bc0;
color: #ffffff;
text-decoration: none;
font-size: 16px;
text-align: center;
border-radius: 5px;
margin-bottom: 10px;
cursor: pointer;
transition: background-color 0.3s;
}
.option-btn:hover {
background-color: #3f51b5;
}
#chat-toggle {
position: relative;
background-color: #5c6bc0;
color: #ffffff;
text-decoration: none;
font-size: 16px;
padding: 10px;
border-radius: 50%;
cursor: pointer;
text-align: center;
transition: background-color 0.3s;
width: 60px;
height: 60px;
display: flex;
justify-content: center;
align-items: center;
}
#chat-toggle:hover {
background-color: #3f51b5;
}
/* Introduction styles */
.introduction {
max-width: 800px;
text-align: left;
padding: 20px;
font-size: 1.2em;
line-height: 1.5;
background-color: rgba(255, 255, 255, 0.8);
border-radius: 10px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}
.introduction h1 {
font-size: 2.5em;
margin-bottom: 15px;
}
.introduction p {
font-size: 1.2em;
margin-bottom: 15px;
}
</style>
<script>
function toggleChat() {
var chatbox = document.getElementById("chatbox");
if (chatbox.style.display === "none" || chatbox.style.display === "") {
chatbox.style.display = "block";
setTimeout(function() {
chatbox.style.opacity = 1;
}, 50); // Allow a short delay before starting the transition
} else {
chatbox.style.opacity = 0;
setTimeout(function() {
chatbox.style.display = "none";
}, 300); // Wait for the transition to complete before hiding the element
}
}
</script>
</head>
<body>
<!-- Introduction -->
<div class="introduction">
<h1>Welcome to My Web Page</h1>
<p>Hi, I'm Devender, a bioinformatics expert with a passion for data analysis and research. Take a look at my work and feel free to get in touch if you have any questions.</p>
</div>
<!-- Chatbot container -->
<div id="chat-container">
<div id="chatbox">
<h3>How can I help you?</h3>
<div>
<label for="search">Search:</label>
<input type="text" id="search" name="search" onkeyup="searchChat()" placeholder="Type here to search...">
</div>
<div id="options">
<button class="option-btn" onclick="openLink('https://www.linkedin.com/in/devender-arora-3bb76b21/')">My LinkedIn</button>
<button class="option-btn" onclick="openLink('https://www.biostars.org/u/45197/')">Bioinformatics Answers</button>
<button class="option-btn" onclick="openLink('https://twitter.com/tweettoarora')">Twitter</button>
<!-- Add more options here -->
</div>
</div>
<div id="chat-toggle" onclick="toggleChat()">
<img src="animation/chatbot.gif" alt="Chat" width="30" height="30" />
</div>
</div>
<script>
function searchChat() {
var input, filter, ul, li, a, i, txtValue;
input = document.getElementById("search");
filter = input.value.toUpperCase();
ul = document.getElementById("options");
li = ul.getElementsByTagName("button");
for (i = 0; i < li.length; i++) {
a = li[i];
txtValue = a.textContent || a.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
li[i].style.display = "";
} else {
li[i].style.display = "none";
}
}
}
function openLink(link) {
window.open(link, "_blank");
}
</script>
<script>
function searchChat() {
var input, filter, ul, li, a, i, txtValue;
input = document.getElementById("search");
filter = input.value.toUpperCase();
ul = document.getElementById("options");
li = ul.getElementsByTagName("button");
for (i = 0; i < li.length; i++) {
a = li[i];
txtValue = a.textContent || a.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
li[i].style.display = "";
} else {
li[i].style.display = "none";
}
}
}
</script>
</body>
</html>