-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
202 lines (200 loc) · 4.88 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<!DOCTYPE HTML>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>Hakata No Shio</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Mochiy+Pop+P+One&display=swap" rel="stylesheet">
<style>
body {
text-align:center;
font-family: 'Mochiy Pop P One', sans-serif;
}
#chara {
color:blue;
text-align:justify;
text-align-last:justify;
margin:auto;
padding-left:100px;
padding-right:100px;
padding-top:0px;
padding-bottom:0px;
background-color:pink;
width:60%;
height: 10%;
border-radius:10px;
font-size:30px;
font-family: 'Mochiy Pop P One', sans-serif;
}
#space {
color:blue;
text-align:center;
margin:auto;
padding-left:100px;
padding-right:100px;
padding-top:0px;
padding-bottom:0px;
background-color:pink;
width:60%;
height: 10%;
border-radius:10px;
font-size:30px;
font-family: 'Mochiy Pop P One', sans-serif;
}
li {
list-style-type:none;
}
#button {
display:inline-block;
margin:10px;
width:100%;
}
button {
width:150px;
height:150px;
margin:29px;
font-size:60px;
color:black;
background-color:white;
border:solid 10px;
border-color: #ff0000;
border-radius:20px;
transition:0.1s;
font-family: 'Mochiy Pop P One', sans-serif;
}
button:hover {
width:150px;
height:150px;
margin:29px;
font-size:60px;
color:black;
background-color:#00ffff;
border:solid 10px;
border-color: #ff0000;
border-radius:20px;
}
#main {
width:1000px;
height:200px;
}
#speed button{
color:gray;
width:300px;
font-size:50px;
}
</style>
</head>
<body>
<div id="chara">
<li> <span>A</span> <span>S</span> <span>D</span> <span>F</span> <span>G</span> </li>
</div>
<div id="button">
<button onClick="ha()">は</button>
<button onClick="ka()">か</button>
<button onClick="ta()">た</button>
<button onClick="no()">の</button>
<button onClick="sio()">しお</button>
</div>
<div>
<button onClick="hakatanosio()" id="main">は!か!た!の!しお!</button>
</div>
<div id="space">
<li> <span>Space</span></li>
</div>
<div id="speed">
<button onClick="five()">0.5倍速</button>
<button onClick="eight()">0.8倍速</button>
<button onClick="tf()">1.25倍速</button>
</div>
<footer>Inspired from AZ FLASH 「伯方の塩ボタン」</footer>
<noscript>JavaScriptを有効化してください。</noscript>
<audio id="ha_audio">
<source src="./ha.mp3" type="audio/mp3">
</audio>
<audio id="ka_audio">
<source src="./ka.mp3" type="audio/mp3">
</audio>
<audio id="ta_audio">
<source src="./ta.mp3" type="audio/mp3">
</audio>
<audio id="no_audio">
<source src="./no.mp3" type="audio/mp3">
</audio>
<audio id="sio_audio">
<source src="./sio.mp3" type="audio/mp3">
</audio>
<audio id="main_audio">
<source src="./hakatanoshio.mp3" type="audio/mp3">
</audio>
<audio id="five_audio">
<source src="./five.mp3" type="audio/mp3">
</audio>
<audio id="eight_audio">
<source src="./eight.mp3" type="audio/mp3">
</audio>
<audio id="tf_audio">
<source src="./tf.mp3" type="audio/mp3">
</audio>
</body>
<script type="text/javascript">
window.addEventListener('DOMContentLoaded', function(){
var key_input = new Array;
window.addEventListener("keypress", async function(e){
e.preventDefault();
if(e.key === "a") {ha()}
else if(e.key === "s") {await ka()}
else if(e.key === "d") {await ta()}
else if(e.key === "f") {await no()}
else if(e.key === "g") {await sio()}
else if(e.key === " ") {await hakatanosio()}
else {return;}
});
window.addEventListener("keydown", function(e){
key_input.push(e.key);
});
window.addEventListener("keyup", function(e){
if( 0 < key_input.length ) {
console.log(key_input);
key_input = new Array();
}
});
});
async function ha() {
document.getElementById('ha_audio').currentTime = 0;
document.getElementById('ha_audio').play();
}
async function ka() {
document.getElementById('ka_audio').currentTime = 0;
document.getElementById('ka_audio').play();
}
async function ta() {
document.getElementById('ta_audio').currentTime = 0;
document.getElementById('ta_audio').play();
}
async function no() {
document.getElementById('no_audio').currentTime = 0;
document.getElementById('no_audio').play();
}
async function sio() {
document.getElementById('sio_audio').currentTime = 0;
document.getElementById('sio_audio').play();
}
async function hakatanosio() {
document.getElementById('main_audio').currentTime = 0;
document.getElementById('main_audio').play();
}
async function five() {
document.getElementById('five_audio').currentTime = 0;
document.getElementById('five_audio').play();
}
async function eight() {
document.getElementById('eight_audio').currentTime = 0;
document.getElementById('eight_audio').play();
}
async function tf() {
document.getElementById('tf_audio').currentTime = 0;
document.getElementById('tf_audio').play();
}
</script>
</html>