Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
401 changes: 401 additions & 0 deletions gom/.gitignore

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions gom/week1/misson/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Todo List</title>
<link rel="stylesheet" href="style.css">
</head>

<body>

<h1>UMC Study Plan</h1>
<div class="container">
<input type="text" id="todoInput" placeholder="스터디 계획을 작성해보세요!" />

<div class="lists">
<div class="todo-section">
<h5>해야 할 일</h3>
<ul id="todoList"></ul>
</div>

<div class="completed-section">
<h5>해낸 일</h5>
<ul id="completedList"></ul>
</div>
</div>

</div>

<script src="script.js"></script>

</body>
</html>
42 changes: 42 additions & 0 deletions gom/week1/misson/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
document.addEventListener('DOMContentLoaded', function () {
const todoInput = document.getElementById('todoInput');
const todoList = document.getElementById('todoList');
const completedList = document.getElementById('completedList');

// 입력 필드에서 Enter 키를 눌렀을 때 할 일 추가 함수 실행
todoInput.addEventListener('keypress', function (event) {
if (event.key === 'Enter' && todoInput.value.trim() !== '') {
addTodo(todoInput.value);
todoInput.value = ''; // 입력창 비우기
}
});

// 해야 할 일 추가 함수
function addTodo(task) {
const li = document.createElement('li');
li.textContent = task;

const completeButton = document.createElement('button');
completeButton.textContent = '완료';
completeButton.addEventListener('click', function () {
completeTask(li);
});

li.appendChild(completeButton);
todoList.appendChild(li);
}

// 해야 할 일을 해낸 일로 이동하는 함수
function completeTask(task) {
task.removeChild(task.lastChild); // '완료' 버튼 삭제

const deleteButton = document.createElement('button');
deleteButton.textContent = '삭제';
deleteButton.addEventListener('click', function () {
task.remove();
});

task.appendChild(deleteButton);
completedList.appendChild(task);
}
});
74 changes: 74 additions & 0 deletions gom/week1/misson/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
padding: 30px;
}

.container {
max-width: 600px;
margin: 0 auto;
background: #fff;
padding: 20px;
border-radius: 5px;
}

h1 {
text-align: center;
margin-bottom: 30px;
}

h5 {
text-align: center;
margin-bottom: 20px;
}

input {
width: 100%;
padding: 10px;
margin-bottom: 20px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 16px;
}

.lists {
display: flex;
justify-content: space-between;
}

.todo-section, .completed-section {
width: 45%;
}

ul {
list-style-type: none;
}

li {
padding: 10px;
margin: 5px 0;
background-color: #eeeeee;
display: flex;
justify-content: space-between;
align-items: center;
border-radius: 5px;
}

button {
background-color: #9e9e9e;
color: white;
border: none;
padding: 5px 10px;
border-radius: 5px;
cursor: pointer;
}

button:hover {
background-color: #000000;
}
24 changes: 24 additions & 0 deletions gom/week2/mission1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
8 changes: 8 additions & 0 deletions gom/week2/mission1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# React + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
38 changes: 38 additions & 0 deletions gom/week2/mission1/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import js from '@eslint/js'
import globals from 'globals'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'

export default [
{ ignores: ['dist'] },
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
settings: { react: { version: '18.3' } },
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
...reactHooks.configs.recommended.rules,
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]
13 changes: 13 additions & 0 deletions gom/week2/mission1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>todolist</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading