-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
114 lines (106 loc) · 5.04 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- responsive viewport meta tag -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Word counter App">
<title>Word Counter</title>
<!-- iSANDEx favicons -->
<link href="assets/img/isandex_favicon.png" rel="icon" >
<link href="assets/img/isandex_favicon.png" rel="apple-touch-icon">
<!-- JavaScript Bundle with Popper -->
<!-- Why javascript instead of css? Because the toggle functionality of the navbar is implemented in JS, not CSS -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2" crossorigin="anonymous"></script>
<!-- Bootstrap theme Spacelab () -->
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.css">
<!-- <link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css"> -->
<link rel="stylesheet" type="text/css" href="assets/css/styles.css">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container-fluid">
<a class="navbar-brand" href="https://isandex.com" target="_blank"><img alt="iSANDEx icon" src="assets/img/isandex_icon.png" height="40"></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor01">
<ul class="navbar-nav me-auto">
<li class="nav-item">
<a class="nav-link active" href="https://jlulloaa.github.io/count_words">
Home
<span class="visually-hidden">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/jlulloaa/count_words" target="_blank">
Repository
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/jlulloaa" target="_blank">
About
</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid main">
<div class="row-cols-auto" id="header"><!-- Header -->
<h1>Word Counter</h1>
<h2> A simple tool to count words occurrence in a text</h2>
</div>
<div class="row">
<div class="col-lg-1"></div>
<div class="col-lg-10">
<form>
<div class="form-group">
<label for="textArea" class="form-label mt-4">Area to add the text to process (or copy and paste from somewhere else):</label>
<textarea class="form-control" id="textArea" rows="3" style="height: 131px;"></textarea>
</div>
</form>
<br>
<div>
<button type="button" class="btn btn-primary" onclick="countWords()">Count Words</button>
<button type="button" class="btn btn-secondary" onclick="resetArea()">Reset Text Area</button>
</div>
</div>
<div class="col-lg-1"></div>
</div>
<br>
<div class="row">
<div class="col-lg-4"></div>
<div class="col-lg-4">
<ul class="list-group">
<li class="list-group-item d-flex justify-content-between align-items-center">
Count of words in the text:
<span class="badge bg-primary rounded-pill" id="countOfWords"></span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
Most repeated word:
<span class="badge bg-primary rounded-pill" id="mostRepeatedWord"></span>
</li>
</ul>
</div>
<div class="col-lg-4"></div>
</div>
<br>
<div class="row">
<div class="col-lg-4"></div>
<div class="col-lg-4" id="wordTableRoot"></div>
<div class="col-lg-4"></div>
</div>
<br>
<footer>
<div class="col">
<a href="https://github.com/jlulloaa/count_words/blob/main/LICENSE" target="_blank">
<img alt="GitHub" src="https://img.shields.io/github/license/jlulloaa/count_words?color=green&logo=github&style=social">
</a>
</div>
</footer>
</div>
<!-- Here the magic happens -->
<script src="assets/js/wordcount.js"></script>
</body>
</html>