Skip to content

Commit

Permalink
feat: init subway project
Browse files Browse the repository at this point in the history
  • Loading branch information
wmakerjun committed Mar 16, 2021
1 parent 8d94045 commit f5cb400
Show file tree
Hide file tree
Showing 33 changed files with 5,021 additions and 1 deletion.
125 changes: 124 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,124 @@
# javascript-subway
<p align="middle" >
<img width="200px;" src="./src/images/subway_emoji.png"/>
</p>
<h2 align="middle">level1 - ์ง€ํ•˜์ฒ  ๋…ธ์„ ๋„ ๊ด€๋ฆฌ SPA</h2>
<p align="middle">Browser History API๋ฅผ ์ด์šฉํ•ด ๊ตฌํ˜„ํ•˜๋Š” ์ง€ํ•˜์ฒ  ๋…ธ์„ ๋„ ๊ด€๋ฆฌ SPA</p>
<p align="middle">
<img src="https://img.shields.io/badge/version-1.0.0-blue?style=flat-square" alt="template version"/>
<img src="https://img.shields.io/badge/language-html-red.svg?style=flat-square"/>
<img src="https://img.shields.io/badge/language-css-blue.svg?style=flat-square"/>
<img src="https://img.shields.io/badge/language-js-yellow.svg?style=flat-square"/>
<img src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square"/>
</p>

# ๐Ÿ”ฅ Projects!

<p align="middle">
<img src="./src/images/readme/subway_app_preview.png">
</p>

## ๐ŸŽฏ step1

### Webpack์„ ํ†ตํ•œ ๋ฒˆ๋“ค๋ง

- [ ] Webpack์—์„œ babel์„ ์„ค์ •ํ•œ๋‹ค.
- [ ] ๊ธฐํƒ€ ํ”Œ๋Ÿฌ๊ทธ์ธ ๋ฐ ์„ค์ •์€ ๋ณธ์ธ์ด ํ•„์š”์— ๋”ฐ๋ผ ์ถ”๊ฐ€ํ•œ๋‹ค.

### ๋ผ์šฐํŒ… ๊ธฐ๋Šฅ

- [ ] Browser History Api๋ฅผ ์ด์šฉํ•˜์—ฌ SPA์ฒ˜๋Ÿผ ๋ผ์šฐํŒ…์„ ์ ์šฉํ•œ๋‹ค.

### ํšŒ์› ๊ธฐ๋Šฅ

- [ ] ์œ ์ €๋Š” ํšŒ์› ๊ฐ€์ž…์„ ํ•  ์ˆ˜ ์žˆ๋‹ค,
- [ ] ํšŒ์› ๊ฐ€์ž…์‹œ ๋ฐ›๋Š” ์ •๋ณด๋Š” `email`, `name`, `password`์ด๋‹ค.
- [ ] ์œ ์ €๋Š” ๋กœ๊ทธ์ธ ํ•  ์ˆ˜ ์žˆ๋‹ค.
- [ ] ๋กœ๊ทธ์ธํ•˜๊ณ  ๋‚˜๋ฉด ๋กœ๊ทธ์ธ ๋ฒ„ํŠผ์€ ๋กœ๊ทธ์•„์›ƒ ๋ฒ„ํŠผ์œผ๋กœ ๋ณ€๊ฒฝ๋˜์–ด์•ผ ํ•œ๋‹ค.
- [ ] ๋กœ๊ทธ์ธํ•œ ์œ ์ €๋งŒ, ์ •๋ณด์˜ ์ˆ˜์ •์ด ๊ฐ€๋Šฅํ•˜๋‹ค.
- [ ] ๋กœ๊ทธ์ธํ•˜์ง€ ์•Š์€ ์œ ์ €๋Š” ์ •๋ณด๋ฅผ ์ฝ๋Š” ๊ฒƒ๋งŒ ๊ฐ€๋Šฅํ•˜๋‹ค.
- [ ] ์œ ์ €๋Š” ๋กœ๊ทธ์•„์›ƒํ•  ์ˆ˜ ์žˆ๋‹ค.
- [ ] ๋กœ๊ทธ์•„์›ƒํ•˜๋ฉด `/` ๋ฃจํŠธ ํŽ˜์ด์ง€๋กœ ๋Œ์•„์˜จ๋‹ค.

## ๐ŸŽฏ๐ŸŽฏ step2

### ์ง€ํ•˜์ฒ ์—ญ ๊ด€๋ฆฌ ๊ธฐ๋Šฅ

- [ ] ์ง€ํ•˜์ฒ ์—ญ์„ ๋“ฑ๋กํ•  ์ˆ˜ ์žˆ๋‹ค.
- [ ] ์ง€ํ•˜์ฒ ์—ญ์€ 2๊ธ€์ž ์ด์ƒ์ด์–ด์•ผ ํ•œ๋‹ค.
- [ ] ์—”ํ„ฐํ‚ค ๋˜๋Š” ๋งˆ์šฐ์Šค ํด๋ฆญ์œผ๋กœ ์—ญ์„ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•œ๋‹ค.
- [ ] ์ง€ํ•˜์ฒ ์—ญ์˜ ์ด๋ฆ„์€ ์ตœ๋Œ€ 20์ž ์ดํ•˜์ด๋‹ค.
- [ ] ์ค‘๋ณต๋œ ์ง€ํ•˜์ฒ ์—ญ์€ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์—†๋‹ค.
- [ ] ์ง€ํ•˜์ฒ ์—ญ์˜ ์ด๋ฆ„์„ ์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.
- [ ] ์ˆ˜์ •ํ•˜๋Š” UI๋Š” modal์„ ์ด์šฉํ•˜์—ฌ ์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•œ๋‹ค.
- [ ] ์ง€ํ•˜์ฒ ์—ญ์„ ์‚ญ์ œํ•  ์ˆ˜ ์žˆ๋‹ค.
- [ ] ์‚ญ์ œ ์‹œ confirm์„ ์ด์šฉํ•˜์—ฌ ํ•œ ๋ฒˆ ๋” ์œ ์ €๊ฐ€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•œ๋‹ค.
- [ ] ์ด๋ฏธ ๋…ธ์„ ์— ๋“ฑ๋ก๋œ ์—ญ์ธ ๊ฒฝ์šฐ ์‚ญ์ œํ•  ์ˆ˜ ์—†๋‹ค.

### ์ง€ํ•˜์ฒ  ๋…ธ์„  ๊ด€๋ฆฌ ๊ธฐ๋Šฅ

- [ ] ์ง€ํ•˜์ฒ  ๋…ธ์„ ์„ ๋“ฑ๋กํ•  ์ˆ˜ ์žˆ๋‹ค.
- [ ] ์ง€ํ•˜์ฒ  ๋…ธ์„ ์˜ ์ด๋ฆ„์€ 2๊ธ€์ž ์ด์ƒ์ด์–ด์•ผ ํ•œ๋‹ค.
- [ ] ์ค‘๋ณต๋œ ์ง€ํ•˜์ฒ  ๋…ธ์„  ์ด๋ฆ„์ด ๋“ฑ๋ก๋  ์ˆ˜ ์—†๋‹ค.
- [ ] ์ง€ํ•˜์ฒ  ๋…ธ์„ ์˜ ์ด๋ฆ„์€ ์ตœ๋Œ€ 10์ž ์ดํ•˜์ด๋‹ค.
- [ ] ์ง€ํ•˜์ฒ  ๋…ธ์„ ์„ ์ˆ˜์ • ์ˆ˜ ์žˆ๋‹ค.
- [ ] ์ง€ํ•˜์ฒ  ๋…ธ์„ ์˜ ์ด๋ฆ„, ์ฒซ์ฐจ ์‹œ๊ฐ„, ๋ง‰์ฐจ ์‹œ๊ฐ„, ๊ฐ„๊ฒฉ, ์ƒ‰์ƒ์„ ์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.
- [ ] ์ง€ํ•˜์ฒ  ๋…ธ์„ ์„ ์‚ญ์ œํ•  ์ˆ˜ ์žˆ๋‹ค.
- [ ] ์‚ญ์ œ ์‹œ confirm์„ ์ด์šฉํ•˜์—ฌ ํ•œ ๋ฒˆ ๋” ์œ ์ €๊ฐ€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•œ๋‹ค.
- [ ] ์ง€ํ•˜์ฒ  ๋…ธ์„ ์„ ์กฐํšŒ ํ•  ์ˆ˜ ์žˆ๋‹ค.
- [ ] ์ง€ํ•˜์ฒ  ๋…ธ์„ ์„ ํด๋ฆญํ•˜๋ฉด modal๋กœ ์ฒซ์ฐจ ์‹œ๊ฐ„, ๋ง‰์ฐจ ์‹œ๊ฐ„, ๊ฐ„๊ฒฉ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.
- [ ] ํ•ด๋‹น UI๋Š” ์Šค์Šค๋กœ ๊ตฌํ˜„ํ•œ๋‹ค.

### ์ง€ํ•˜์ฒ  ๊ตฌ๊ฐ„ ๊ด€๋ฆฌ ๊ธฐ๋Šฅ

- [ ] ์ง€ํ•˜์ฒ  ๋…ธ์„ ์— ๊ตฌ๊ฐ„์„ ์ถ”๊ฐ€, ์ˆ˜์ •, ์‚ญ์ œํ•  ์ˆ˜ ์žˆ๋‹ค.
- [ ] ๊ตฌ๊ฐ„ ์กฐํšŒ ์‹œ, ๋…ธ์„ ์„ ๋ณ€๊ฒฝํ•˜๋ฉด ํ•ด๋‹น ๋…ธ์„ ์˜ Color๋กœ Select ์—˜๋ฆฌ๋จผํŠธ์˜ ๋ฐฐ๊ฒฝ์ƒ‰์„ ๋ณ€๊ฒฝํ•œ๋‹ค.

## ๐ŸŽฏ๐ŸŽฏ๐ŸŽฏ step3

### ์ „์ฒด๋ณด๊ธฐ ๊ธฐ๋Šฅ

- [ ] ๋…ธ์„ ์˜ ์ƒํ–‰ ์ข…์ ๋ถ€ํ„ฐ ํ•˜ํ–‰ ์ข…์ ๊นŒ์ง€ ์—ฐ๊ฒฐ๋œ ์ˆœ์„œ๋Œ€๋กœ ๋…ธ์„ ๊ณผ ์—ญ ๋ชฉ๋ก์„ ์กฐํšŒํ•  ์ˆ˜ ์žˆ๋‹ค.
- [ ] ์กฐํšŒ๋ฅผ ์œ„ํ•œ UI๋Š” ์Šค์Šค๋กœ ๋งŒ๋“ ๋‹ค.

### ๊ธธ์ฐพ๊ธฐ ๊ธฐ๋Šฅ

- [ ] ์ถœ๋ฐœ์—ญ๊ณผ ๋„์ฐฉ์—ญ์„ ์ž…๋ ฅ๋ฐ›์•„ ๊ฒฝ๋กœ๋ฅผ ์กฐํšŒํ•œ๋‹ค.
- [ ] ๊ฒฝ๋กœ ์กฐํšŒ ์‹œ ์ด ๊ฑฐ๋ฆฌ, ์ด ์†Œ์š” ์‹œ๊ฐ„์„ ํ•จ๊ป˜ ์ถœ๋ ฅํ•œ๋‹ค.
- [ ] ๊ฒฝ๋กœ ์กฐํšŒ ์‹œ ์ตœ๋‹จ ๊ฑฐ๋ฆฌ ๋˜๋Š” ์ตœ์†Œ ์‹œ๊ฐ„ ์˜ต์…˜์„ ์„ ํƒํ•  ์ˆ˜ ์žˆ๋‹ค.
- [ ] ๊ธธ ์ฐพ๊ธฐ๋ฅผ ์œ„ํ•œ UI๋Š” ์Šค์Šค๋กœ ๋งŒ๋“ ๋‹ค.

<br>

## โš™๏ธ Before Started

#### <img alt="Tip" src="https://img.shields.io/static/v1.svg?label=&message=Tip&style=flat-square&color=673ab8"> ๋กœ์ปฌ์—์„œ ์„œ๋ฒ„ ๋„์›Œ์„œ ์†์‰ฝ๊ฒŒ static resources ๋ณ€๊ฒฝ ๋ฐ ํ™•์ธํ•˜๋Š” ๋ฐฉ๋ฒ•

๋กœ์ปฌ์—์„œ ์›น์„œ๋ฒ„๋ฅผ ๋„์›Œ html, css, js ๋“ฑ์„ ์‹ค์‹œ๊ฐ„์œผ๋กœ ์†์‰ฝ๊ฒŒ ํ…Œ์ŠคํŠธํ•ด ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฅผ ์œ„ํ•ด์„œ๋Š” ์šฐ์„  npm์ด ์„ค์น˜๋˜์–ด ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๊ตฌ๊ธ€์— `npm install` ์ด๋ž€ ํ‚ค์›Œ๋“œ๋กœ ๊ฐ์ž์˜ ์šด์˜์ฒด์ œ์— ๋งž๊ฒŒ๋” npm์„ ์„ค์น˜ํ•ด์ฃผ์„ธ์š”. ์ดํ›„ ์•„๋ž˜์˜ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ์‹ค์‹œ๊ฐ„์œผ๋กœ ์›นํŽ˜์ด์ง€๋ฅผ ํ…Œ์ŠคํŠธํ•ด๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

```
npm install -g live-server
```

์‹คํ–‰์€ ์•„๋ž˜์˜ ์ปค๋งจ๋“œ๋กœ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

```
live-server ํด๋”๋ช…
```

<br>

## ๐Ÿ‘ Contributing

๋งŒ์•ฝ ๋ฏธ์…˜ ์ˆ˜ํ–‰ ์ค‘์— ๊ฐœ์„ ์‚ฌํ•ญ์ด ๋ณด์ธ๋‹ค๋ฉด, ์–ธ์ œ๋“  ์ž์œ ๋กญ๊ฒŒ PR์„ ๋ณด๋‚ด์ฃผ์„ธ์š”.

<br>

## ๐Ÿž Bug Report

๋ฒ„๊ทธ๋ฅผ ๋ฐœ๊ฒฌํ•œ๋‹ค๋ฉด, [Issues](https://github.com/woowacourse/javascript-subway/issues)์— ๋“ฑ๋กํ•ด์ฃผ์„ธ์š”.

<br>

## ๐Ÿ“ License

This project is [MIT](https://github.com/woowacourse/javascript-subway/blob/main/LICENSE) licensed.
29 changes: 29 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="kr">
<head>
<meta charset="UTF-8" />
<title>๐Ÿš‡ ์ง€ํ•˜์ฒ  ๋…ธ์„ ๋„</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/src/css/index.css" />
</head>
<body>
<div id="app">
<div class="d-flex justify-center mt-5 w-100">
<div class="w-100">
<header class="my-4"></header>
<main class="mt-10 d-flex justify-center">
<div class="d-flex flex-col">
<div class="d-flex justify-center">
<img src="src/images/subway_emoji.png" width="200" />
</div>
<p class="mt-0 text-center">
์ง€ํ•˜์ฒ  ๋…ธ์„ ๋„ ์•ฑ์„ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋กœ๊ทธ์ธ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
</p>
</div>
</main>
</div>
</div>
</div>
<script type="module" src="./src/js/index.js"></script>
</body>
</html>
145 changes: 145 additions & 0 deletions pages/lines.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
<!DOCTYPE html>
<html lang="kr">
<head>
<meta charset="UTF-8" />
<title>๐Ÿš‡ ๋…ธ์„  ๊ด€๋ฆฌ</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/src/css/index.css" />
<link rel="stylesheet" href="/src/css/pages/lines.css" />
</head>
<body>
<div id="app">
<div class="d-flex justify-center mt-5 w-100">
<div class="w-100">
<header class="my-4"></header>
<main class="mt-10 d-flex justify-center">
<div class="wrapper bg-white p-10">
<div class="heading d-flex">
<h2 class="mt-1 w-100">๐Ÿ›ค๏ธ ๋…ธ์„  ๊ด€๋ฆฌ</h2>
<button
type="button"
class="create-line-btn modal-trigger-btn bg-cyan-300 ml-2"
>
๋…ธ์„  ์ถ”๊ฐ€
</button>
</div>
<ul class="mt-3 pl-0">
<li class="d-flex items-center py-2 relative">
<span class="subway-line-color-dot bg-blue-400"></span>
<span class="w-100 pl-6 subway-line-list-item-name"
>1ํ˜ธ์„ </span
>
<button
type="button"
class="bg-gray-50 text-gray-500 text-sm mr-1"
>
์ˆ˜์ •
</button>
<button
type="button"
class="bg-gray-50 text-gray-500 text-sm"
>
์‚ญ์ œ
</button>
</li>
<hr class="my-0" />
</ul>
</div>
</main>
</div>
</div>

<div class="modal">
<div class="modal-inner p-8">
<button class="modal-close">
<svg viewbox="0 0 40 40">
<path class="close-x" d="M 10,10 L 30,30 M 30,10 L 10,30" />
</svg>
</button>
<header>
<h2 class="text-center">๐Ÿ›ค๏ธ ๋…ธ์„  ์ถ”๊ฐ€</h2>
</header>
<form>
<div class="input-control">
<label for="subway-line-name" class="input-label" hidden
>๋…ธ์„  ์ด๋ฆ„</label
>
<input
type="text"
id="subway-line-name"
name="subway-line-name"
class="input-field"
placeholder="๋…ธ์„  ์ด๋ฆ„"
required
/>
</div>
<div class="input-control">
<label for="departure-time" class="input-label" hidden
>์ฒซ์ฐจ ์‹œ๊ฐ„</label
>
<input
type="text"
id="departure-time"
name="departure-time"
class="input-field"
placeholder="์ฒซ์ฐจ์‹œ๊ฐ„ HH:MM"
required
/>
<label for="departure-time" class="input-label" hidden
>๋ง‰์ฐจ ์‹œ๊ฐ„</label
>
<input
type="text"
id="arrival-time"
name="arrival-time"
class="input-field mx-2"
placeholder="๋ง‰์ฐจ ์‹œ๊ฐ„ HH:MM"
required
/>
<label for="interval-time" class="input-label" hidden
>๊ฐ„๊ฒฉ ์‹œ๊ฐ„</label
>
<input
type="text"
id="interval-time"
name="arrival-time"
class="input-field"
placeholder="๊ฐ„๊ฒฉ"
required
/>
</div>
<div class="input-control">
<div>
<label for="subway-line-color" class="input-label" hidden
>๊ฐ„๊ฒฉ ์‹œ๊ฐ„</label
>
<input
type="text"
id="subway-line-color"
name="subway-line-color"
class="input-field"
placeholder="์ƒ‰์ƒ์„ ์•„๋ž˜์—์„œ ์„ ํƒํ•ด์ฃผ์„ธ์š”."
disabled
required
/>
</div>
</div>
<div class="subway-line-color-selector px-2"></div>
<div class="d-flex justify-end mt-3">
<button
type="submit"
name="submit"
class="input-submit bg-cyan-300"
>
ํ™•์ธ
</button>
</div>
</form>
</div>
</div>
</div>
<script type="module" src="/src/js/index.js"></script>
<script type="module" src="/src/js/ui/modal/index.js"></script>
<script type="module" src="/src/js/pages/lines.js"></script>
</body>
</html>
65 changes: 65 additions & 0 deletions pages/login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="kr">
<head>
<meta charset="UTF-8" />
<title>๐Ÿš‡ ๋กœ๊ทธ์ธ</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/src/css/index.css" />
<link rel="stylesheet" href="/src/css/pages/auth.css" />
</head>
<body>
<div id="app">
<div class="d-flex justify-center mt-5 w-100">
<div class="w-100">
<header class="my-4"></header>
<main class="mt-10 d-flex justify-center">
<div class="wrapper p-10 bg-white">
<div class="heading">
<h2>๐Ÿ‘‹ ๋กœ๊ทธ์ธ</h2>
</div>
<form name="login" class="form">
<div class="input-control">
<label for="email" class="input-label" hidden>์ด๋ฉ”์ผ</label>
<input
type="email"
id="email"
name="email"
class="input-field"
placeholder="์ด๋ฉ”์ผ"
required
/>
</div>
<div class="input-control">
<label for="password" class="input-label" hidden
>๋น„๋ฐ€๋ฒˆํ˜ธ</label
>
<input
type="password"
id="password"
name="password"
class="input-field"
placeholder="๋น„๋ฐ€๋ฒˆํ˜ธ"
/>
</div>
<div class="input-control w-100">
<button
type="button"
name="submit"
class="input-submit w-100 bg-cyan-300"
>
ํ™•์ธ
</button>
</div>
<p class="text-gray-700 pl-2">
์•„์ง ํšŒ์›์ด ์•„๋‹ˆ์‹ ๊ฐ€์š”?
<a href="/pages/signup.html">ํšŒ์›๊ฐ€์ž…</a>
</p>
</form>
</div>
</main>
</div>
</div>
</div>
<script type="module" src="/src/js/index.js"></script>
</body>
</html>
Loading

0 comments on commit f5cb400

Please sign in to comment.