-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccents.html
More file actions
107 lines (95 loc) · 3.69 KB
/
accents.html
File metadata and controls
107 lines (95 loc) · 3.69 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
<!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">
<title>Spanish Accents</title>
<link rel="icon" type="image/x-icon" href="favicon.png">
<link rel="stylesheet" href="main.css?12">
<style>
input {
border: var(--content-border);
padding: 10px;
bottom: 10px;
cursor: pointer;
color: var(--dark-color);
margin: 10px 5px 10px 5px;
background-color: var(--accent-color);
text-align: center;
font-size: 60pt;
width: calc(33% - 35px);
max-width: 100px;
outline: none;
transition: 0.09s;
}
#main {
position: absolute;
text-align: center;
width: 50vw;
height: 410px;
margin-top: 90px;
margin-left: 50%;
transform: translate(-50%);
}
#success {
position: absolute;
top: 48px;
left: 50%;
transform: translate(-50%);
font-size: 14pt;
color: #2eb351;
}
@media (max-width: 600px) {
#main {
width: 90vw;
}
input {
width: calc(50% - 35px);
font-size: 40pt;
}
#title {
font-size: 14pt;
margin-top: 15px;
white-space: nowrap !important;
}
}
#title {
overflow: hidden;
width: calc(100vw - 60px);
white-space: nowrap;
}
</style>
</head>
<body>
<header>
<svg onclick="location.href = 'tools.html'" id="back" xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="currentColor" class="bi bi-arrow-left-short" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M12 8a.5.5 0 0 1-.5.5H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H11.5a.5.5 0 0 1 .5.5"/>
</svg>
<h1 id="title">Spanish Accent Copy-Paste</h1>
</header>
<p id="success"></p>
<div id="main">
<input onclick="copy(event, 'á');" value="á" readonly></input>
<input onclick="copy(event, 'é');" value="é" readonly></input>
<input onclick="copy(event, 'í');" value="í" readonly></input>
<input onclick="copy(event, 'ó');" value="ó" readonly></input>
<input onclick="copy(event, 'ú');" value="ú" readonly></input>
<input onclick="copy(event, 'ü');" value="ü" readonly></input>
<input onclick="copy(event, 'ñ');" value="ñ" readonly></input>
<input onclick="copy(event, '¡');" value="¡" readonly></input>
<input onclick="copy(event, '¿');" value="¿" readonly></input>
</div>
<script>
function copy(event, accent) {
event.target.select();
event.target.setSelectionRange(0, 99999);
navigator.clipboard.writeText(accent);
document.getElementById('success').innerText = 'copied';
setTimeout(() => {
document.getElementById('success').innerText = '';
}, 1000);
}
</script>
</body>
</html>