-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathindex.html
172 lines (148 loc) · 6.05 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="icon" href="notes1.png">
<title>Notes App</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
<link rel="stylesheet" href="style.css" />
</head>
<style>
:root {
--bg: rgb(137, 144, 158);
--bg-input: #141419;
}
:root{
--bg:linear-gradient(to top right, #363690 41%, #3ec7f5 100%);
--bg-input: #e1e1ed;
}
/* light mode edited */
.light-mode {
--bg: linear-gradient(to left, #2a2d30, #080a0c);
--bg-input: #fcf9f9;
}
body {
background: var(--bg);
color: var(--color-text);
/*font-weight: 500;
display: flex;*/
}
.switch {
position: absolute;
margin-left: -9999px;
visibility: hidden;
}
.switch+label {
display: block;
position: relative;
cursor: pointer;
outline: none;
user-select: none;
}
.switch+label {
padding: 2px;
width: 52px;
height: 27px;
background-color: var(--color-border), rgba(23, 21, 21, 0.3);
border-radius: 100px;
}
.switch+label:before,
.switch+label:after {
display: block;
position: absolute;
top: 1px;
left: 1px;
bottom: 1px;
content: "";
}
.switch+label:before {
right: 1px;
background-color: var(--bg-input);
border-radius: 60px;
transition: all 0.4s;
}
.switch+label:after {
width: 30px;
background-color: #fff;
border-radius: 100%;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
transition: all 0.4s;
}
.switch:checked+label:before {
background-color: #f3eff5;
}
.switch:checked+label:after {
transform: translateX(30px);
}
</style>
<body>
<div class="container" id="header">
<img src="notes.png" alt="My Notes" id="Image1">
<h1 style="color: rgb(162, 240, 255); margin: 10px; margin-left: 10rem;">Welcome To Magic Notes</h1>
</div>
<div class="container my-3">
<label for="switch">
<input type="checkbox" id="switch" class="switch">
<label for="switch"></label>
</label>
<h2 style="color: whitesmoke;">Enable Dark Mode</h2>
<script>
const $html = document.querySelector("html");
const $checkbox = document.querySelector("#switch");
$checkbox.addEventListener("change", function() {
$html.classList.toggle("light-mode");
});
</script>
<div class="card">
<div class="card-body">
<form>
<div class="form-group">
<label for="addTitle">Please add your note title</label>
<input type="text" class="form-control note-title" id="addTitle" placeholder="Enter note title">
</div>
<div class="form-group">
<label for="addTxt">Please add your notes</label>
<textarea class="form-control note-textarea" id="addTxt" rows="3" placeholder="Enter your notes here"></textarea>
</div>
<button class="btn btn-primary" id="addBtn">Add Note</button>
</form>
</div>
</div>
<h2 style="color: rgb(162, 240, 255);">Your Notes</h2>
<div class="filter-div">
<label for="sortNotesDropdown" style="color: white;">Sort notes by:</label>
<select id="sortNotesDropdown" onchange="sortNotes(this.value)">
<option value="dateAsc">Date Ascending</option>
<option value="dateDesc">Date Descending</option>
<option value="importance">Importance</option>
<option value="wordCount">Word Count</option>
</select>
<div class="search-bar">
<label for="search" style="color: white;">Search</label>
<input type="search" id="search" class="form-control note-search">
</div>
</div>
<div id="notes" class="notes row container-fluid"></div>
<div id="emptyFormToast">Note is empty!</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="js/app.js"></script>
<script src="javascript.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="javascript.js"></script>
</div>
</body>
</html>