forked from thelastdocu/thelastdocu.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.html
278 lines (202 loc) · 10.6 KB
/
page.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
<!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">
<title>The Last Docu::Docu info</title>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,800italic,800,700italic,700,600italic,400italic,600,300italic,300|Oswald:400,300,700' rel='stylesheet' type='text/css'>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/owl.carousel.css" rel="stylesheet">
<link href="css/owl.theme.css" rel="stylesheet">
<link href="css/owl.transitions.css" rel="stylesheet">
<link href="css/style_list_by_tag.css" rel="stylesheet">
<link href="css/style-temp.css" rel="stylesheet">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-127041622-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-127041622-1');
</script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="js/html5shiv.min.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target=".main-nav">
<header class="st-navbar st-navbar-mini">
<nav class="navbar navbar-default navbar-fixed-top clearfix" role="navigation">
<div class="container"><!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#sept-main-nav">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html"><img src="photos/logo3.png" alt="" class="img-responsive"></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse main-nav" id="sept-main-nav">
<ul class="nav navbar-nav navbar-right">
<li><a href="index.html#home">Home</a></li>
<li><a href="index.html#about">About</a></li>
<li><a href="index.html#search">Search</a></li>
<li class="active"><a href="index.html#portfolio">Docu</a></li>
<li><a href="index.html#testimonials">MacNGrmaS</a></li>
<!-- <li><a href="index.html#call-us">Contact</a></li> -->
</ul>
</div><!-- /.navbar-collapse -->
</div>
</nav>
</header>
<section class="faq-sec" id="faq-sec">
<div class="container">
<div class="row">
<div class="col-md-12">
<!-- <h2 class="tac">frequently asked questions</h2> -->
<div class='section-title st-center'>
</div>
<div class = "medal" style="text-align:center; margin-bottom:40px;">
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="faq">
<div class="hashtag">
<h3><i class="fa fa-question-circle"></i> #Hashtag </h3>
</div>
<div class="Recommend">
<h3><i class="fa fa-question-circle"></i> Recommended Docu </h3>
<section class="newgrid">
</section>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- function test -->
<script type="text/javascript">
function getUrlParams() {
var params = {};
var uri_dec = decodeURIComponent(window.location.search);
uri_dec.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(str, key, value) { params[key] = value; });
return params;
} //end of geturlParams function
function getpagenum(){
var oParams = getUrlParams();
var page = oParams.page;
return page;
} //end of getkeyword function
// get grid section
var page = getpagenum();
page.replace(/'/g, "");
page *= 1;
var requestURL = 'https://thelastdocu.github.io/macngrams_docu.json';
var request = new XMLHttpRequest();
request.open('GET', requestURL);
request.responseType = 'json';
request.send();
request.onload = function() {
getdata = request.response;
getgrid(getdata);
// window.setTimeout(applyGrid, 50);
gettitlename(getdata);
gettag(getdata);
getaward(getdata);
// getgrid(getdata);
}
function gettitlename(jsonObj) {
var html = [];
var section = document.querySelector('section.faq-sec .section-title');
var pageset = jsonObj[page];
html.push("<h3>" + pageset.tv + " / "+ pageset.title + " / " + pageset.dates +"</h3>");
html.push("<p>" + pageset.epi + "</p>")
html.push("<a href = \"" + pageset.links + "\" class = \"btn btn-main btn-lg\">바로가기</a>");
var temphtml = html.join('');
temphtml.replace(/>,</gi, /> </);
section.innerHTML = temphtml;
} // end of gettitlename function
function gettag(jsonObj) {
var pageset = jsonObj[page];
var section = document.querySelector('section.faq-sec .hashtag');
var keyarray = pageset.vod_key.replace("[", "").replace("]","").replace(/'/g, "").replace(/ /g,"");
var vod_key = keyarray.split(',');
if (vod_key.length < 1) {
} else{
var myfieldset = document.createElement("fieldset")
myfieldset.setAttribute("class", "group");
for (var i = 0; i < vod_key.length; i++) {
var thistag = vod_key[i];
var myButton = document.createElement("a");
myButton.setAttribute("class", "btn btn-default");
myButton.setAttribute("style", "margin: 3px;")
myButton.setAttribute("href", "listbytag.html?tag=" + thistag);
myButton.textContent = thistag;
myfieldset.appendChild(myButton);
}
section.appendChild(myfieldset);
} //end of else
} //end of gettag function
function getaward(jsonObj) {
var pageset = jsonObj[page];
var section = document.querySelector('section.faq-sec .medal');
var html = [];
if (pageset.awards != 0) {
html.push("<img src=\"images/winner.png\">");
html.push("<h5>이 다큐멘터리는 이 달의 좋은 프로그램상을 수상을 한 작품입니다.</h5>");
var temphtml = html.join('');
temphtml.replace(/>,</gi, /> </);
section.innerHTML = temphtml;
}
}
function getgrid(jsonObj) {
var getdata = jsonObj[page];
var reco_list = getdata.reco;
var section = document.querySelector('section .newgrid');
var html = [];
var reco_array = reco_list.replace("[", "").replace("]","").replace(/ /g,"");
var recommendation = reco_array.split(',');
for (i = 0; i < 6; i++){
var reco_id = recommendation[i];
reco_id *= 1;
reco_id -= 1;
html.push("<article>");
html.push("<figure >");
var connecturl = "/page.html?page=" + (jsonObj[reco_id].id - 1);
html.push("<a href=" + connecturl + ">");
html.push("<h2>" + jsonObj[reco_id].epi.substring(0,16) + "...</h2>");
html.push("<p>" + jsonObj[reco_id].title + "</p></a>")
html.push("</figure>");
html.push("<img src = " + jsonObj[reco_id].image + " alt>");
html.push("</article>");
}
var temphtml = html.join('');
temphtml.replace(/>,</gi, /> </);
section.innerHTML = temphtml;
}
</script>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.easing.min.js"></script>
<script src="js/jquery.stellar.js"></script>
<script src="js/jquery.appear.js"></script>
<script src="js/jquery.nicescroll.min.js"></script>
<script src="js/jquery.countTo.js"></script>
<script src="js/jquery.shuffle.modernizr.js"></script>
<script src="js/jquery.shuffle.js"></script>
<script src="js/owl.carousel.js"></script>
<script src="js/jquery.ajaxchimp.min.js"></script>
<script src="js/script_stop.js"></script>
</body>
</html>