-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
180 lines (165 loc) · 11.8 KB
/
Copy pathindex.html
File metadata and controls
180 lines (165 loc) · 11.8 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WhatsApp Floating Button - Live Demo</title>
<style>
/* --- CSS --- */
:root {
--wafb-color: #25D366;
--wafb-rgb: 37, 211, 102;
--wafb-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
--wafb-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.18);
--wafb-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
--wafb-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
}
.wafb-floating-btn {
position: fixed;
bottom: 24px;
z-index: 9999;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 50px;
background-color: var(--wafb-color);
color: #fff;
text-decoration: none;
overflow: hidden;
cursor: pointer;
padding: 0;
border: none;
line-height: 0;
outline: none;
box-shadow: var(--wafb-shadow);
transition: transform var(--wafb-transition), box-shadow var(--wafb-transition), max-width 0.35s ease, padding 0.35s ease;
animation: wafb-float 3s ease-in-out infinite;
}
.wafb-floating-btn.wafb--right { right: 24px; }
.wafb-floating-btn.wafb--medium { width: 60px; height: 60px; }
.wafb-floating-btn.wafb--has-label { width: auto; min-width: 60px; height: 60px; }
.wafb-floating-btn:hover { filter: brightness(1.08); transform: scale(1.08) translateY(-3px); box-shadow: var(--wafb-shadow-hover); }
.wafb-label {
font-family: var(--wafb-font);
font-size: 14px;
font-weight: 600;
white-space: nowrap;
max-width: 0;
opacity: 0;
overflow: hidden;
transition: max-width 0.4s ease, opacity 0.3s ease, margin 0.35s ease;
pointer-events: none;
color: #fff;
}
.wafb-floating-btn svg {
display: block;
margin-left: 1px;
margin-top: -1px;
transition: margin 0.35s ease, transform var(--wafb-transition);
}
.wafb-floating-btn.wafb--has-label:hover svg { margin-left: 18px; margin-top: 0; }
.wafb-floating-btn.wafb--has-label:hover { padding-right: 18px; }
.wafb-floating-btn.wafb--has-label:hover .wafb-label { max-width: 220px; opacity: 1; margin-left: 8px; }
.wafb-tooltip {
position: absolute; bottom: 80px; right: 0;
background: #1a1a1a; color: #fff; font-family: var(--wafb-font); font-size: 12px;
padding: 6px 12px; border-radius: 6px; opacity: 0; visibility: hidden;
transform: translateY(8px); transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none;
}
.wafb-floating-btn:hover .wafb-tooltip { opacity: 1; visibility: visible; transform: translateY(0); }
.wafb-bubble {
position: fixed; bottom: 104px; right: 24px; z-index: 9998; width: 300px;
background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 24px;
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 0 15px rgba(0, 0, 0, 0.05);
overflow: hidden; font-family: var(--wafb-font); opacity: 0; transform: translateY(20px) scale(0.92);
transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
pointer-events: none;
}
.wafb-bubble.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.wafb-bubble__header { background: var(--wafb-color); padding: 16px; display: flex; align-items: center; gap: 12px; position: relative; }
.wafb-bubble__name { color: #fff; font-size: 14px; font-weight: 700; display: block; }
.wafb-bubble__status { display: flex; align-items: center; gap: 5px; color: rgba(255,255,255,0.85); font-size: 11px; margin-top: 2px; }
.wafb-status-dot { width: 8px; height: 8px; background: #25D366; border-radius: 50%; box-shadow: 0 0 5px rgba(37,211,102,0.5); animation: wafb-status-blink 1.5s infinite ease-in-out; }
@keyframes wafb-status-blink { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.85); } 100% { opacity: 1; transform: scale(1); } }
.wafb-bubble__body { padding: 14px; background: #f0f2f5; }
.wafb-bubble__msg { background: #fff; border-radius: 0 12px 12px 12px; padding: 12px 16px; font-size: 14px; color: #333; position: relative; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.wafb-bubble__cta { display: flex; align-items: center; justify-content: center; padding: 13px; background: var(--wafb-color); color: #fff !important; text-decoration: none !important; font-size: 13px; font-weight: 700; }
.wafb-bubble__typing { display: flex; align-items: center; gap: 4px; background: #fff; width: fit-content; padding: 12px 16px; border-radius: 0 12px 12px 12px; }
.wafb-bubble__typing span { width: 6px; height: 6px; background: #999; border-radius: 50%; animation: wafb-typing 1.4s infinite ease-in-out both; }
.wafb-bubble__typing span:nth-child(1) { animation-delay: -0.32s; }
.wafb-bubble__typing span:nth-child(2) { animation-delay: -0.16s; }
@keyframes wafb-typing { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1.1); opacity: 1; } }
@keyframes wafb-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.wafb-bubble__close {
position: absolute; top: 12px; right: 12px; z-index: 2;
width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
color: #fff; background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.1);
border-radius: 50%; cursor: pointer; font-size: 18px; transition: all 0.3s ease;
}
.wafb-bubble__close:hover { background: rgba(255,255,255,0.35); transform: rotate(90deg); }
body { font-family: sans-serif; margin: 0; padding: 0; background: #f0f2f5; height: 150vh; }
.hero { background: var(--wafb-color); color: white; padding: 100px 20px; text-align: center; }
.container { max-width: 800px; margin: -50px auto 50px; background: white; padding: 40px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
</style>
</head>
<body>
<div class="hero">
<h1>WhatsApp Floating Button</h1>
<p>Premium WordPress Plugin - Live Demo</p>
</div>
<div class="container">
<h2>Professional Interface</h2>
<p>This is a live preview of the WhatsApp Floating Button. Look at the bottom right corner to see the interactive button and chat bubble.</p>
<div style="background:#f9f9f9; padding:20px; border-radius:8px; border-left:4px solid var(--wafb-color); margin:20px 0;">
<p style="margin:0;"><strong>Features demonstrated:</strong></p>
<ul style="margin:10px 0 0 20px;">
<li>Ultra-modern Glassmorphism design</li>
<li>Interactive Typing Indicator</li>
<li>Gentle Bobbing (Floating) Animation</li>
<li>Blinking "Online" Status Dot</li>
<li>Responsive Pill-shaped Label</li>
</ul>
</div>
<p>To use this on your own WordPress site, simply install the plugin and configure it from the settings page.</p>
</div>
<div class="wafb-bubble" id="wafb-bubble">
<button class="wafb-bubble__close" id="wafb-bubble-close">×</button>
<div class="wafb-bubble__header">
<div style="width:40px; height:40px; border-radius:50%; background:rgba(255,255,255,0.2); display:flex; align-items:center; justify-content:center;">
<svg viewBox="0 0 448 512" width="20" height="20" fill="#fff"><path d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.1 0-65.6-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-5.5-2.8-23.2-8.5-44.2-27.1-16.4-14.6-27.4-32.7-30.6-38.2-3.2-5.6-.3-8.6 2.4-11.3 2.5-2.4 5.5-6.5 8.3-9.7 2.8-3.3 3.7-5.6 5.5-9.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 13.2 5.8 23.5 9.2 31.5 11.8 13.3 4.2 25.4 3.6 35 2.2 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"/></svg>
</div>
<div>
<strong class="wafb-bubble__name">Support Team</strong>
<div class="wafb-bubble__status"><span class="wafb-status-dot"></span> Online</div>
</div>
</div>
<div class="wafb-bubble__body">
<div class="wafb-bubble__typing" id="wafb-typing">
<span></span><span></span><span></span>
</div>
<div class="wafb-bubble__msg" id="wafb-msg" style="display:none;">Hi there! How can I help you today?</div>
</div>
<a href="#" class="wafb-bubble__cta">Start Conversation</a>
</div>
<a id="wafb-floating-btn" class="wafb-floating-btn wafb--right wafb--medium wafb--anim-pulse wafb--has-label">
<svg viewBox="0 0 448 512" width="28" height="28" fill="#fff"><path d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.1 0-65.6-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-5.5-2.8-23.2-8.5-44.2-27.1-16.4-14.6-27.4-32.7-30.6-38.2-3.2-5.6-.3-8.6 2.4-11.3 2.5-2.4 5.5-6.5 8.3-9.7 2.8-3.3 3.7-5.6 5.5-9.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 13.2 5.8 23.5 9.2 31.5 11.8 13.3 4.2 25.4 3.6 35 2.2 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"/></svg>
<span class="wafb-label">Chat with us</span>
<span class="wafb-tooltip">Chat on WhatsApp</span>
</a>
<script>
const bubble = document.getElementById('wafb-bubble');
const close = document.getElementById('wafb-bubble-close');
setTimeout(() => {
bubble.classList.add('is-visible');
const typing = document.getElementById('wafb-typing');
const msg = document.getElementById('wafb-msg');
setTimeout(() => {
if(typing) typing.style.display = 'none';
if(msg) msg.style.display = 'block';
}, 1800);
}, 3000);
close.onclick = () => bubble.classList.remove('is-visible');
</script>
</body>
</html>