-
Notifications
You must be signed in to change notification settings - Fork 28
[Mission4/이혜준] - Project_Notion_VanillaJS #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3/#4_leehyejun
Are you sure you want to change the base?
Changes from 1 commit
eb919f3
1136a51
869c953
5e652b6
270651a
1926a68
5ad629f
71610c3
47b7ffe
dc81dd1
b4219b6
3bb525a
3773b11
c4770e1
d1b8220
f51d1de
98adb9b
f50b874
8d6365a
2c21a36
dccbb2e
2d97090
eac8759
6b014c9
55024bd
c2e0a8e
7e81611
7f58224
125fdab
3626b12
d235f4f
49a1129
43c58c8
0c848c3
543653c
4189852
44b612e
c06f7e3
d712485
49c04ac
99b073d
486fc28
c979e6a
9d596b5
720e580
d1bb616
a19d4b3
3c87f90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,138 @@ | ||
| body { | ||
| margin: 0; | ||
|
|
||
| li { | ||
| list-style-type: none; | ||
| } | ||
|
|
||
| ul { | ||
| padding-left: 10px; | ||
| } | ||
| } | ||
|
|
||
| #app { | ||
| display: flex; | ||
| } | ||
|
|
||
| /* 사이드 바 */ | ||
|
|
||
| .posts-page { | ||
| background-color: #f3f3e3; | ||
| width: 15rem; | ||
| height: 100vh; | ||
| margin-right: 50px; | ||
| padding: 10px; | ||
|
|
||
| font-size: 15px; | ||
| background-color: #f7f6f3; | ||
| } | ||
|
|
||
| .post { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| align-items: center; | ||
|
|
||
| border-radius: 5px; | ||
| cursor: pointer; | ||
|
|
||
| &:hover { | ||
| background-color: #ebebea; | ||
|
|
||
| .button-group > button { | ||
| opacity: 1; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .button-group { | ||
| width: 50px; | ||
|
|
||
| & > button { | ||
| width: 20px; | ||
| height: 20px; | ||
| align-items: center; | ||
|
|
||
| background-color: #ebebea; | ||
| border: none; | ||
| border-radius: 5px; | ||
|
|
||
| font-size: 10px; | ||
| color: #676662; | ||
| line-height: 10px; | ||
| opacity: 0; | ||
|
|
||
| &:hover { | ||
| background-color: #dddddc; | ||
| cursor: pointer; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .toggle-button { | ||
| background: none; | ||
| border: none; | ||
| border-radius: 5px; | ||
| font-size: 20px; | ||
| cursor: pointer; | ||
|
|
||
| &:hover { | ||
| background-color: #dddddc; | ||
| } | ||
| } | ||
|
|
||
| .page-create { | ||
| width: 100%; | ||
| padding: 10px; | ||
|
|
||
| text-align: left; | ||
| background: none; | ||
| border: none; | ||
| border-top: 1px solid #dddddc; | ||
| border-radius: 5px; | ||
|
|
||
| font-size: 16px; | ||
| color: #767571; | ||
|
|
||
| cursor: pointer; | ||
|
|
||
| &:hover { | ||
| border-top-color: #ebebea; | ||
| background-color: #ebebea; | ||
| } | ||
| } | ||
|
|
||
| /* 에디터 */ | ||
|
|
||
| .editor { | ||
| display: flex; | ||
| flex-direction: column; | ||
|
|
||
| margin: 50px 10px 10px 10px; | ||
|
|
||
| * { | ||
| margin-bottom: 10px; | ||
| padding: 10px; | ||
|
|
||
| border: none; | ||
| border-radius: 8px; | ||
| outline: none; | ||
| background-color: none; | ||
|
|
||
| &:hover { | ||
| background-color: #f5f5f5; | ||
| transition: background-color 0.5s ease-in-out; | ||
| } | ||
|
|
||
| &:active { | ||
| background-color: #f5f5f5; | ||
| } | ||
| } | ||
|
|
||
| .title { | ||
| font-size: 30px; | ||
| font-weight: bold; | ||
| } | ||
|
|
||
| .content { | ||
| font-size: 15px; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,8 +21,8 @@ export default function Editor({ | |
| this.render = () => { | ||
| if (!isInitialize) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isInitialize 라는 별도의 변수를 두기보단, innerHTML이 비어있는지 여부로 체크도 가능할 것 같아요. |
||
| $editor.innerHTML = ` | ||
| <input type="text" name="title" style="width: 600px;" value="${this.state.title}" /> | ||
| <textarea name="content" style="width: 600px; height: 400px;">${this.state.content}</textarea> | ||
| <input class="title" type="text" name="title" style="width: 600px;" value="${this.state.title}" /> | ||
| <textarea class="content" name="content" style="width: 600px; height: 400px;">${this.state.content}</textarea> | ||
| `; | ||
|
|
||
| isInitialize = true; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 &를 이럴때 쓰는거네요..
저는 hover 효과 줄 때
.toggle-button:hover 이런식으로 하나를 또 만들었는데ㅋㅋㅋ 배워갑니당