-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
슬랙의 열어를 두번 눌렀을 때 게임오버가 되도록 변경, catcha page추가
- Loading branch information
Showing
9 changed files
with
116 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html> | ||
<html lang="ko"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>시험지를 훔쳤다 - 잡았다.요놈.</title> | ||
<link rel="stylesheet" href="./css/catcha.css"> | ||
</head> | ||
|
||
<body> | ||
<div class="container" id="app" @click="addIndex"> | ||
<div class="catcha" v-for="(story, index) in stories" v-if="index === activeIndex"> | ||
<div class="main"> | ||
<img v-bind:src="'./photo/' + story.imageUrl + '.jpeg'" class="main-image"> | ||
<div class="main-icon"></div> | ||
</div> | ||
<div class="chat"> | ||
<div class="chat-text"> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<script src="https://cdn.jsdelivr.net/npm/vue"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> | ||
<script src="./js/catcha.js"></script> | ||
</body> | ||
|
||
</html> |
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,2 @@ | ||
@import url("./reset.css"); | ||
@import url("./common.css"); |
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
|
||
.main-image { | ||
display: block; | ||
max-height: 100vh; | ||
height: 100vh; | ||
} | ||
|
||
.info { | ||
|
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,70 @@ | ||
var app = new Vue({ | ||
el: "#app", | ||
data: { | ||
stories: [ | ||
{ | ||
imageUrl: "intro1", | ||
text: ["", "헐레벌떡 학원을 빠져나왔다."] | ||
}, | ||
{ | ||
imageUrl: "intro1", | ||
text: ["", "그래, 지금이라도 집으로 돌아가자"] | ||
}, | ||
{ | ||
imageUrl: "catcha", | ||
text: ["", "'잡았다 요놈!'"] | ||
}, | ||
{ | ||
imageUrl: "catcha", | ||
text: ["", "..."] | ||
}, | ||
{ | ||
imageUrl: "blank", | ||
text: ["", "화들짝 놀라며 H군은 잠에서 깨어났다."] | ||
}, | ||
{ | ||
imageUrl: "blank", | ||
text: ["", "매달 마지막 주 목요일에 프론트엔드 클래스는 쪽지시험을 본다."] | ||
}, | ||
{ | ||
imageUrl: "blank", | ||
text: ["", "지난 시험에 10점을 맞은 H 군은 이번 시험은 잘 보기 위해 시험지를 훔치러 늦은 밤 코드스쿼드에 잠입하기로 결심했다..."] | ||
} | ||
], | ||
activeIndex: 0, | ||
isLoaded: false | ||
}, | ||
methods: { | ||
addIndex() { | ||
if (this.isLoaded && this.activeIndex === 1) { | ||
const catcha = new Audio("./sound/catcha.wav"); | ||
catcha.play(); | ||
} | ||
if (this.isLoaded && this.activeIndex < 6) { | ||
this.activeIndex++; | ||
this.activeChat(); | ||
} else if (this.isLoaded && this.activeIndex === 6) { | ||
window.location.href = "./end.html"; | ||
} | ||
}, | ||
activeChat() { | ||
const vm = this; | ||
vm.isLoaded = false; | ||
const typed = new Typed(".chat-text", { | ||
strings: this.stories[this.activeIndex].text, | ||
typeSpeed: 40, | ||
backDelay: 500, | ||
fadeOut: true, | ||
onComplete: () => { | ||
vm.doneLoading(); | ||
} | ||
}); | ||
}, | ||
doneLoading() { | ||
this.isLoaded = true; | ||
} | ||
}, | ||
mounted() { | ||
this.activeChat(); | ||
} | ||
}); |
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
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.
Binary file not shown.