From 5a985207f5e529c26fea985ae41f68aa8545b588 Mon Sep 17 00:00:00 2001 From: soonysoo Date: Tue, 6 Jul 2021 21:33:23 +0900 Subject: [PATCH 01/11] =?UTF-8?q?=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8=20?= =?UTF-8?q?=EA=B5=AC=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 23 ----------------------- index.html | 10 ++++++---- src/app.js | 7 +++++++ src/components/Filter.js | 0 src/components/InputTodo.js | 0 src/components/TodoList.js | 0 src/core/component.js | 22 ++++++++++++++++++++++ src/main.js | 3 +++ 8 files changed, 38 insertions(+), 27 deletions(-) create mode 100644 src/app.js create mode 100644 src/components/Filter.js create mode 100644 src/components/InputTodo.js create mode 100644 src/components/TodoList.js create mode 100644 src/core/component.js create mode 100644 src/main.js diff --git a/README.md b/README.md index 24e05bed..418ace67 100644 --- a/README.md +++ b/README.md @@ -109,27 +109,4 @@ live-server ํด๋”๋ช…
-## ๐Ÿ’ฌ 1์ฃผ์ฐจ ๋ฏธ์…˜ ํ›„๊ธฐ ๋ธ”๋กœ๊ทธ -์•„๋ž˜ ๋งํฌ๋Š” 1์ฃผ์ฐจ ๋ฏธ์…˜์„ ์ง„ํ–‰ํ•˜๋ฉด์„œ ๋ธ”๋กœ๊ทธ๋ฅผ ์ž‘์„ฑํ•ด์ฃผ์‹  ๋ถ„๋“ค์˜ ๊ธ€์ž…๋‹ˆ๋‹ค. ๋ฏธ์…˜์„ ์ง„ํ–‰ํ•˜๋ฉด์„œ, ๋‹ค๋ฅธ ๋ถ„๋“ค์˜ ๋ฌธ์ œ ํ•ด๊ฒฐ ๊ณผ์ •์ด ๊ถ๊ธˆํ•˜๋‹ค๋ฉด ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š” ๐Ÿ˜„ -- [1์ฃผ์ฐจ ๋ฏธ์…˜ํ›„๊ธฐ](https://www.notion.so/1-2-8b624729fbce4174b8b583efb10c3200) -- [๋ธ”๋ž™์ปคํ”ผ ํ”„๋ก ํŠธ์—”๋“œ ์Šคํ„ฐ๋”” ๋ ˆ๋ฒจ1 ํ›„๊ธฐ](https://yujo11.github.io/%EB%B8%94%EB%9E%99%EC%BB%A4%ED%94%BC/%EB%B8%94%EB%9E%99%EC%BB%A4%ED%94%BC-%ED%94%84%EB%A1%A0%ED%8A%B8%EC%97%94%EB%93%9C-%EC%8A%A4%ED%84%B0%EB%94%94-%EB%A0%88%EB%B2%A81-%ED%9B%84%EA%B8%B0/) -- [๋ธ”๋ž™์ปคํ”ผ ํ”„๋ก ํŠธ์—”๋“œ ์Šคํ„ฐ๋”” ํšŒ๊ณ ](https://www.notion.so/bffb14daea984293a954ac7cdb4f7c1e) - -
- -## ๐Ÿ‘๐Ÿผ Contributing - -๋งŒ์•ฝ ๋ฏธ์…˜ ์ˆ˜ํ–‰ ์ค‘์— ๊ฐœ์„ ์‚ฌํ•ญ์ด ํ•„์š”ํ•˜๋‹ค๋ฉด, ์–ธ์ œ๋“  ์ž์œ ๋กญ๊ฒŒ PR์„ ๋ณด๋‚ด์ฃผ์„ธ์š”. - -
- -## ๐Ÿž Bug Report - -๋ฒ„๊ทธ๋ฅผ ๋ฐœ๊ฒฌํ•œ๋‹ค๋ฉด, [Issues](https://github.com/next-step/js-todo-list-step1/issues)์— ๋“ฑ๋กํ•ด์ฃผ์„ธ์š”. - -
- -## ๐Ÿ“ License - -This project is [MIT](https://github.com/next-step/js-todo-list-step1/blob/main/LICENSE) licensed. diff --git a/index.html b/index.html index 13a02fdb..7a005ac7 100644 --- a/index.html +++ b/index.html @@ -3,12 +3,12 @@ - ์ด๋ฒคํŠธ - TODOS + TODOS -
-

TODOS

+
+
+ + diff --git a/src/app.js b/src/app.js new file mode 100644 index 00000000..fc69af9b --- /dev/null +++ b/src/app.js @@ -0,0 +1,7 @@ +import Component from "./core/component.js"; + +class App extends Component{ + +} + +export default App; \ No newline at end of file diff --git a/src/components/Filter.js b/src/components/Filter.js new file mode 100644 index 00000000..e69de29b diff --git a/src/components/InputTodo.js b/src/components/InputTodo.js new file mode 100644 index 00000000..e69de29b diff --git a/src/components/TodoList.js b/src/components/TodoList.js new file mode 100644 index 00000000..e69de29b diff --git a/src/core/component.js b/src/core/component.js new file mode 100644 index 00000000..7ba00fc9 --- /dev/null +++ b/src/core/component.js @@ -0,0 +1,22 @@ +export default class Component { + $target; + $props; + $state; + constructor ($target, $props) { + this.$target = $target; + this.$props = $props; + this.setup(); + this.setEvent(); + this.render(); + } + setup () {}; + template () { return ''; } + render () { + this.$target.innerHTML = this.template(); + } + setEvent () {} + setState (newState) { + this.$state = { ...this.$state, ...newState }; + this.render(); + } + } \ No newline at end of file diff --git a/src/main.js b/src/main.js new file mode 100644 index 00000000..25647d64 --- /dev/null +++ b/src/main.js @@ -0,0 +1,3 @@ +import App from './App.js'; + +new App(document.querySelector('#todoapp')); \ No newline at end of file From 24ef8da7941abfabd2b52ce32cb17188a380fae7 Mon Sep 17 00:00:00 2001 From: soonysoo Date: Tue, 6 Jul 2021 23:14:25 +0900 Subject: [PATCH 02/11] =?UTF-8?q?App=20component=20=EA=B5=AC=EC=A1=B0?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TodoList.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/TodoList.js b/src/components/TodoList.js index e69de29b..0ec429a8 100644 --- a/src/components/TodoList.js +++ b/src/components/TodoList.js @@ -0,0 +1 @@ +import Component from "../core/component.js"; \ No newline at end of file From 083007daa5cdff585b2258b22b97095eeddcf933 Mon Sep 17 00:00:00 2001 From: soonysoo Date: Tue, 6 Jul 2021 23:14:41 +0900 Subject: [PATCH 03/11] =?UTF-8?q?App=EA=B5=AC=EC=A1=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 29 +++++++++++++++++++++++++-- src/app.js | 40 ++++++++++++++++++++++++++++++++++++- src/components/Filter.js | 1 + src/components/Input.js | 1 + src/components/InputTodo.js | 0 src/core/component.js | 5 +++++ src/main.js | 2 +- 7 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 src/components/Input.js delete mode 100644 src/components/InputTodo.js diff --git a/index.html b/index.html index 7a005ac7..275c69a6 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ -
+