-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
266 lines (247 loc) · 10.1 KB
/
demo.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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PopSocial</title>
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,300,600,700' rel='stylesheet' type='text/css'>
<!-- Styles -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js"></script>
<script src="assets/demo.js"></script>
<!-- SweetAlert -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.11.4/sweetalert2.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.11.4/sweetalert2.min.js"></script>
</head>
<body onload="prepareClipboardButton()">
<div class="container demo-container">
<div class="container">
<div class="row input-header">
<span class="number">1</span>
<span>Digite os dados da sua empresa</span>
</div>
<div class="input-fields">
<div class="row input-group">
<span class="input-label">Messenger</span>
<input type="text" class="form-control" id="fb-field" placeholder="Digite a URL da página">
</div>
<div class="row input-group">
<span class="input-label">WhatsApp</span>
<input type="text" class="form-control" id="wpp-field" placeholder="Número do telefone">
</div>
</div>
</div>
<div class="container">
<div class="row input-header">
<span class="number">2</span>
<span>Customize seu PopSocial</span>
</div>
<div class="input-fields">
<div class="row input-group">
<span class="input-label">Header</span>
<input type="text" class="form-control" id="pop-header" placeholder="Digite o header do seu popup. Ex: Olá, como posso te ajudar?">
</div>
<div class="row input-group">
<span class="input-label">Mensagem</span>
<input type="text" class="form-control" id="pop-msg" placeholder="Digite a mensagem do seu popup. Ex: Basta me enviar uma mensagem agora!">
</div>
<div class="row input-group">
<span class="input-label">Cor</span>
<input type="text" class="form-control" id="pop-color" placeholder="Cor em hexadecimal. Ex: #38CBD3">
</div>
<!-- <div class="row input-group">
<span class="input-label">Posição</span>
<span class="input-label">
<input type="radio" name="left" value="l">Esquerda
<input type="radio" name="right" value="r">Direita
</span>
</div> -->
</div>
</div>
<div class="container">
<div class="row input-header">
<span class="number">3</span>
<span>Gerar código</span>
</div>
<div class="input-fields text-center">
<div class="row">
<div class="col-xs-6">
<textarea name="popup-code" id="popup-code" cols="30" rows="5"></textarea>
</div>
<div class="col-xs-6">
<button
class="btn btn-default btn-lg btn-block"
id="copy-button"
data-clipboard-action="copy"
data-clipboard-target="#popup-code"
onclick="generatePopupCode()"
>
Copiar código
</button>
</div>
</div>
</div>
</div>
</div>
<div id="popx">
<div id="popx-popup" class="popup-container">
<div class="header">
<span>Olá, como posso te ajudar?</span>
</div>
<div id="popx-close" class="close">
<i class="fa fa-times"></i>
</div>
<span class="popup-label">Basta me enviar uma mensagem agora!</span>
<br>
<div class="content">
<div class="col">
<!-- Insira seu número com DD em "https://api.whatsapp.com/send?1=pt_BR&phone=55SEUNUMERO" -->
<a href="https://api.whatsapp.com/send?1=pt_BR&phone=55SEUNUMERO" target="_blank" class="whatsapp">
<i class="fa fa-whatsapp"></i>
Conversar
</a>
</div>
<div class="col">
<!-- Insira o Facebook da sua empresa em "https://m.me/sua-pagina" -->
<a href="https://m.me/sua-pagina" target="_blank" class="facebook">
<i class="fa fa-facebook"></i>
Conversar
</a>
</div>
</div>
</div>
<style>
.popup-container {
position: fixed;
max-width: 350px;
background: rgba(236, 240, 241,1);
border: 7px solid #38CBD3;
background-color: #38CBD3;
bottom: 0;
margin-left: -425px;
box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
border-radius: 8px;
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
transition: all 1s ease;
}
.popup-container .header {
text-align: center;
position: relative;
background: #38cbd3;
color: #fafafa;
font-size: 16px;
font-weight: 600;
letter-spacing: 1px;
display: inline-block;
width: 100%;
padding: 12px 0;
}
.popup-container .close {
color: #fafafa;
right: 8px;
top: 0px;
position: absolute;
font-size: 20px;
cursor: pointer;
padding: 8px 0;
}
.popup-container .popup-label {
font-size: 17px;
color: #fafafa;
line-height: 24px;
font-weight: 400;
text-align: center;
margin-top: 20px;
padding: 0 20px;
display: block;
}
.popup-container a.whatsapp, a.facebook {
text-decoration: none !important;
text-align: center;
color: #fff !important;
border-radius: 4px;
padding: 8px 0;
display: block;
}
.popup-container a.whatsapp {
border-bottom: 2px solid #1bc65a;
background: #25D366;
}
.popup-container a.facebook {
border-bottom: 2px solid #415e93;
background: #4b6598;
}
#popx-plus {
position: fixed;
color: #fff;
bottom: 15%;
font-size: 25px;
margin-left: -425px;
-webkit-transition: all 1.25s ease;
-moz-transition: all 1.25s ease;
-o-transition: all 1.25s ease;
transition: all 1.25s ease;
cursor: pointer;
text-align: left;
letter-spacing: 1px;
left: 0;
z-index: 5;
}
#popx-plus span {
position: absolute;
margin-top: 38px;
left: 4px;
}
#popx-plus::after {
content: '';
display: block;
display: relative;
border-top: 55px solid transparent;
border-bottom: 55px solid transparent;
border-left: 55px solid #38cbd3;
}
.popup-container .content {
text-align: center;
padding-bottom: 20px;
}
.popup-container .content .col {
display: inline-block;
width: 40%;
}
</style>
<div id="popx-plus">
<script type="text/javascript">
function preparePopX() {
const scrollTop = document.documentElement.scrollTop;
const popUp = document.getElementById('popx-popup');
const plus = document.getElementById('popx-plus');
if (scrollTop >= 500) {
popUp.style.marginLeft = '25px';
plus.style.marginLeft = '-425px';
}
if (scrollTop <= 600) {
popUp.style.marginLeft = '-425px';
plus.style.marginLeft = '0px';
}
plus.addEventListener('click', () => {
popUp.style.marginLeft = '0px';
plus.style.marginLeft = '-425px';
});
document.getElementById('popx-close').addEventListener('click', () => {
popUp.style.marginLeft = '-425px';
plus.style.marginLeft = '0px';
});
}
preparePopX();
</script>
<span>
<i class="fa fa-comments"></i>
</span>
</div>
</div>
</body>
</html>