-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwhatsapp-widget.html
145 lines (133 loc) · 3.93 KB
/
whatsapp-widget.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
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WhatsApp Widget</title>
<style>
.whatsapp-widget {
position: fixed;
bottom: 100px;
right: 20px;
z-index: 1000;
}
.chatbox {
display: none;
width: 300px;
background-color: #f1f1f1;
border-radius: 15px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
overflow: hidden;
position: relative;
}
.header {
background-color: #075E54;
color: #fff;
padding: 15px;
display: flex;
align-items: center;
position: relative;
}
.header .logo {
width: 40px;
height: 40px;
margin-right: 10px;
border-radius: 50%;
object-fit: cover;
}
.agent-info h3 {
margin: 0;
font-size: 16px;
}
.agent-info span {
font-size: 14px;
}
.chat-message {
padding: 15px;
background-color: #ffffff;
font-size: 14px;
color: #333;
}
.whatsapp-btn {
display: block;
background-color: #25D366;
color: #fff;
text-align: center;
padding: 10px;
text-decoration: none;
font-size: 16px;
border-radius: 0 0 15px 15px;
}
.floating-button {
width: 150px;
height: 50px;
background-color: #25D366;
border-radius: 25px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
animation: pulse 2s infinite;
position: fixed;
bottom: 40px;
right: 20px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
border: 3px solid #ffffff;
outline: none;
}
.floating-button img {
width: 25px;
height: 25px;
margin-right: 10px;
}
.floating-button span {
font-size: 16px;
font-weight: bold;
color: #ffffff;
}
.close-button {
position: absolute;
top: 10px;
right: 10px;
font-size: 20px;
font-weight: bold;
color: #ffffff;
cursor: pointer;
background: transparent;
border: none;
}
@keyframes pulse {
0%, 100% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
}
</style>
</head>
<body>
<div class="whatsapp-widget">
<div class="chatbox" id="chatbox">
<div class="header">
<img src="https://softgrade.github.io/whatsapp_widget/logo.png" alt="Logo" class="logo">
<div class="agent-info">
<h3>ONCE México</h3>
<span>Agente</span>
</div>
<button class="close-button" id="close-chatbox">×</button>
</div>
<div class="chat-message">
<p>¡Hola! 👋 ¿Cómo puedo ayudarte? Envíanos un mensaje para ponernos en contacto contigo.</p>
</div>
<a href="https://wa.me/15557001638?text=Hola,%20me%20gustaría%20obtener%20más%20información." target="_blank" class="whatsapp-btn" id="whatsapp-link">
<span>Clic para iniciar conversación</span>
</a>
</div>
<div class="floating-button" id="whatsapp-button">
<img src="https://cdn-icons-png.flaticon.com/512/124/124034.png" alt="WhatsApp Icon">
<span>WhatsApp</span>
</div>
</div>
</body>
</html>