Skip to content

Commit

Permalink
Styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Richter committed Apr 7, 2018
1 parent f1c9989 commit c0f9dc5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "todo-app",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "Jeremy Kithome <[email protected]>",
"author": "Ben Richter <[email protected]>",
"private": true,
"scripts": {
"start": "parcel index.html",
Expand Down
15 changes: 12 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
<template>
<div id="app">
<h1 class="ui dividing centered header">VueDO</h1>
<div class='ui three column centered grid'>
<div class='column'>
<div class='ui centered grid'>
<div class='twelve wide mobile eight wide tablet six wide computer column'>

<h2 class="ui dividing header">
<i class="check square outline icon"></i>
<div class="content">
VueDO
<div class="sub header">Vue2 basic demo</div>
</div>
</h2>

<todo-list :todos="todos"></todo-list>
<create-todo @create-todo="createTodo"></create-todo>

</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ListView/Todo.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="ui centered card" :class="{ 'green' :todo.done }">
<div class="ui fluid card" :class="{ 'green' :todo.done }">
<!--yoda, ternary: :class="todo.done ? 'green' : 'red'" -->


Expand Down
12 changes: 9 additions & 3 deletions src/components/ListView/_ListView.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<template>
<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 class="four column centered row">
<p class="column tasks">Completed Tasks: {{todos.filter(todo => {return todo.done === true}).length}}</p>
<p class="column tasks">Pending Tasks: {{todos.filter(todo => {return todo.done === false}).length}}</p>
</div>

<todo @delete-todo="deleteTodo"
@complete-todo="completeTodo"
v-for="(todo, index) in todos" :key="index"
:todo.sync="todo" />
</div>
</template>

Expand Down

0 comments on commit c0f9dc5

Please sign in to comment.