-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
102 lines (86 loc) · 5.18 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="theme.css">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<title>To Do</title>
</head>
<body>
<div class="container-fluid pt-4" id="app">
<div class="modal fade" id="modalBox" tabindex="-1" aria-labelledby="modalBoxLabel" aria-hidden="true">
<div class="modal-dialog">
<form @submit.prevent="enterPath">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modalBoxLabel">Custom Image</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p v-if="urlError" class="red">{{urlError}}</p>
<p>Use a custom image background and the app theme will adapt to it. <br><b>[Experimental]</b></p>
<label for="urlEnter">Enter URL:</label>
<input @input="urlInputFunc" v-model="urlInput" class="input-control" type="text" name="" id="urlEnter" >
<!--<br><br> OR <br>
<input class="input-control" type="file" name="" id="fileEnter" :disabled="urlInput.length!=0">-->
</div>
<div class="modal-footer">
<button id="url-button" type="submit" class="btn btn-outline-primary" :disabled="urlError.length!=0">Submit</button>
</div>
</div>
</form>
</div>
</div>
<div class="row">
<div class="col">
<h1 class="display-5"><mark>Todo</mark> List</h1>
</div>
<div class="col mt-3">
<div class="btn-toolbar float-end">
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle btn-inline" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
<i class="fa fa-cog"></i>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
<li><h6 class="dropdown-header">Sort By</h6></li>
<li><a @click="sortByPriority" class="dropdown-item" href="#">Priority</a></li>
<li><a @click="sortByDate" class="dropdown-item" href="#">Date</a></li>
<li><h6 class="dropdown-header">Experimental Settings</h6></li>
<li><a @click="urlError = ''" class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#modalBox">Change theme</a></li>
<li><hr class="dropdown-divider"></li>
<li><a @click="clearTodos" class="dropdown-item red" href="#">Delete All</a></li>
</ul>
</div>
</div>
</div>
</div>
<hr>
<todo-item
v-for="(item, index) in todos"
v-bind:item="item"
v-bind:index="index"
v-on:toggle-check="toggleCheck($event)"
v-on:del="del($event)"
></todo-item>
<form @submit.prevent="addTodo" id="form" v-if="openForm">
<div class="form">
<input v-model="newTitle" type="text" class="form-control form-control px-1" placeholder="Add item" required>
<input v-model="newDate" type="date" class="form-control form-control px-1" placeholder="Date" id="input-date" required>
<input v-model="newPriority" type="number" min="1" max="4" class="form-control form-control-sm px-1" placeholder="Priority" id="input-priority" required>
</div>
<button id="postButton" class="btn btn-danger addTask" v-if="openForm" type="submit"><i class="fa fa-paper-plane"></i></button>
</form>
<button id="addButton" @click="openForm = true" class="btn btn-success addTask" v-if="!openForm"><i class="fa fa-plus"></i></button>
</div>
<footer class="bg-dark text-center text-white container-sm py-1 fixed-bottom">
<span class="lead">Made with <i class="fa fa-heart"></i> by <a href="https://silv3rh4t.github.io">Akhand Yaduvanshi</a></span>
</footer>
</body>
<script src="vibrant.min.js"></script>
<script src="vue.js"></script>
</html>