-
Notifications
You must be signed in to change notification settings - Fork 8
/
search.html
208 lines (181 loc) · 9.79 KB
/
search.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
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>Gravity</title>
<meta name="description" content="">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui">
<!-- Stylesheets -->
<link rel="stylesheet" href="css/robotofont.css" type="text/css">
<link rel="stylesheet" href="css/icon.css">
<link rel="stylesheet" href="css/animsition.css">
<link rel="stylesheet" type="text/css" href="css/sweetalert.css">
<link rel="stylesheet" href="css/material.teal-deep_orange.min.css">
<link rel="stylesheet" href="css/swipebox.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="animsition">
<!-- Header -->
<div class="mdl-layout mdl-js-layout mdl-layout--overlay-drawer-button">
<header class="mdl-layout__header mdl-layout__header--waterfall">
<div class="mdl-layout__header-row">
<!-- Title -->
<span class="mdl-layout-title">Search</span>
<!-- Spacer -->
<div class="mdl-layout-spacer"></div>
<!-- Right Menu -->
<div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable
mdl-textfield--floating-label mdl-textfield--align-right">
<label class="mdl-button mdl-js-button mdl-button--icon"
for="waterfall-exp">
<i class="material-icons">search</i>
</label>
<div class="mdl-textfield__expandable-holder">
<input class="mdl-textfield__input" type="text" name="searchbox"
id="waterfall-exp" onkeypress="handle(event)" />
</div>
<script>
function handle(e){
if(e.keyCode === 13){
//alert("Enter was pressed was presses");
var query = $("input[name=searchbox]").val();
window.location.href="search.html?q="+query;
}
return false;
}
</script>
</div>
</div>
</header>
<!-- Sidebar -->
<div class="mdl-layout__drawer">
<!-- Top -->
<div class="mdl-card mdl-shadow--2dp mdl-color--primary mdl-color-text--blue-grey-50 drawer-profile">
<div class="mdl-card__title user">
<img src="img/davidprasetyo.png" alt="" />
<span class="user-name">davidprasetyo.com</span>
<span class="user-mail">[email protected]</span>
<button id="user-menu" class="mdl-button mdl-js-button mdl-button--icon">
<i class="material-icons">arrow_drop_down</i>
</button>
</div>
<!-- Top-right User -->
</div>
<!-- Dropdown Menu -->
<ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect" for="user-menu">
<a href="http://www.emailmeform.com/builder/form/aefcut4Uoy6NLmf40z" >
<li class="mdl-menu__item">Contacts</li>
</a>
</ul>
<!-- Main Navigation -->
<nav class="mdl-navigation">
<a class="mdl-navigation__link animsition-link" href="index.html"><i class="material-icons">home</i><span>Home</span></a>
<a class="mdl-navigation__link animsition-link" href="https://about.me/davidprasetyo"><i class="material-icons">account_circle</i><span>Profile</span></a>
<div class="mdl-collapse">
<a class="mdl-navigation__link mdl-collapse__button"><i class="material-icons">image</i>
<i class="material-icons mdl-collapse__icon mdl-animation--default">expand_more</i>
<span>Gallery</span>
</a>
<div class="mdl-collapse__content-wrapper">
<div class="mdl-collapse__content mdl-animation--default" style="margin-top: -156px;">
<a class="mdl-navigation__link animsition-link" href="masonry.html">Artworks</a>
</div>
</div>
</div>
<div class="mdl-collapse">
<a class="mdl-navigation__link mdl-collapse__button"><i class="material-icons">library_books</i>
<i class="material-icons mdl-collapse__icon mdl-animation--default">expand_more</i>
<span>Blog</span>
</a>
<div class="mdl-collapse__content-wrapper">
<div class="mdl-collapse__content mdl-animation--default" style="margin-top: -156px;">
<a class="mdl-navigation__link animsition-link" href="category.html?tag=Dunia IT">Dunia IT</a>
<a class="mdl-navigation__link animsition-link" href="category.html?tag=Research">IT Development</a>
<a class="mdl-navigation__link animsition-link" href="category.html?tag=Tutorial IT">Tutorial</a>
<a class="mdl-navigation__link animsition-link" href="category.html?tag=Movies">Film & Review</a>
<a class="mdl-navigation__link animsition-link" href="category.html?tag=Kana Hanazawa">Ngidol Hanakana</a>
<a class="mdl-navigation__link animsition-link" href="category.html?tag=JKT48">Ngidol Jiketi</a>
<a class="mdl-navigation__link animsition-link" href="category.html?tag=opini">Opini</a>
<a class="mdl-navigation__link animsition-link" href="search.html?q=download">Download</a>
</div>
</div>
</div>
<a class="mdl-navigation__link animsition-link" href="liveupdates.html"><i class="material-icons">queue_music</i><span>Live Updates</span></a>
<a class="mdl-navigation__link animsition-link" href="savedlist.html"><i class="material-icons">folder</i><span>Saved Articles</span></a>
<div class="drawer-separator"></div>
<div class="mdl-collapse">
<a class="mdl-navigation__link mdl-collapse__button"><i class="material-icons">apps</i>
<i class="material-icons mdl-collapse__icon mdl-animation--default">expand_more</i>
<span>App</span>
</a>
<div class="mdl-collapse__content-wrapper">
<div class="mdl-collapse__content mdl-animation--default" style="margin-top: -156px;">
<a class="mdl-navigation__link animsition-link" href="https://accounts.google.com/Login">Login</a>
<a class="mdl-navigation__link animsition-link" href="http://www.emailmeform.com/builder/form/aefcut4Uoy6NLmf40z">Contacts</a>
</div>
</div>
</div>
</nav>
</div>
<!-- Page Content -->
<main class="mdl-layout__content mdl-color--white">
<section class="mdl-layout__tab-panel is-active" id="scroll-tab-1"> <!-- first tab -->
<div class="player-featured"> <!-- featured cards -->
<p><strong>Result(s)</strong>
</p>
<div class="player-featured" id="total_result"> No Result</div>
<div class="mdl-grid">
<script type="text/javascript">
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
var resultnum ;
function NewContent(json) {
resultnum = json.feed.openSearch$totalResults.$t;
for (var i = 0; i < resultnum; i++) {
var judul = json.feed.entry[i].title.$t;
var postID = json.feed.entry[i].id.$t;
resultnum = json.feed.openSearch$totalResults.$t;
var postID = postID.substr(postID.indexOf("post-") + 5);
document.getElementById("total_result").innerHTML= " "+resultnum +" Result(s)";
if(typeof json.feed.entry[i].media$thumbnail === 'undefined'){
thumbImg="images/no-image.jpeg";
}else{
thumbImg=json.feed.entry[i].media$thumbnail.url;
}
if (judul.length > 30){
var judul = judul.substring(0, 30)+'...';
}
var featuredPost = '<div class="mdl-cell mdl-cell--6-col"><div class="mdl-card mdl-shadow--2dp"><a href="article.html?postid='+ postID +'"><img src="'+thumbImg+'" alt="" /></a><span><strong> '+judul+'</strong></span></div></div>';
document.write(featuredPost);
}
document.write('</div></div>');
}
</script>
<script language="javascript" type="text/javascript">
var i=101;
var m=100;
var s=1;
var query = getParameterByName('q');
document.write("<script language='javascript' type='text/javascript' src='http://www.davidprasetyo.com/feeds/posts/summary?q="+ query +"&start-index="+s+"&orderby=published&max-results="+m+"&alt=json-in-script&callback=NewContent'><\/sc" + "ript>");
</script>
</ul>
</div>
</section>
</main>
</div>
</div>
<script src="js/jquery-2.1.4.min.js"></script>
<script src="js/animsition.js"></script>
<script src="js/sweetalert.min.js"></script>
<script src="js/material.min.js"></script>
<script src="js/jquery.swipebox.min.js"></script>
<script src="js/function.js"></script>
</body>
</html>