-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
493 lines (450 loc) · 12.1 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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body, html {
height: 100%;
margin: 0;
font-family: Arial;
}
/* Style tab links */
.tablink {
background-color: #555;
color: white;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 14px 16px;
font-size: 17px;
width: 25%;
}
.tablink:hover {
background-color: #777;
}
/* Style the tab content (and add height:100% for full page content) */
.tabcontent {
color: white;
display: none;
padding: 100px 20px;
height: 100%;
}
a{
text-decoration:none;
color:black;
}
#Web {background-color: gainsboro;}
#App {background-color: yellowgreen;}
#Game {background-color: skyblue;}
#Youtube {background-color: cyan;}
img{
width:100px;
height:100px;
}
#Youtube > .channel > a > img{
width: 150px;
height: 150px;
border-radius: 70%;
overflow: hidden;
}
#Web .tabcontent{
width: 100px;
height: 100px;
}
.My_pic{
width:200px;
height:200px;
border: 2px solid black;
}
#lst{
box-sizing:border-box;
width:600px;
margin:0 auto;
}
#lst > form{
background-color:#007acc;
padding:30px 40px;
color: white;
text-align:center;
}
#lst > input{
border:none;
width:440px;
padding:10px;
float:left;
font-size:16px;
}
.addBtn{
padding:10px;
width:50px;
border:none;
background-color:#fff;
box-shadow:1px 2px 4px #167dae;
color:#555;
text-align:center;
font-size:14px;
cursor:pointer;
transition:0.3;
}
form::after{
content:"";
display:table;
clear:both;
}
#itemList > ul {
margin:0;
padding:0;
list-style: none;
}
#itemList > ul li{
cursor:pointer;
position:relative;
padding:12px 8px 12px 40px;
background:#eee;
font-size:18px;
transition: 0.2s;
color: black;
}
#itemList > ul li:nth-child(odd){
background-color:#f9f9f9;
}
#itemList > ul li:hover{
background-color:#ddd;
}
.close:hover{
background-color:#007acc;
color:white;
}
/*로또추첨*/
/*웹폰트*/
@font-face {
font-family: 'IM_Hyemin-Bold';
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/[email protected]/IM_Hyemin-Bold.woff2') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'IM_Hyemin-Regular';
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/[email protected]/IM_Hyemin-Regular.woff2') format('woff');
font-weight: normal;
font-style: normal;
}
body{
width: 100%;
background-color: #eb9f9f;
position: relative;
}
.title{
font-family: 'IM_Hyemin-Bold';
font-size: 50px;
text-align: center; /*중앙에 위치하도록*/
color: #fff;
}
.rottoNum_wrap{
width: 1000px;
height: 550px;
background: url(/images/gui-2311258_1280.png) no-repeat;
/*백그라운드 이미지 넣기, no-repeat : 반복 x */
background-size: 100%;
margin: 0 auto;
text-align: center; /*글자 중앙정렬*/
position: relative; /*plus(+) 위치 조정을 위해 relative설정*/
}
.ball{
border-radius: 100%; /*원형으로 만들기*/
background-color: #f1bbba;
width: 100px;
height: 100px;
display: inline-block; /*일자로 정렬하기 위해 적용*/
margin: 150px 10px 150px;
position: relative;
}
.ball span{ /*공안의 숫자 텍스트 부분 스타일적용*/
display: block;
font-family: 'IM_Hyemin-Regular';
font-size: 40px;
text-align: center;
margin-top: 25px;
}
.bonus{ /*보너스공 스타일 적용*/
margin-left: 50px;
background-color: #aed8ff;
}
.rottoNum_wrap .plus{ /*플러스 텍스트 스타일 적용*/
position: absolute;
display: inline-block;
font-family: 'IM_Hyemin-Regular';
font-size: 50px;
height: 100px;
top: 160px;
}
.btn_wrap{
width: 100%;
margin: 0 auto;
}
.btn{ /*버튼 스타일 적용*/
border: none;
background-color: #a79c8e;
color: white;
font-family: 'IM_Hyemin-Regular';
font-size: 20px;
width: 150px;
height: 40px;
border-radius: 10px; /*모서리 둥글게*/
}
.btn:hover{ /*버튼 위에 마우스 올라갔을 때 스타일적용*/
background-color: #8a8277;
transition-duration:2s;
}
/*login page*/
.channel{
height: 100%;
box-sizing: border-box;
}
.bg-text{
background-color: rgb(0,0,0);
background-color:rgba(0,0,0,0.4);
color: white;
font-weight:bold;
border: 3px solid #f1f1f1;
position: absolute;
top: 25%;
left: 50%;
transform: translate(-50%,-50%);
z-index: 2;
width:80%;
padding: 10px;
text-align: center;
margin-top:50px;
}
.channel> .btn{
border: 2px solid black;
background-color: white;
color:black;
padding: 12px 26px;
font-size: 14px;
cursor: pointer;
}
.success{
border-color: darkgray;
color: black;
}
.success:hover{
background-color: gray;
color:white;
}
.channel > a{
text-decoration-line: none;
color: black;
}
</style>
</head>
<body>
<button class="tablink" onclick="openPage('Web', this, 'red')">소계</button>
<button class="tablink" onclick="openPage('App', this, 'green')" id="defaultOpen">App</button>
<button class="tablink" onclick="openPage('Game', this, 'blue')">Game</button>
<button class="tablink" onclick="openPage('Youtube', this, 'orange')">LogIn</button>
<div id="Web" class="tabcontent">
<h1>웹 소계</h1>
<h3>내가 기지고 놀기 좋은 웹 나만의 공간</h3>
<hr>
<h2>프로필</h2>
<p>나는 나는 유성욱 부소마에 다니고 있아옹</p>
<p>진구에 살고 있닿ㅎㅎㅎ</p>
<hr>
<h2>내 장남감</h2>
<img id="img" src="Naver.jpg">
<button onclick="clickEvent()">바뀌다!!!</button>
<hr>
<img src="cqkf언어.png"><img src="루트파이썬.png">
<hr>
<div class="My_pic"><img scr="my__picccc.png"></div>
</div>
<div id="App" class="tabcontent">
<h3>APP</h3>
<div id="container">
<img src="Naver.jpg">
<img src="인스타.jpg">
<img src="discord.png">
<button id="prev">⟨</button>
<button id="next">⟩</button>
</div>
<a href="https://naver.com"><img src="Naver.jpg"></a>
<a href="https://www.instagram.com"><img src="인스타.jpg"></a>
<a href="https://www.discord.com"><img src="discord.png"></a>
</div>
<div id="Game" class="tabcontent">
<h3>GAME</h3>
<p><a href="https://tetris.com"><strong>테트리스</strong>바로가기</a></p>
<div id="lst">
<from>
<input type="text" id="item" autofocus="true">
<button type="button" id="add" class="addBtn">추가</button>
</from>
<div id="itemList"></div>
</div>
<!--로또 게임-->
<header>
<h2 class="title">로또 추첨기</h2>
</header>
<div class="content">
<div class="rottoNum_wrap"> <!--로또공(?)이 들어갈 영역 -->
<div class="ball" id="num1"><span>?</span></div>
<!--동일하게 동그란 모양을 만들기 위해 class로 ball 주기-->
<div class="ball" id="num2"><span>?</span></div>
<div class="ball" id="num3"><span>?</span></div>
<div class="ball" id="num4"><span>?</span></div>
<div class="ball" id="num5"><span>?</span></div>
<div class="ball" id="num6"><span>?</span></div>
<div class="plus">+</div>
<div class="ball bonus" id="num7"><span>?</span></div>
<!-- 보너스번호는 공의 색깔을 다르게 주기위해 bonus로 클래스명 주기 -->
<div class="btn_wrap"> <!--버튼영역-->
<input class ="btn" type="button" value="추첨하기" onclick="getNum()">
<!-- // 클릭된다면 getNum() 함수가 실행되게 하기 -->
</div>
</div>
</div>
</div>
<div id="Youtube" class="tabcontent">
<div class="channel">
<div class="bg-text">
<div id="subtitle">
<h1 style="color: black;">LOGIN</h1>
</div>
<p>
"ID | "
<input type="text" name="id" id="id"
</p>
<p>
"PW | "
<input type="text" name="pw" id="pw" style="-webkit-text-security: disc;">
</p>
<button onclick="login()">로그인</button>
<button onclick="login()">회원가입</button>
<p id="demo"></p>
<button class="btn success">
<a href="index.html">main</a>
</button>
</div>
</div>
</div>
<script>
//사진 넘기기
const slides = document.querySelectorAll("#container > img");
const prev = document.querySelector("#prev");
const next = document.querySelector("#next");
let current = 0;
showSlide(current);
prev.addEventListener("click", prevSlide);
next.addEventListener("click", nextSlide);
function showSlide(n){
for(let i=0;i<slides.length;i++){
slides[i].style.display = "none";
}
slides[n].style.display = "block";
}
function prevSlide(){
if(current > 0){
current -= 1;
}
else current = slides.length -1 ;
showSlide(current);
}
function nextSlide(){
if(current < slides.length - 1){
current += 1;
}
else current = 0;
showSlide(current);
}
function openPage(pageName, elmnt, color) {
// Hide all elements with class="tabcontent" by default */
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
// Remove the background color of all tablinks/buttons
tablinks = document.getElementsByClassName("tablink");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].style.backgroundColor = "";
}
// Show the specific tab content
document.getElementById(pageName).style.display = "block";
// Add the specific color to the button used to open the tab content
elmnt.style.backgroundColor = color;
}
// Get the element with id="defaultOpen" and click on it
document.getElementById("defaultOpen").click();
function clickEvent(){
document.getElementById("img").src = "discord.png";
}
function clickEvent(){
document.getElementById("img").src = "Naver.jpg";
}
//할 목록
var itemList = [];
var addBtn = document.querySelector("#add");
addBtn.addEventListener("click", addList);
function showList(){
var list = "<ul>";
for(var i=0; i<itemList.length; i++){
list += "<li>" + itemList[i] + "<span class='close' id="+ i +">X</span></li>";
}
list += "</ul>";
document.querySelector("#itemList").innerHTML = list;
var remove = document.querySelectorAll(".close");
for (var i=0; i<remove.length; i++){
remove[i].addEventListener("click",removeList);
}
}
function addList(){
var item = document.querySelector("#item").value;
if (item !== '') {
itemList.push(item);
document.querySelector("#item").value = "";
document.querySelector("#item").focus();
}
showList();
}
function removeList(){
var id = this.getAttribute("id");
itemList.splice(id, 1);
showList();
}
//로또
function getNum(){
let ball = document.getElementsByClassName("ball");
for(let i=0;i<ball.length;i++){
ball[i].innerHTML = '<span>?</span>';
}
let rottoNum = [];
for(let i=0;i<7;i++){
rottoNum[i] = Math.floor((Math.random()*45)+1);
for(let j=0;j<i;j++){
if(rottoNum[i] == rottoNum[j]){
i--;
break;
}
}
}
for(let i=0;i<rottoNum.length; i++){
let ball = document.getElementById("num"+(i+1));
setTimeout(function(){
ball.innerHTML = `<span>${rottoNum[i]}</span>`;
}, i*1000);
}
}
//login page
function login(){
document.getElementById("demo").innerHTML = "구현 X";
}
</script>
</div>
</body>
</html>