-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
203 lines (182 loc) · 10.2 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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> JavaScript Algorithms | Menu </title>
<!--CSS-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="css/main.css">
<!--ICONS-->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.10.2/css/all.css"/>
</head>
<body>
<div class = "container">
<div class="jumbotron">
<h1 class="display-4"> JavaScript Algorithms </h1>
<p class="lead" id="description"> Algorithms: Name Swap, Palindrome, Reverse String, Repeat String </p>
<hr class="my-4">
<p class="by"> By YunaAnn </p>
<a target="_blank" rel="noopener noreferrer" href="https://github.com/YunaAnn/JavaScriptAlgorithms"><button type="button" class="btn btn-dark btn-lg"> Code </button></a>
<a target="_blank" rel="noopener noreferrer" href="https://github.com/YunaAnn"><button type="button" class="btn btn-outline-dark btn-lg"> Github profile </button></a>
</div>
</div>
<div class="white-container">
<div class = "container">
<div class="algorithms">
<div class="row">
<div class="col-sm-4">
<div class="example">
<h1 class="display-4"> Reverse String </h1>
<h3 class="lead"> EXAMPLE </h3>
<h6> cat -> tac </h6>
<h6> lovely -> ylevol </h6>
</div>
<div class="row">
<div class="col-12">
<input class="form-control form-control-lg" type="text" id="reverseString" name="reverseString">
</div>
</div>
<button id="btn-space" onclick="reverseString()" class="btn btn-outline-info btn-lg"> Reverse! </button>
<p class="lead"> RESULT </p>
<strong id="reverseStringResult"> ------------ </strong>
</div>
<div class="col-sm-4">
<div class="example">
<h1 class="display-4"> Alphabetize String </h1>
<h3 class="lead"> EXAMPLE </h3>
<h6> cat -> act </h6>
<h6> rain -> ainr </h6>
</div>
<div class="row">
<div class="col-12">
<input class="form-control form-control-lg" type="text" id="alphabetizeString" name="alphabetizeString">
</div>
</div>
<button id="btn-space" onclick="alphabetizeString()" class="btn btn-outline-info btn-lg"> Alphabetize! </button>
<p class="lead"> RESULT </p>
<strong id="alphabetizeStringResult"> ------------ </strong>
</div>
<div class="col-sm-4">
<div class="example">
<h1 class="display-4"> Repeat String </h1>
<h3 class="lead"> EXAMPLE </h3>
<h6> cat, 5 -> catcatcatcatcat </h6>
<h6> rain, 4' -> rainrainrainrain </h6>
</div>
<div class="row">
<div class="col-8">
<input class="form-control form-control-lg" type="text" id="repeatStringString" name="repeatStringString">
</div>
<div class="col-4">
<input class="form-control form-control-lg" type="number" min="1" step="1" id="repeatStringNumber" name="repeatStringNumber">
</div>
</div>
<button id="btn-space" onclick="repeatString()" class="btn btn-outline-info btn-lg"> Repeat! </button>
<p class="lead"> RESULT </p>
<strong id="repeatStringResult"> ------------ </strong>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="example">
<h1 class="display-4"> Name Swap </h1>
<h3 class="lead"> EXAMPLE </h3>
<h6> Doe Jane -> Jane Doe </h6>
<h6> Nowak Jan -> Jan Nowak </h6>
</div>
<div class="row">
<div class="col-12">
<input class="form-control form-control-lg" type="text" id="nameSwap" name="nameSwap">
</div>
</div>
<button id="btn-space" onclick="nameSwap()" class="btn btn-outline-info btn-lg"> Swap! </button>
<p class="lead"> RESULT </p>
<strong id="swapNameResult"> ------------ </strong>
</div>
<div class="col-sm-8">
<div class="example">
<h1 class="display-4"> Palindrome </h1>
<h3 class="lead"> EXAMPLE PALIDROMES </h3>
<h6> Never odd or even </h6>
<h6> Do geese see God? </h6>
</div>
<div class="row">
<div class="col-12">
<input class="form-control form-control-lg" type="text" id="palindrome" name="palindrome">
</div>
</div>
<button id="btn-space" onclick="palindrome()" class="btn btn-outline-info btn-lg"> Is palindrome? </button>
<p class="lead"> RESULT (true/false) </p>
<strong id="palindromeResult"> ------------ </strong>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="example">
<h1 class="display-4"> Find the Longest String </h1>
<h3 class="lead"> EXAMPLE </h3>
<h6> 1. Hello, what's up? -> Hello </h6>
<h6> 2. I like trains :3 -> trains </h6>
</div>
<div class="row">
<div class="col-12">
<input class="form-control form-control-lg" type="text" id="findTheLongestStringInput" name="findTheLongestStringInput">
</div>
</div>
<button id="btn-space" onclick="findTheLongestString()" class="btn btn-outline-info btn-lg"> Find the Longest String! </button>
<p class="lead"> RESULT </p>
<strong id="findTheLongestStringResult"> ------------ </strong>
</div>
<div class="col-sm-4">
<div class="example">
<h1 class="display-4"> Find the Largest Value </h1>
<h3 class="lead"> EXAMPLE </h3>
<h6> 1. 1,3,10,4,6,7,8 -> 10 </h6>
<h6> 2. 302,17,35,66,100,1 -> 302 </h6>
</div>
<div class="row">
<div class="col-12">
<input class="form-control form-control-lg" type="text" id="findTheLargestElementInput" name="findTheLargestElementInput">
</div>
</div>
<button id="btn-space" onclick="findTheLargestElement()" class="btn btn-outline-info btn-lg"> Find the Largest Value! </button>
<p class="lead"> RESULT </p>
<strong id="findTheLargestElementResult"> ------------ </strong>
</div>
<div class="col-sm-4">
<div class="example">
<h1 class="display-4"> Find the Smallest Value </h1>
<h3 class="lead"> EXAMPLE </h3>
<h6> 1. 1,3,10,4,6,7,8 -> 1 </h6>
<h6> 2. 302,17,35,66,100,1 -> 1 </h6>
</div>
<div class="row">
<div class="col-12">
<input class="form-control form-control-lg" type="text" id="findTheSmallestElementInput" name="findTheSmallestElementInput">
</div>
</div>
<button id="btn-space" onclick="findTheSmallestElement()" class="btn btn-outline-info btn-lg"> Find the Smallest Value! </button>
<p class="lead"> RESULT </p>
<strong id="findTheSmallestElementResult"> ------------ </strong>
</div>
</div>
</div>
</div>
</div>
<div class = "container">
<div class="row">
<div class="col-4">
</div>
<div class="col-4">
<div class="contact">
<h4>by YunaAnn</h4>
<a target="_blank" rel="noopener noreferrer" href="https://github.com/YunaAnn/JavaScriptAlgorithms"> <i class="fas fa-code"></i></a>
<a target="_blank" rel="noopener noreferrer" href="https://github.com/YunaAnn"><i class="fab fa-github" style="padding-left:10px"></i></a>
</div>
</div>
</div>
<!--JS-->
<script src="algorithms.js"></script>
</body>
</html>