forked from prasetyodavid/davidwebapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
280 lines (239 loc) · 12.9 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
<!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">Home</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>
<div class="mdl-layout__tab-bar mdl-js-ripple-effect">
<a href="#scroll-tab-1" class="mdl-layout__tab is-active">New</a>
<a href="#scroll-tab-2" class="mdl-layout__tab">Popular</a>
</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">davidpras1994@gmail.com</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"> <!-- most watched -->
<p><strong>Featured Video</strong>
</p>
<script src="http://davithace.github.io/davidprasetyo/android/randomvideos.js"></script>
</div>
<div class="player-featured"> <!-- featured cards -->
<p>
<input type="button" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--accent pull-right" onclick="location.href='search.html?q=';" value="What's News ?" />
</p>
<div class="mdl-grid">
<script type="text/javascript">
function NewContent(json) {
for (var i = 0; i < 8; i++) {
var judul = json.feed.entry[i].title.$t;
var postID = json.feed.entry[i].id.$t;
var postID = postID.substr(postID.indexOf("post-") + 5);
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>');
}
function myhref(postID){
var n = postID.toString();
location.href="article.html?postid=" + n;
}
function NewContent2(json) {
var x = 1;
document.write('<div class="player-contents"> <!-- playing now list --><p><strong>Blog Posts </strong><a href="search.html?q="><button class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--accent"> READ MORE</button> </a></p><ul>');
for (var i = 0; i < json.feed.entry.length; i++) {
var judul = json.feed.entry[i].title.$t;
var postID = json.feed.entry[i].id.$t;
var postID = postID.substr(postID.indexOf("post-") + 5);
if (judul.length > 30){
var judul = judul.substring(0, 30)+'...';
}
var n = "'"+postID.toString()+"'";
var postsList = '<li onclick="myhref('+n+');">'+ x + ' '+judul+'<a href="article.html?postid=' + postID +'" class="mdl-button mdl-js-button mdl-button--icon"><i class="material-icons">chevron_right</i></a></li>' ;
document.write(postsList);
x++;
}
}
</script>
<script language="javascript" type="text/javascript">
var i=10;
var m=9;
var s=1;
document.write("<script language='javascript' type='text/javascript' src='http://www.davidprasetyo.com/feeds/posts/summary?start-index="+s+"&orderby=published&max-results="+m+"&alt=json-in-script&callback=NewContent'><\/sc" + "ript>");
document.write("<script language='javascript' type='text/javascript' src='http://www.davidprasetyo.com/feeds/posts/summary?start-index="+i+"&orderby=published&max-results="+m+"&alt=json-in-script&callback=NewContent2'><\/sc" + "ript>");
</script>
</ul>
</div>
</section>
<section class="mdl-layout__tab-panel" id="scroll-tab-2"> <!-- tab 2 -->
<div class="player-featured">
<p><strong>Popular Posts</strong>
</p>
</div>
<div class="mdl-grid">
<script type="text/javascript">
function NewContent(json) {
for (var i = 0; i < 8; i++) {
var judul = json.feed.entry[i].title.$t;
var postID = json.feed.entry[i].id.$t;
var postID = postID.substr(postID.indexOf("post-") + 5);
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>');
}
var i=10;
var m=9;
var s=1;
var tags = 'popular' //postID
document.write("<script language='javascript' type='text/javascript' src='http://www.davidprasetyo.com/feeds/posts/summary/-/" + tags + "?start-index="+s+"&orderby=published&max-results="+m+"&alt=json-in-script&callback=NewContent'><\/sc" + "ript>");
</script>
</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>
<script type="text/javascript">
//initialstorage
if(localStorage.getItem("init") == null){
localStorage.setItem("init", 0);
}
</script>
</body>
</html>