Skip to content

Commit

Permalink
Restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
BenRichter committed Apr 3, 2018
1 parent d44f79a commit f1c9989
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

<script>
import sweetalert from 'sweetalert';
import TodoList from './components/TodoList';
import CreateTodo from './components/CreateTodo';
import TodoList from './components/ListView/_ListView';
import CreateTodo from './components/ListView/TodoCreate';
export default {
name: 'app',
Expand Down
5 changes: 1 addition & 4 deletions src/components/Todo.vue → src/components/ListView/Todo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<div class="ui centered card" :class="{ 'green' :todo.done }">
<!--yoda, ternary: :class="todo.done ? 'green' : 'red'" -->


<!--View Mode-->
<div class="content" v-show="!isEditing">
<div class="header">
Expand All @@ -19,7 +20,6 @@
</span>
</div>
</div>
<!-- Todo: add checkbox -->
<div class="ui bottom attached blue basic icon button" @click="completeTodo(todo)" v-show="!isEditing && !todo.done">
<i class="checkmark sign icon"></i>
Done
Expand All @@ -46,9 +46,6 @@
</button>
</div>




</div>
</template>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<div>
<p class="tasks">Completed Tasks: {{todos.filter(todo => {return todo.done === true}).length}}</p>
<p class="tasks">Pending Tasks: {{todos.filter(todo => {return todo.done === false}).length}}</p>

<todo @delete-todo="deleteTodo" @complete-todo="completeTodo" v-for="todo in todos" :todo.sync="todo"></todo>
</div>
</template>
Expand Down Expand Up @@ -41,9 +42,10 @@ export default {
};
</script>

<!--Scoped styles wont leak into other components -->
<style scoped>
p.tasks {
text-align: center;
}
p.tasks {
text-align: center;
}
</style>

0 comments on commit f1c9989

Please sign in to comment.