-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
148 lines (140 loc) · 3.97 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
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Web para abrir un chat de WhatsApp sin guardar como contacto">
<meta name="theme-color" content="#4CA16C"/>
<link rel="icon" type="image/x-icon" href="img/favicon.ico">
<link rel="apple-touch-icon" href="img/ios/192.png">
<link rel='manifest' href='manifest.json'>
<title>whatsappea sin guardar contacto</title>
<style>
*{
margin: 0%;
padding: 0%;
background-color: #F0FCED;
}
header{
width: 100%;
}
#logo{
max-width: 100%;
display: flex;
justify-content: center;
}
#logo img{
margin: 0%;
max-width: 80%;
}
#description{
width: 100%;
text-align: center;
padding-bottom: 20%;
}
#search{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
padding-bottom:10%;
}
input{
height: 40px;
width: 200px;
margin-bottom: 4%;
border-radius:0 6px 6px 0px ;
font-size: 1em;
}
button{
background-color: #4CA16C;
border-color: #4CA16C;
height: 35px;
width: 120px;
border-radius: 15px;
font-weight: bold;
}
button:visited{
color: black;
}
footer{
width: 90%;
text-align: center;
position: absolute;
bottom: 0;
padding-left: 5%;
padding-bottom: 2%;
}
a:visited{
color: black;
}
@media (min-width: 480px) {
#description{
padding-bottom: 10%;
font-size: 1.5em;
}
input{
width:300px;
height: 50px;
font-size:2em;
}
footer{
font-size: 1.5em;
}
}
</style>
</head>
<body>
<header>
<div id="header">
<div id="logo">
<img
src="img/logo.png" alt="logo de la aplicación"
/>
</div>
</div>
</header>
<section>
<div id="description">
<p>Chatea en WhatsApp sin necesidad de agregar como contacto</p>
</div>
<div id="search">
<div id="srh-input">
<input id="numberInput" type="number" name="cellphone-number" placeholder="310xxxxxx" required="required">
</div>
<div id="srh-btn">
<button type="button" id="btn-chat" class="btn" >Chat</button>
</div>
</div>
</section>
<footer>
Creado con fines didácticos para
<strong> <a href="https://aumentada.net/">Aumentada</a> </strong> Soluciones Informaticas <br> <strong>
<a href="https://www.linkedin.com/in/jasmin-eliana-osorio-osorio/"
> Eliana Osorio</a>
</strong>-
-<strong>
<a href="https://www.linkedin.com/in/santiaguf/"> Santiago Bernal.</a>
</strong>
</footer>
<script defer type="text/javascript">
if ("serviceWorker" in navigator) {
window.addEventListener("load", function() {
navigator.serviceWorker
.register("/serviceWorker.js")
.then(res => console.log("service worker registered"))
.catch(err => console.log("service worker not registered", err))
})
}
const btnChat = document.getElementById('btn-chat');
const numberInput = document.getElementById('numberInput');
btnChat.addEventListener('click', () => {
const number = `57${numberInput.value}`;
if (number.length > 0) {
window.open(`https://wa.me/${number}`);
}
});
</script>
</body>
</html>