forked from c4cs-2/c4cs-2.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
git2assignments.html
54 lines (42 loc) · 1.2 KB
/
git2assignments.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
---
layout: default
---
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
{% assign data=site.data.git2 %}
<div class="container">
<!-- Search -->
<input class="form-control" id="searchInput" type="text" placeholder="Search..">
<br>
<!-- Table -->
<table class="table table-striped table-hover">
<thead class="thead-light">
<tr>
{% for column in data[0] %}
<th scope="col">{{ column[0] }}</th>
{% endfor %}
</tr>
</thead>
<tbody id="git2Table">
{% for row in data %}
<tr>
{% for cell in row %}
<td>{{ cell[1] }}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
<br><br><br>
</div>
<!-- Search JS -->
<script>
$(document).ready(function(){
$("#searchInput").on("keyup", function() {
var value = $(this).val().toLowerCase();
$("#git2Table tr").filter(function() {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
});
});
});
</script>