-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
294 lines (240 loc) · 10.3 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
<title>Rate this send</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Gowun+Dodum&display=swap');
* {
font-family: 'Gowun Dodum', sans-serif;
}
.mytitle {
background-color: green;
color: white;
height: 250px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(https://movie-phinf.pstatic.net/20210715_95/1626338192428gTnJl_JPEG/movie_image.jpg);
background-position: center;
background-size: cover;
}
.mytitle>button {
width: 250px;
height: 50px;
background-color: transparent;
border: 1px solid white;
border-radius: 50px;
color: white;
margin-top: 20px;
}
.mytitle>button:hover {
border: 2px solid white;
}
.mycomment {
color: grey
}
.mycards {
width: 1200px;
margin: 20px auto 20px auto;
}
.mypost {
width: 500px;
margin: 20px auto 20px auto;
padding: 20px 20px 20px 20px;
box-shadow: 0px 0px 3px 0px gray;
}
.mybtn {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin-left: 20px;
}
.mybtn>button {
margin: 5px 5px 5px 5px;
}
.boulder-grade {
display: flex;
align-items: center;
}
.grade-lightblue {
width: 60px;
height: 18px;
background-color: skyblue;
margin: 0px 10px 0px 10px;
}
.grade-blue {
width: 60px;
height: 18px;
background-color: blue;
margin: 0px 10px 0px 10px;
}
</style>
<script>
//$(document).ready(function () {
setInterval(function () {
// console.log('갱신')
fetch("http://spartacodingclub.shop/sparta_api/weather/seoul").then(res => res.json()).then(data => {
let temp = data['temp']
$('#weather').empty()
$('#weather').append(`${temp}˚C`)
let now = new Date()
$('#timenow').text(`${now.getHours()}시 ${now.getMinutes()}분 ${now.getSeconds()}초`)
})
}, 1000); //1000은 갱신되는 시간으로, 1초 = 1000
function submit_boulder() {
alert('준비중임 ㅋ')
}
//내 채널ID : UCqnLcS4GU56jiaxXpHjK8Kw
//무호K 채널ID :
fetch("https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=25&channelId=UCqnLcS4GU56jiaxXpHjK8Kw&type=video&key=AIzaSyCqiTD9cHZpp3HYU8JcMvtI4pD6svd-SVA").then(res => res.json()).then(vids_data => {
let vids_list = vids_data['items']
vids_list.forEach((elem) => {
let vid_title = elem['snippet']['title']
let vid_id = elem['id']['videoId']
let temp_html = ` <div class="col">
<div class="card h-100">
<div class="video-container">
<iframe width="280" height="500" src="https://www.youtube.com/embed/${vid_id}" frameborder="0"
allowfullscreen></iframe>
</div>
<div class="card-body">
<h5 class="card-title">${vid_title}</h5>
<p class="card-text">가져온동영상(코멘트없음)</p>
<div class="boulder-grade">
Grade
<div>(가져온동영상)</div>
</div>
<p>만족도 ⭐⭐⭐(가져온동영상)</p>
</div>
</div>
</div>`
// console.log(temp_html)
$('#cards').append(temp_html)
})
})
//})
</script>
</head>
<body>
<div class="mytitle">
<h1>나의 클라이밍 기록</h1>
<div> 현재 서울 날씨: <span id="weather"></span></div>
<div> 현재 한국 시간: <span id="timenow"></span></div>
<button onclick="submit_boulder()">볼더 기록하기</button>
</div>
<div class="mypost">
<div class="form-floating mb-3">
<input type="email" class="form-control" id="floatingInput" placeholder="[email protected]">
<label for="floatingInput">영상 URL</label>
</div>
<div class="form-floating mb-3">
<textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea"></textarea>
<label for="floatingTextarea">날짜,장소</label>
</div>
<div class="form-floating mb-3">
<textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea"></textarea>
<label for="floatingTextarea">한줄평</label>
</div>
<select class="form-select form-select-sm" aria-label=".form-select-sm example">
<option selected>난이도</option>
<option value="1">lightblue</option>
<option value="2">blue</option>
</select>
<select class="form-select form-select-sm" aria-label=".form-select-sm example">
<option selected>만족도</option>
<option value="1">⭐</option>
<option value="2">⭐⭐</option>
<option value="3">⭐⭐⭐</option>
<option value="4">⭐⭐⭐⭐</option>
<option value="5">⭐⭐⭐⭐⭐</option>
</select>
</div>
<div class='mybtn'>
<button type="button" class="btn btn-dark">기록하기</button>
<button type="button" class="btn btn-outline-dark">닫기</button>
</div>
</div>
<div class='mycards'>
<div id="cards" class="row row-cols-1 row-cols-md-4 g-4">
<div class="col">
<div class="card h-100">
<div class="video-container">
<iframe width="280" height="500" src="https://www.youtube.com/embed/aAIhJkz0sIs" frameborder="0"
allowfullscreen></iframe>
</div>
<div class="card-body">
<h5 class="card-title">23.03.22 서볼</h5>
<p class="card-text">첫무브가 보기보다힘듬</p>
<div class="boulder-grade">
Grade
<div class="grade-lightblue"></div>
</div>
<p>만족도 ⭐⭐⭐⭐</p>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="video-container">
<iframe width="280" height="500" src="https://www.youtube.com/embed/n-8cai9P52w" frameborder="0"
allowfullscreen></iframe>
</div>
<div class="card-body">
<h5 class="card-title">23.03.22 서볼</h5>
<p class="card-text">탑전 슬로퍼 사악</p>
<div class="boulder-grade">
Grade
<div class="grade-lightblue"></div>
</div>
<p>만족도 ⭐⭐⭐⭐⭐</p>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="video-container">
<iframe width="280" height="500" src="https://www.youtube.com/embed/hTJT6c6Cy6M" frameborder="0"
allowfullscreen></iframe>
</div>
<div class="card-body">
<h5 class="card-title">23.03.18 더클양재</h5>
<p class="card-text">첫무브 멀어서 꽤힘듬</p>
<div class="boulder-grade">
Grade
<div class="grade-blue"></div>
</div>
<p>만족도 ⭐⭐⭐</p>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<div class="video-container">
<iframe width="280" height="500" src="https://www.youtube.com/embed/FFsVAQ8ooTk" frameborder="0"
allowfullscreen></iframe>
</div>
<div class="card-body">
<h5 class="card-title">23.03.18 더클양재</h5>
<p class="card-text">발못써서 허접해보임</p>
<div class="boulder-grade">
Grade
<div class="grade-blue"></div>
</div>
<p>만족도 ⭐⭐⭐</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>