Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ee30340
Feat : 1단계 계산기 만들기
kwonminjae5700 Jul 29, 2024
643c4d0
Feat : 2단계 함수로 분리하기
kwonminjae5700 Jul 29, 2024
5b9a7cb
Fix : 2단계 함수로 분리하기
kwonminjae5700 Aug 1, 2024
4928cc5
Feat : 3단계 객체 사용해보기
kwonminjae5700 Aug 1, 2024
18cbe40
Feat : 4단계 화살표 함수 익히기
kwonminjae5700 Aug 1, 2024
2b28aa9
Feat : 권민재만 사용할 수 있는 커피 카페
kwonminjae5700 Aug 1, 2024
3ac2cdb
Feat : main 개발 시작
kwonminjae5700 Aug 1, 2024
7840a7e
사진 추가
kwonminjae5700 Aug 1, 2024
7f13381
Feat : 당일 날짜 기능 추가
kwonminjae5700 Aug 1, 2024
17e8faf
Feat : 전체 css 개발 시작
kwonminjae5700 Aug 1, 2024
dbafe12
Fix : 조건부 렌더링 에러 수정
kwonminjae5700 Aug 2, 2024
402b0c5
Feat : 일정 추가 기능 개발
kwonminjae5700 Aug 2, 2024
fb1d54c
Feat : 일정 개수 변경 tasks 개발
kwonminjae5700 Aug 2, 2024
e5263ae
Fix : 성공 삭제 버튼 위치 오류 수정
kwonminjae5700 Aug 3, 2024
d803064
Style : 성공 삭제 버튼 div -> button 수정
kwonminjae5700 Aug 3, 2024
070e73a
Feat : 일정 삭제 기능 개발
kwonminjae5700 Aug 3, 2024
a818487
Fix : 일요일에 undefined 가 뜨는 오류 해결
kwonminjae5700 Aug 3, 2024
32fe770
사진 추가
kwonminjae5700 Aug 3, 2024
253e2fd
Feat : success 버튼 눌렀을 때 체크표시 뜨는 기능 개발
kwonminjae5700 Aug 3, 2024
fe9702d
Feat : 일정 수정 기능 개발
kwonminjae5700 Aug 3, 2024
401957f
Fix : 일정이 많을 때 일정 수정이 안 되는 오류 수정
kwonminjae5700 Aug 3, 2024
3fdc19e
Fix : 일정 수정 중 공백 예외 처리문 개발
kwonminjae5700 Aug 4, 2024
b779fda
Style : width height 상대 단위로 변경
kwonminjae5700 Aug 4, 2024
f30e470
Refactor : 상대 단위로 모두 변경 & 단위 통일
kwonminjae5700 Aug 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion practice/practice1.js
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
// Mission 1
let calculate = (n1, op, n2) => {
let result

n1 = parseInt(prompt())
op = prompt()
n2 = parseInt(prompt())

if(op == '+') result = n1 + n2
else if(op == '-') result = n1 - n2
else if(op == '*') result = n1 * n2
else if(op == '/') result = n1 / n2

alert(`${n1}${op}${n2}는 ${result}입니다.`)
}

calculate()
29 changes: 28 additions & 1 deletion practice/practice2.js
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
// Mission 2
let coffee = 10

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

과한 줄바꿈은 자제해주세요.



function cafe() {
let name = '권민재'
let temp = prompt("이름을 입력해주세요.")

if(temp === name) {
coffee > 0 ? alert("어서오세요!") : alert("장사 끝났습니다 ㅠㅠ")

let count = parseInt(prompt("몇잔 주문하실건가요?"), 10)

coffee - count >= 0 && (coffee -= count);

let op = !!coffee

if(!op) alert("마지막 손님이 되신 것을 축하드립니다!")

alert(`총 커피 ${coffee}잔 남았습니다!`)

}
else alert("이용하실 수 없습니다.")


}

cafe()
Binary file added todolist/check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions todolist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>민재의 투두리스트</title>
<link rel="stylesheet" href="style.css"/>
</head>
<body>
<header>
<div id="logo">
<h1>민재의 Todolist</h1>
</div>
</header>

<main>
<div class="container">
<div id="today">

</div>

<span id="tasks">
<h2 id="tasks_h2">0 tasks</h2>
</span>

<div id="text_box">

</div>

<div id="insert_button">
<img src="./plus.png" alt="plus"/>
</div>
</div>
</main>

<script src="script.js"></script>
</body>
</html>
Binary file added todolist/plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions todolist/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
// 오늘의 날짜를 출력하기 위한 코드
const week = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
const month = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']

const today = document.getElementById('today')
const date = new Date()

const week_index = date.getDay()
const day = date.getDate()
const month_index = date.getMonth()

today.innerText = `${week[week_index]}, ${day} ${month[month_index]}`

const insert = document.getElementById('insert_button')

let count = 0

insert.addEventListener('click', () => {
// 일정 추가 코드
let todo = prompt("오늘 할 일을 입력해주세요!")

if(!todo.length) alert('공백은 입력이 불가합니다!')
else {
const text = document.createElement('div')
const div = document.querySelector('#text_box')

text.innerHTML =
`
<div class="todo_list">
<div class="finish_checkBox"></div>
<img src="./check.png" width="44px" height="34px"/>
<h1 id="modify">${todo}</h1>
<button class="success">Success</button>
<button class="delete">Delete</div>
</div>
<div class="underbar"/>
`

div.appendChild(text)

// 일정 성공 코드
const successButton = text.querySelector('.success')

successButton.addEventListener('click', () => {
alert('계획 성공을 축하드립니다! 남은 계획들도 화이팅!!')
const todoList = text.querySelector('.todo_list')

const finishCheckBox = todoList.querySelector('.finish_checkBox')
const checkImg = todoList.querySelector('img[src="./check.png"]')

finishCheckBox.style.opacity = 0
checkImg.style.opacity = 1

})

// 일정 삭제 코드
const deleteButton = text.querySelector('.delete')

deleteButton.addEventListener('click', () => {
text.remove()

count -= 1
const task = document.getElementById('tasks_h2')
task.innerText = `${count} tasks`
})


// 일정 수정 코드
const modify = text.querySelector('#modify')

modify.addEventListener('click', () => {
const modify_text = prompt('계획을 어떻게 수정하실건가요?')

if(!modify_text.length) alert('공백은 입력이 불가합니다!')
else {
modify.innerText = `${modify_text}`
}
})

// 일정 추가했을 때 1씩 추가하는 코드
count+=1
const task = document.getElementById('tasks_h2')

task.innerText = `${count} tasks`
}
})
143 changes: 143 additions & 0 deletions todolist/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
body {
margin : 0;
}

header {
height : 8vh;
background-color : white;
padding : 1vh 0vh 1vh 4vw;
}

#logo {
font-size : 18px;
}

main {
width : 100vw;
height : 91vh;
background-color : #5b75e2;
display : flex;
align-items: flex-end;
}

.container {
width : 66vw;
height : 78vh;
border-radius : 38px 38px 0px 0px;
background-color : white;
margin : 0 auto;
box-shadow : 5px -2px 20px 0.1px #2B2B2B;
}

#today {
font-size : 2.5rem;
font-weight : bold;
color : #646469;
margin-top : 5vh;
Comment thread
kwonminjae5700 marked this conversation as resolved.
margin-left : 5vw;
}

#insert_button {
background-color : #5b75e2;
width : 5vw;
height : 8.5vh;
border-radius : 400px;
margin-top : 48vh;
margin-left : 54vw;
}

#insert_button:hover {
cursor : pointer;
}

#insert_button > img {
margin-top : 1.6vh;
margin-left : 1.16vw;
width : 2.8vw;
height : 5.4vh;
}

#text_box {
width : 66vw;
height : 44vh;
position : absolute;
top : 41vh;
left : 25vw;
overflow : auto;
}

.todo_list {
width : 100%;
height : 8vh;
display : flex;
align-items : center;
margin-bottom : -4px;
position : relative;
}

.todo_list > h1 {
color : #474747;
font-size : 2rem;
margin-left : 3.5vw;
cursor : pointer;
}

.todo_list > img {
position : absolute;
top : 14px;
left : 12px;
opacity : 0;
}

.finish_checkBox {
border-radius : 50%;
width : 30px;
height : 30px;
background-color : white;
border : 2px solid #a1a1a1;
margin-left : 20px;
}

.underbar {
width : 42vw;
height : 0.3vh;
background-color : #a1a1a1;
margin-left : 6vw;
margin-bottom : 3vh;
}

#tasks_h2 {
color : blue;
margin-top : 1.4vh;
margin-left : 7vw;
}

.success {
width : 5vw;
height : 4.9vh;
background-color : #44d144;
border-radius : 8px;
text-align : center;
padding-top : 0.3vh;
font-weight : bold;
font-size : 0.92rem;
position : absolute;
right : 24.5vw;
cursor : pointer;
border : none;
}

.delete {
width : 5vw;
height : 4.9vh;
background-color : #ff3d3d;
border-radius : 8px;
text-align : center;
padding-top : 0.3vh;
font-weight : bold;
font-size : 0.92rem;
position : absolute;
right : 19vw;
cursor : pointer;
border : none;
}