-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
118 lines (113 loc) · 5.59 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
<!doctype html>
<html lang="js">
<head>
<title>Vue.sの練習-ToDoアプリ</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS v5.2.0-beta1 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
<!--CSSの読み込み-->
<link rel="stylesheet" href="CSS/style.css">
<!--Vue.jsのインストール-->
<script src="https://unpkg.com/vue@next"></script>
</head>
<body>
<header>
<h1>ToDoアプリ</h1>
<!-- place navbar here -->
</header>
<main>
<div id="app">
<div class="new-todo">
<div class="new-todo-item">
<label for="new-todo-title">タイトル</label>
<input type="text" v-model="todoTitle" id="new-todo-title">
</div>
<div class="new-todo-item">
<label for="new-todo-description">説明</label>
<textarea v-model="todoDescription" id="new-todo-description"></textarea>
</div>
<div class="new-todo-category">
カテゴリ
<ul>
<li v-for="category in categories" :key="category">
<label for="'category-' + category">
<input type="checkbox" v-model="todoCategories" :id="'category-'+category" :value="category" form="form-todo">{{ category }}
</label>
</li>
</ul>
<form @submit.prevent="createCategory">
<input type="text" v-model.trim="categoryName">
<button type="submit" :disabled="!canCreateCategory">作成</button>
</form>
</div>
<div class="new-todo-action">
<form id="form-todo" @submit.prevent="createTodo">
<button type="submit" :disabled="!canCreateTodo">作成</button>
</form>
</div>
</div>
<div>
<div class="todo-search">
<div class="todo-search-item">
<label for="todo-search-category">カテゴリでフィルタ</label>
<select v-model="selectedCategory" id="todo-search-category">
<option value="">指定なし</option>
<option value="" v-for="category in categories" :key="category" :value="category">{{
category }}</option>
</select>
</div>
<div class="todo-search-item">
<label for="todo-search-done">終了したものを非表示にする<input type="checkbox" id="todo-search-done"
v-model="hideDoneTodo"></label>
</div>
<div class="todo-search-item">
<select v-model="order">
<option value="desc">降順</option>
<option value="asc">昇順</option>
</select>
</div>
<div class="todo-search-item">
<label for="todo-search-keyword">キーワードで検索</label>
<input type="text" v-model="searchWord" id="todo-search-keyword">
</div>
</div>
<ul v-if="hasTodos" class="todo-list">
<!--ここにTodoタスクの一覧を出力します-->
<li v-for="(todo, index) in resultTodos" :key="todo.id" class="todo-item">
<div class="todo-item-done">
<input type="checkbox" v-model="todo.done">
</div>
<div class="todo-item-content">
<div class="todo-item-date">{{ new Date(todo.dateTime).toString() }}</div>
<h3 class="todo-item-title">{{ todo.title }}</h3>
<div class="todo-item-description" v-if="todo.description">
{{ todo.description }}
</div>
<ul class="todo-item-categories" v-if="todo.categories.length > 0">
<li v-for="category in todo.categories" :key="category" class="todo-item-category">
{{ category }}
</li>
</ul>
</div>
</li>
</ul>
<p v-else>タスクはまだ登録されていません</p>
</div>
</div>
</main>
<footer>
<!-- place footer here -->
</footer>
<script src="app.js"></script>
<!-- Bootstrap JavaScript Libraries -->
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
integrity="sha384-Xe+8cL9oJa6tN/veChSP7q+mnSPaj5Bcu9mPX5F5xIGE0DVittaqT5lorf0EI7Vk" crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"
integrity="sha384-ODmDIVzN+pFdexxHEHFBQH3/9/vQ9uori45z4JjnFsRydbmQbmL5t1tQ0culUzyK" crossorigin="anonymous">
</script>
</body>
</html>