-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
36 lines (34 loc) · 1.48 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Huffman Encoding</title>
<link rel="shortcut icon" href="./assets/favicon-adachi.png">
<link rel="stylesheet" href="./style.css">
<script src="./script.js" defer></script>
</head>
<body>
<div class="container">
<!-- ENCODE WRAPPER -->
<div class="encode-wrapper">
<textarea name="input" class="input" id="input-message" cols="10" rows="8" placeholder="Enter message you want to encode"></textarea>
<button id="encode-btn" class="btn" type="button">Encode</button>
<h5>Click to Copy (Encoded Text) <span id="compare"></span></h5>
<p id="encoded-text"></p>
<h5>Click to Copy (Huffman Tree)</h5>
<p id="huffman-tree"></p>
</div>
<!-- DECODE WRAPPER -->
<div class="decode-wrapper">
<textarea name="input" class="input" id="input-encode" cols="10" rows="8" placeholder="Enter Encoded Text"></textarea>
<textarea name="input" class="input" id="input-hf-tree" cols="10" rows="5" placeholder="Enter Huffman Tree"></textarea>
<button id="decode-btn" class="btn" type="button">Decode</button>
<h5>Click to Copy (Decoded Text)</h5>
<p id="decoded-text"></p>
<a id="sc" href="https://github.com/0xAdachi/Huffman_Encoding/blob/main/script.js" target="_blank">Click to view source code</a>
</div>
</div>
<div id="toast" class="hide">Text Copied !</div>
</body>
</html>