-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
184 lines (158 loc) · 8.46 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Morse Convertor</title>
<!-- jquery cdn -->
<!-- bootstrap cdn -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/css/bootstrap.min.css"
integrity="sha512-b2QcS5SsA8tZodcDtGRELiGv5SaKSk1vDHDaQRda0htPYWZ6046lr3kJ5bAAQdpV2mmA/4v0wQF9MyU6/pDIAg=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- fontawesome cdn -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/js/all.min.js"
integrity="sha512-GWzVrcGlo0TxTRvz9ttioyYJ+Wwk9Ck0G81D+eO63BaqHaJ3YZX9wuqjwgfcV/MrB2PhaVX9DkYVhbFpStnqpQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<!-- font -->
<link href="https://db.onlinewebfonts.com/c/191612633955db737e8d3174beb8374a?family=CourierMCY" rel="stylesheet"
type="text/css" />
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "CourierMCY";
}
html {
font-size: 18px;
}
body {
min-height: 100vh;
margin: 0;
padding: 0;
overflow: auto;
display: flex;
align-items: center;
}
video {
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -1;
transform: scale(1.1);
}
.hoverScale {
transition: all 0.3s ease-in-out;
}
.hoverScale:hover {
transform: scale(1.2);
}
footer a:hover {
text-decoration: none;
}
@media screen and (max-width: 991px){
#translateBtn {
transform: rotate(90deg);
}
}
</style>
</head>
<body class="text-light d-flex justify-content-center align-items-center">
<video src="bg.mp4" autoplay="autoplay" loop="loop"></video>
<div class="container">
<div class="row p-2">
<div class="col-12 col-md-10 rounded-4 p-3 p-md-5 justify-content-center mx-auto shadow-lg"
style="background-color: rgba(0, 0, 0, 0.3); backdrop-filter: blur(34px); border: 1px solid rgba(0, 0, 0, 0.35)">
<div class="row">
<h1 class="mx-auto w-auto fw-bolder">Morse Translator</h1>
</div>
<hr class="my-3 my-lg-4">
<!-- <div class="row mb-4 mb-lg-5">
<label for="" class="form-label">Choose an option</label>
<div class="row">
<div class="dropdown w-auto flex-grow-1 col-12 ">
<button class="btn btn-outline-primary dropdown-toggle w-100" type="button"
data-bs-toggle="dropdown" aria-expanded="false">
Translate to
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="">Convert to Morse</a></li>
<li><a class="dropdown-item" href="">Convert to Text</a></li>
</ul>
</div>
<div class="col-12 col-md-auto mt-2 mt-md-0">
<button class="btn btn-primary w-100 w-lg-auto">
<i class="fa-solid fa-language me-2"></i>
Translate
</button>
</div>
</div>
</div> -->
<div class="row gap-2 gap-lg-0">
<!-- text part -->
<div class="col-12 col-lg-5">
<label class="form-label">Text</label>
<textarea name=""
id="textArea" class="form-control"
placeholder="Write something here!" style="height: 8.5rem !important"></textarea>
<label for="#textArea"
class="form-label text-ellipsis text-dark "></label>
</div>
<!-- translate button -->
<div class="col-12 col-lg-2 d-flex justify-content-center align-items-center">
<div class="row gap-lg-3">
<div class="col-6 col-lg-12 ">
<div id="translateBtn"
data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Convert to Morse Code"
class="hoverScale row rounded-circle bg-primary align-items-center justify-content-center mx-auto"
onclick="convertToMorse(document.querySelector('#textArea').value)"
style="height: 3rem; width: 3rem;">
<i class="fa-solid fa-right-left"></i>
</div>
</div>
<div class="col-6 col-lg-12">
<div id="playBtn"
data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Play Morse Code"
class="hoverScale row rounded-circle bg-primary align-items-center justify-content-center mx-auto"
onclick="playMorse(document.querySelector('#morseArea').value)"
style="height: 3rem; width: 3rem;">
<i class="fa-solid fa-volume-high"></i>
</div>
</div>
</div>
</div>
<!-- morse part -->
<div class="col-12 col-lg-5 position-relative">
<div class="hoverScale position-absolute bg-primary rounded-circle d-flex justify-content-center align-items-center"
style="width: 3rem; height: 3rem; top: 0px; right: 0px; z-index: 1000;" id="copyMorse"
onclick="copyMorse(document.querySelector('#morseArea').value)"
data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Copied">
<i class="fa-regular fa-clipboard"></i>
</div>
<label class="form-label">Morse</label>
<textarea name="" id="morseArea" cols="30"
rows="5" class="form-control" placeholder="Click the button to copy the morse..."
disabled></textarea>
</div>
</div>
</div>
</div>
<footer class="row mt-4">
<div class="col-12 text-center">Made with 💝 by <a href="http://github.com/Alok-Sci"
class="text-light">Alok Singh</a>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/js/bootstrap.min.js"
integrity="sha512-WW8/jxkELe2CAiE4LvQfwm1rajOS8PHasCCx+knHG0gBHt8EXxS6T6tJRTGuDQVnluuAvMxWF4j8SNFDKceLFg=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="script.js"></script>
</body>
</html>