-
Notifications
You must be signed in to change notification settings - Fork 0
/
index2.html
293 lines (267 loc) · 9.77 KB
/
index2.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
<!DOCTYPE html>
<html>
<head>
<title>Welcome</title>
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous">
</script>
<script src="jquery.touchSlider.js"></script>
<meta name="viewport" content="width=device-width, user-scalable=no">
<link rel="stylesheet" href="common.css"/>
</head>
<style>
body{
background-color:#f9cc51;
color:#424242;
}
.mainBox{
margin-top:80px;
display:flex;
justify-content:center;
}
.iconBox{
display: flex;
justify-content:center;
align-items: center;
border-radius: 50%;
width:60vw;
height:60vw;
background-color:white;
}
.iconBox > img{
width:10rem;
height:10rem;
}
.textHead{
text-align: center;
font-size:17pt;
font-weight: bold;
margin:10px;
}
.textBody{
text-align: center;
font-size:10pt;
font-weight: bold;
margin:10px;
}
.loginBtn{
border:0px;
background-color:white;
border-radius:2px;
width:80%;
box-shadow: 3px 3px 1px #ffbf00;
height: 2.5rem;
display: flex;
justify-content: center;
align-items: center;
}
.flexBox{
display:flex;
justify-content: center;
}
.ts-paging-btn{
display: inline-block;
width: 10px;
height: 0;
max-height: 10px;
padding-top: 10px;
margin-left: 7px;
border-radius: 5px;
background: white;
overflow: hidden;
}
.ts-paging-active{
background-color:red;
}
#touchSlider { position:relative; overflow:hidden; }
#touchSlider ul { position:relative; overflow:hidden; }
#touchSlider ul li { height:400px; position: relative; }
.slideBtn{
width:10px;height: 10px; border-radius:50%;background-color:white;
margin:10px;
}
</style>
<body>
</div>
<style>
html, body { box-sizing: border-box; padding: 0; margin: 0; text-align: center; }
*, *:before, *:after { box-sizing: inherit; }
.clearfix:after { content: ''; display: block; clear: both; float: none; }
.title { margin-bottom: 0; text-align: center; font-size: 30px; color: #333; }
.link, .link:visited { display: inline-block; margin: 20px 0; color: #555; text-decoration: none; font-weight: bold; }
.link:hover, .link:focus { color: #9fd6c2; }
/* container - body */
#container { width: 300vw; margin: auto; }
.slide_wrap { position: relative; width: 60vw; margin: auto; padding-bottom: 30px; }
.slide_box { width: 60vw; margin: auto; overflow-x: hidden; }
.slide_content { display: table; float: left; width: 60vw; height: 68vw; }
/*.slide_content > p { display: table-cell; vertical-align: middle; text-align: center; font-size: 100px; font-weight: bold; color: #555; }*/
/*.slide_content.slide01 { background: #ddbdff; }*/
.slide_content.slide02 { background: #9fd6c2; }
.slide_content.slide03 { background: #abe2f7; }
.slide_content.slide04 { background: #f08c78; }
.slide_content.slide05 { background: #fbdb65; }
.slide_btn_box > button { position: absolute; top: 50%; margin-top: -45px; width: 60px; height: 60px; font-size: 16px; color: #999; background: none; border: 1px solid #ddd; cursor: pointer; }
.slide_btn_box > .slide_btn_prev { left: -100px; }
.slide_btn_box > .slide_btn_next { right: -100px; }
.slide_pagination { /*position: absolute; left: 50%; bottom: 0; list-style: none; margin: 0; padding: 0; transform: translateX(-50%);*/ }
.slide_pagination .dot { display: inline-block; width: 15px; height: 15px; margin: 0 5px; overflow: hidden; background: white; border-radius: 50%; transition: 0.3s; }
.slide_pagination .dot.dot_active { background: red; }
.slide_pagination .dot a { display: block; width: 100%; height: 100%; }
</style>
<div class="mainBox">
<div id="container">
<div class="slide_wrap">
<div class="slide_box">
<div class="slide_list clearfix">
<div class="slide_content slide01">
<div class="iconBox">
<img src="./sea.png" />
</div>
<p class="textHead">빠른 이수학점 계산</p>
<p class="textBody">이제 엑셀로 하나하나 계산하지 말고 빠르게<br>자동 계산의 편함을 느껴보세요를레이호</p>
</div>
<div class="slide_content slide02">
<p>2</p>
</div>
<div class="slide_content slide03">
<p>3</p>
</div>
<div class="slide_content slide04">
<p>4</p>
</div>
<div class="slide_content slide05">
<p>5</p>
</div>
</div>
<!-- // .slide_list -->
</div>
<!-- // .slide_box -->
<div class="slide_btn_box">
<button type="button" class="slide_btn_prev">Prev</button>
<button type="button" class="slide_btn_next">Next</button>
</div>
<!-- // .slide_btn_box -->
<div class="felxBox">
<ul class="slide_pagination"></ul>
</div>
<!-- // .slide_pagination -->
</div>
<!-- // .slide_wrap -->
</div>
</div>
<div >
</div>
<!-- <div style="display:flex;justify-content: center;">
<div class="slideBtn" style="background: red"></div>
<div class="slideBtn"></div>
<div class="slideBtn"></div> -->
</div>
<div class="flexBox" style="margin-top:15vh;">
<div class="loginBtn" onclick="location.href ='login.html'">
Login
</div>
</div>
<div style="position:absolute;bottom:0px;left:50%;transform:translateX(-50%);color:#7B7D7D">Copyright @knu_project</div>
<script>
$("#touchSlider").touchSlider({
// ... Options
btn_prev:false,
btn_next:false,
controls : false,
page: 1,
speed:300
});</script>
<script>
(function () {
const slideList = document.querySelector('.slide_list'); // Slide parent dom
const slideContents = document.querySelectorAll('.slide_content'); // each slide dom
const slideBtnNext = document.querySelector('.slide_btn_next'); // next button
const slideBtnPrev = document.querySelector('.slide_btn_prev'); // prev button
const pagination = document.querySelector('.slide_pagination');
const slideLen = slideContents.length; // slide length
const slideWidth = 60; // slide width
const slideSpeed = 300; // slide speed
const startNum = 0; // initial slide index (0 ~ 4)
slideList.style.width = slideWidth * (slideLen + 2) + "vw";
// Copy first and last slide
let firstChild = slideList.firstElementChild;
let lastChild = slideList.lastElementChild;
let clonedFirst = firstChild.cloneNode(true);
let clonedLast = lastChild.cloneNode(true);
// Add copied Slides
slideList.appendChild(clonedFirst);
slideList.insertBefore(clonedLast, slideList.firstElementChild);
// Add pagination dynamically
let pageChild = '';
for (var i = 0; i < slideLen; i++) {
pageChild += '<li class="dot';
pageChild += (i === startNum) ? ' dot_active' : '';
pageChild += '" data-index="' + i + '"><a href="#"></a></li>';
}
pagination.innerHTML = pageChild;
const pageDots = document.querySelectorAll('.dot'); // each dot from pagination
slideList.style.transform = "translate3d(-" + (slideWidth * (startNum + 1)) + "vw, 0px, 0px)";
let curIndex = startNum; // current slide index (except copied slide)
let curSlide = slideContents[curIndex]; // current slide dom
curSlide.classList.add('slide_active');
/** Next Button Event */
slideBtnNext.addEventListener('click', function() {
if (curIndex <= slideLen - 1) {
slideList.style.transition = slideSpeed + "ms";
slideList.style.transform = "translate3d(-" + (slideWidth * (curIndex + 2)) + "vw, 0px, 0px)";
}
if (curIndex === slideLen - 1) {
setTimeout(function() {
slideList.style.transition = "0ms";
slideList.style.transform = "translate3d(-" + slideWidth + "vw, 0px, 0px)";
}, slideSpeed);
curIndex = -1;
}
curSlide.classList.remove('slide_active');
pageDots[(curIndex === -1) ? slideLen - 1 : curIndex].classList.remove('dot_active');
curSlide = slideContents[++curIndex];
curSlide.classList.add('slide_active');
pageDots[curIndex].classList.add('dot_active');
});
/** Prev Button Event */
slideBtnPrev.addEventListener('click', function() {
if (curIndex >= 0) {
slideList.style.transition = slideSpeed + "ms";
slideList.style.transform = "translate3d(-" + (slideWidth * curIndex) + "vw, 0px, 0px)";
}
if (curIndex === 0) {
setTimeout(function() {
slideList.style.transition = "0ms";
slideList.style.transform = "translate3d(-" + (slideWidth * slideLen) + "vw, 0px, 0px)";
}, slideSpeed);
curIndex = slideLen;
}
curSlide.classList.remove('slide_active');
pageDots[(curIndex === slideLen) ? 0 : curIndex].classList.remove('dot_active');
curSlide = slideContents[--curIndex];
curSlide.classList.add('slide_active');
pageDots[curIndex].classList.add('dot_active');
});
/** Pagination Button Event */
let curDot;
Array.prototype.forEach.call(pageDots, function (dot, i) {
dot.addEventListener('click', function (e) {
e.preventDefault();
curDot = document.querySelector('.dot_active');
curDot.classList.remove('dot_active');
curDot = this;
this.classList.add('dot_active');
curSlide.classList.remove('slide_active');
curIndex = Number(this.getAttribute('data-index'));
curSlide = slideContents[curIndex];
curSlide.classList.add('slide_active');
slideList.style.transition = slideSpeed + "ms";
slideList.style.transform = "translate3d(-" + (slideWidth * (curIndex + 1)) + "vw, 0px, 0px)";
});
});
})();
</script>
</div>
</div>
</body>
</html>