-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(index): header script 추가 및 reformat * feat(common): header 렌더링하는 자바스크립트 파일 추가 * feat(users): 전적 중, 사용자 지정 게임 1 vs 1 모드를 보여주는 자바스크립트 추가 * chore(gitignore): .idea 디렉토리 추가 * feat(assets): font 추가 - Galmuri11 Normal, Bold, Condensed 추가 * feat(assets): header의 뒤로가기 이미지 추가 * feat(assets): 사용자 지정 게임 전적 검색 전용 css 추가 * feat(assets): 헤더 전용 css 추가 * feat(common): 헤더를 렌더링하는 js 파일 추가 * feat(index): <header> 추가 * feat(assets): 이미지 파일 추가 * feat(users): 전적 페이지 헤더 함수 프로토타입 구현 * chore: package-lock.json의 name value 변경 * chore: package-lock.json의 name value 변경 * feat(index): mini reset css 적용 * chore(common): header js 파일 이동 * feat(main): header를 렌더링하게 함 * feat(users): 사용자 전적 헤더 프로토타입 선언 * feat(common): body 전용 css 추가 * feat(histories): 파일 이동 및 one_on_one_list.js 프로토타입 구현 * feat(router): histories 라우터에 등록 * chore(common): import 경로 변경 * chore: 파일 경로 변경 * feat: body 배경색 추가 * feat(index): body css link * chore: 경로 변경 * feat(css): body width, height 뷰포트를 기준으로 변경 * feat(css): histories의 header css 프로토타입 추가 * refactor: /users/histories 대신 /histories 사용 * feat(images): 이미지 해상도 변경 * feat(histories): 헤더에 x버튼 추가 * feat(index): #app의 height를 80vh로 축소 * feat(css): 프레임 배경 이미지를 content-wrapper에 적용 * feat(header): histories의 header는 동적으로 css 파일을 가져와서 head에 link * refactor: header 폴더로 바꿨습니다 header 구조 바꿨습니다. 기존 방식대로 app element안을 다 묶어서 렌더링 해주지 않고 분리해서 header와 page 따로 렌더링 해주게 했습니다 --------- Co-authored-by: yena <[email protected]>
- Loading branch information
1 parent
bce65de
commit fa76678
Showing
27 changed files
with
182 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,4 +57,7 @@ Temporary Items | |
.env | ||
|
||
## volume directory git ignore | ||
volumes/ | ||
volumes/ | ||
|
||
## .idea directory git ignore | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
body { | ||
background-image: linear-gradient(0deg, #45003B, #191D40); | ||
width: 100vw; | ||
height: 100vh; | ||
} | ||
|
||
body.histories { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@font-face { | ||
font-family: 'Galmuri11'; | ||
src: url('/frontend/assets/fonts/Galmuri11.ttf') format('truetype'); | ||
font-weight: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: 'Galmuri11-Bold'; | ||
src: url('/frontend/assets/fonts/Galmuri11-Bold.ttf') format('truetype'); | ||
font-weight: bold; | ||
} | ||
|
||
@font-face { | ||
font-family: 'Galmuri11-Condensed'; | ||
src: url('/frontend/assets/fonts/Galmuri11-Condensed.ttf') format('truetype'); | ||
font-weight: normal; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
header { | ||
width: 100vw; | ||
height: 12vh; | ||
font-family: Galmuri11-Bold, serif; | ||
font-size: 2rem; | ||
} | ||
|
||
.header-wrapper { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
flex-direction: row; | ||
padding: 0 5rem; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.header-wrapper .histories > div { | ||
width: fit-content; | ||
} | ||
|
||
.header-wrapper .histories#title { | ||
color: #29ABE2; | ||
} | ||
|
||
.header-wrapper .histories#close-button a { | ||
display: block; | ||
background-image: url("../../images/close.png"); | ||
background-position: center; | ||
width: 3rem; | ||
height: 3rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.histories#content-wrapper { | ||
display: flex; | ||
justify-content: center; | ||
flex-direction: column; | ||
height: 100%; | ||
background-color: black; | ||
background-image: url("../../images/histories_frame.png"); | ||
background-size: 100% 100%; | ||
background-position: bottom; | ||
background-repeat: no-repeat; | ||
overflow: hidden; | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
<!doctype html> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>ping pong</title> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jgthms/minireset.css@master/minireset.min.css"> | ||
<link rel="stylesheet" href="global.css" /> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script> | ||
<script type="module" src="main.js"></script> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>ping pong</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="assets/css/common/header.css"/> | ||
<link rel="stylesheet" href="assets/css/common/body.css"/> | ||
</head> | ||
<body> | ||
<header id="header"></header> | ||
<div id="app" style="width: 100vw; height: 88vh;"></div> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script> | ||
<script type="module" src="main.js"></script> | ||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import GameMode from '../pages/game-mode/page.js'; | ||
import Main from '../pages/main/page.js'; | ||
import Nickname from '../pages/nickname/page.js'; | ||
|
||
import histories from "../pages/histories/page.js"; | ||
import errorHeader from '../header/errorHeader/header.js'; | ||
export const BASE_URL = 'http://localhost:3000'; | ||
/** | ||
* 원하는 경로에 따라 렌더링할 컴포넌트를 정의합니다. | ||
* @type {{path: RegExp, element: string}[]} | ||
*/ | ||
export const routes = [ | ||
{ path: /^\/$/, element: Main }, | ||
{ path: /^\/nickname$/, element: Nickname }, | ||
{ path: /^\/gamemode$/, element: GameMode }, | ||
]; | ||
{ path: /^\/$/, page: Main, header: errorHeader }, | ||
{ path: /^\/nickname$/, page: Nickname, header: errorHeader }, | ||
{ path: /^\/gamemode$/, page: GameMode, header: errorHeader }, | ||
{path: /^\/histories$/, page: histories, header: errorHeader} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* 사용자 전적 페이지에 사용하는 header 컴포넌트 | ||
* @param {HTMLElement} $container | ||
*/ | ||
export default function HistoriesHeader($container) { | ||
this.$container = $container; | ||
|
||
this.setState = () => { | ||
this.render(); | ||
} | ||
|
||
this.render = () => { | ||
this.$container.innerHTML = ` | ||
<div style="width: 100vw; height: 12vh; background: #0000AA"></div> | ||
` | ||
} | ||
|
||
this.render(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* 사용자 전적 페이지에 사용하는 header 컴포넌트 | ||
* @param {HTMLElement} $container | ||
*/ | ||
export default function HistoriesHeader($container) { | ||
this.$container = $container; | ||
|
||
this.setState = () => { | ||
this.render(); | ||
} | ||
|
||
this.render = () => { | ||
this.$container.innerHTML = ` | ||
<div class="header-wrapper"> | ||
<div class="histories" id="search-icon"></div> | ||
<div class="histories" id="search-box"></div> | ||
<div class="histories" id="title">너의 기록은</div> | ||
<div class="histories" id="user-avatar"></div> | ||
<div class="histories" id="close-button"> | ||
<a href=""></a> | ||
</div> | ||
</div> | ||
` | ||
} | ||
|
||
this.render(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
export default function histories($container) { | ||
this.$container = $container; | ||
|
||
this.setState = () => { | ||
this.render(); | ||
} | ||
|
||
this.render = () => { | ||
if (document.getElementsByTagName("head") !== null) { | ||
document.getElementsByTagName("head")[0].insertAdjacentHTML( | ||
"beforeend", | ||
'<link rel="stylesheet" href="../../../assets/css/histories/one_on_one.css"/>' | ||
); | ||
} | ||
this.$container.innerHTML = ` | ||
<div class="histories" id="content-wrapper">d | ||
</div> | ||
`; | ||
} | ||
|
||
this.render(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters