Skip to content
This repository has been archived by the owner on Oct 11, 2019. It is now read-only.

Commit

Permalink
Refactor the todo app.
Browse files Browse the repository at this point in the history
  • Loading branch information
zarahzachz committed Nov 8, 2018
1 parent a5ffc01 commit 0b9d20e
Show file tree
Hide file tree
Showing 40 changed files with 44 additions and 16,245 deletions.
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>novuember</title>

<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.7/semantic.min.css">
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.7/semantic.min.js"></script>
</body>
</html>
39 changes: 37 additions & 2 deletions src/components/TodoApp.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,49 @@
<template>
<div>Todo App here</div>
<div>
<todo-list v-bind:todos="todos"></todo-list>
<create-todo v-on:create-todo="addTodo"></create-todo>
</div>
</template>

<script>
import TodoList from './todo-components/TodoList';
import CreateTodo from './todo-components/CreateTodo';
export default {
name: 'TodoApp',
components: {
TodoList,
CreateTodo,
},
data() {
return {
todos: [{
title: 'Todo A',
project: 'Project A',
done: false,
}, {
title: 'Todo B',
project: 'Project B',
done: true,
}, {
title: 'Todo C',
project: 'Project C',
done: false,
}, {
title: 'Todo D',
project: 'Project D',
done: false,
}],
};
},
methods: {
addTodo(newTodo) {
this.todos.push(newTodo);
},
},
};
</script>

<style scoped>
</style>

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class='ui basic content center aligned segment'>
<button class='ui basic button icon' v-on:click="openForm" v-show="!isCreating">
<button class='ui basic button icon' v-on:click="openForm()" v-show="!isCreating">
<i class='plus icon'></i>
</button>
<div class='ui centered card' v-show="isCreating">
Expand All @@ -12,13 +12,13 @@
</div>
<div class='field'>
<label>Project</label>
<input type='text' ref='project' defaultValue="">
<input v-model="projectText" type='text' ref='project' defaultValue="">
</div>
<div class='ui two button attached buttons'>
<button class='ui basic blue button' v-on:click="sendForm()">
Create
</button>
<button class='ui basic red button' v-on:click="closeForm">
<button class='ui basic red button' v-on:click="closeForm()">
Cancel
</button>
</div>
Expand Down
File renamed without changes.
18 changes: 0 additions & 18 deletions to-do-app/.babelrc

This file was deleted.

9 changes: 0 additions & 9 deletions to-do-app/.editorconfig

This file was deleted.

5 changes: 0 additions & 5 deletions to-do-app/.eslintignore

This file was deleted.

50 changes: 0 additions & 50 deletions to-do-app/.eslintrc.js

This file was deleted.

17 changes: 0 additions & 17 deletions to-do-app/.gitignore

This file was deleted.

10 changes: 0 additions & 10 deletions to-do-app/.postcssrc.js

This file was deleted.

30 changes: 0 additions & 30 deletions to-do-app/README.md

This file was deleted.

41 changes: 0 additions & 41 deletions to-do-app/build/build.js

This file was deleted.

54 changes: 0 additions & 54 deletions to-do-app/build/check-versions.js

This file was deleted.

Binary file removed to-do-app/build/logo.png
Binary file not shown.
Loading

0 comments on commit 0b9d20e

Please sign in to comment.