-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
76 lines (68 loc) · 2.29 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
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Encriptador de texto</title>
<style>
body {
margin: 0;
padding: 0;
font-family: 'Century Schoolbook', serif;
background-image: url('Default_Dark_background_with_neon_green_computer_code_designs_1.jpg');
background-size: cover;
background-position: center;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
#container {
text-align: center;
background-color: rgba(158, 156, 156, 0.9); /* Fondo lila con transparencia */
padding: 20px;
border-radius: 10px;
}
#text, #encrypted-text {
width: 80%;
padding: 10px;
margin: 10px 0;
border: 2px solid black;
border-radius: 5px;
box-sizing: border-box;
font-family: 'Century Schoolbook', serif;
}
button {
padding: 10px 20px;
background-color: #00ff1a; /* Color lila más oscuro */
color: rgb(26, 26, 25);
border: none;
border-radius: 5px;
margin: 10px;
cursor: pointer;
}
</style>
</head>
<body>
<div id="container">
<h1>Mantén tus secretos encriptados</h1>
<textarea id="text" placeholder="Ingresa tu texto aquí"></textarea>
<button onclick="encryptText()">Generar</button>
<button onclick="clearText()">Borrar</button>
<div>
<textarea id="encrypted-text" readonly></textarea>
</div>
</div>
<script>
function encryptText() {
const text = document.getElementById('text').value;
const encryptedText = btoa(text); // Encripta el texto en Base64
document.getElementById('encrypted-text').value = encryptedText;
}
function clearText() {
document.getElementById('text').value = '';
document.getElementById('encrypted-text').value = '';
}
</script>
</body>
</html>