-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathresources.html
95 lines (83 loc) · 2.69 KB
/
resources.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="switch">Dark mode:
<span class="inner-switch" >OFF</span>
</div>
<table class="table table-stripped mt-5">
<thead>
<tr>
<th>Title</th>
<th>Author</th>
<th>Links</th>
<th>Date</th>
<th></th>
</tr>
</thead>
<tbody id="resource-list">
</tbody>
</table>
<button class="btn btn-primary btn-block" onclick="clearlist()" >Clear List </button>
<button class="btn btn-info ChangeButton" onclick="GoBack()">Click me to go back</button>
<script src="book.js"></script>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script src="script.js"></script>
</body>
=======
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
</head>
<body>
<table class="table table-stripped mt-5">
<thead>
<tr>
<th>Title</th>
<th>Author</th>
<th>Links</th>
<th>Date</th>
<th></th>
</tr>
</thead>
<tbody id="resource-list">
</tbody>
</table>
<button id="btnChangeBg" class="btn btn-primary btn-block" onclick="clearlist()" >Clear List </button>
<button class="btn btn-info ChangeButton" onclick="GoBack()">Click me to go back</button>
<script>
document.querySelector('#btnChangeBg').addEventListener('click', () => {
var x = document.getElementById("resource-list").rows.length;
if (x == 0) {
// empty
$('#btnChangeBg').attr('disabled','disabled');
}
else{
Confirm.open({
title: 'Clear List',
message: 'Are you sure you want to delete?',
onok: () => {
localStorage.clear();
update();
}
})
}
});
</script>
<script src="book.js"></script>
<script type="text/javascript" src="confirmation.js"></script>
</div>
</body>
</html>