forked from tatthien-zz/vue-todo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
87 lines (78 loc) · 3.16 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="dist/css/font-awesome.min.css">
<link rel="stylesheet" href="dist/css/style.css">
<title>Todo list</title>
</head>
<body>
<div id="app" class="container">
<div class="todo-wrapper">
<todo-header></todo-header>
<div class="todo-content">
<todo-report></todo-report>
<todo-list :collection="listState.items"></todo-list>
</div>
</div>
</div>
<!-- Todo Header -->
<template id="todo-header">
<div class="todo-header">
<div class="overlay"></div>
<time class="clearfix">
<span class="day">{{ date }}</span>
<span class="dayofweek">{{ weekDay }}</span>
<span class="month">{{ month }}, {{ year }}</span>
</time>
<div class="add-circle" @click="add">
<i class="fa fa-plus"></i>
</div>
</div>
</template>
<!-- Todo Report -->
<template id="todo-report">
<div class="todo-content-title">
<h2>Your tasks</h2>
<p class="task-report"><span class="task-remain">{{ taskDone }} done</span> / {{ taskTotal }} task(s)</p>
</div>
</template>
<!-- Todo List -->
<template id="todo-list">
<ul class="todo-list">
<todo-item v-for="item in collection" :model="item"></todo-item>
</ul>
</template>
<!-- Todo Item -->
<template id="todo-item">
<li class="todo-item" :class="{'editing': model.isEditing, 'task-done': isDone}">
<span @click="showLabel" class="label {{ model.label }}">
<ul class="action-pick-label action-popup">
<li @click="saveLabel('urgent')" class="important">Important</li>
<li @click="saveLabel('normal')" class="normal">Normal</li>
<li @click="saveLabel('other')" class="other">Whatever</li>
</ul>
</span>
<p class="text" v-if="model.isEditing">
<input type="text" v-model="tempText" placeholder="Type a new task and hit enter" @keyup.enter="save">
</p>
<p class="text" v-if="model.isEditing == false">{{ model.text }}</p>
<!-- Task action -->
<div class="todo-action" @click="showAction" v-if="model.isEditing == false || model.isEditing == null">
<span class="more">
<span></span><span></span><span></span>
</span>
<ul class="action-list action-popup">
<li @click="markDone" v-if="!isDone">Mark done</li>
<li @click="edit" v-if="!isDone">Edit</li>
<li @click="delete">Delete</li>
</ul>
</div>
</li>
<!-- End .task-action -->
</template>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.24/vue.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="dist/js/script.js"></script>
</body>
</html>