-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
375 lines (290 loc) · 12.1 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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- favicon -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<!-- W3 CSS -->
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<!-- Google Fonts and Material Icons -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- JQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<!-- W3 JS -->
<script src="https://www.w3schools.com/lib/w3.js"></script>
<style>
body,h1,h2,h3,h4,h5 {font-family: "Raleway", sans-serif}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
<title>Personal Blog</title>
</head>
<body class="w3-light-grey">
<!-- w3-content defines a container for fixed size centered content,
and is wrapped around the whole page content, except for the footer in this example -->
<div class="w3-content" style="max-width:1400px">
<!-- Header -->
<header class="w3-container w3-center w3-padding-32">
<h1><b>MY BLOG</b></h1>
<p>Welcome to my blog</p>
</header>
<!-- Grid -->
<div class="w3-row">
<!-- Blog entries -->
<div class="w3-col l8 s12">
<!-- Blog entry -->
<div class="w3-card-4 w3-margin w3-white" id="feat-blog">
<img src="/images/woods.jpg" alt="Nature" class="w3-image">
<div class="w3-container">
<h3 id="feat-blog-title"><b></b></h3>
<h5>
Posted on
<span class="w3-opacity" id="feat-blog-date"></span>
by <span class="w3-opacity" id="feat-blog-author"></span>
</h5>
</div>
<div class="w3-container" >
<p id="feat-blog-abstract"></p>
<div class="w3-row">
<div class="w3-col m8 s12">
<p>
<button class="w3-button w3-padding-large w3-white w3-border"
id="feat-blog-more">
<b>READ MORE »</b>
</button>
</p>
</div>
<div class="w3-col m4 w3-hide-small">
<p>
<span class="w3-padding-large w3-right">
<b>Comments</b>
<span id="feat-blog-comments-num" class="w3-tag"></span>
</span>
</p>
</div>
</div>
<div class="" id="feat-blog-body"></div>
</div>
<hr>
<script>
/* const featured = JSON.parse(
"https://my-json-server.typicode.com/dkoupats/jsondata/featuredpost/"
); */
$(document).ready(function(){
$.ajax(
{
url: "/posts/db.json"
, success: function(result){
console.log(result);
$("#feat-blog-title")
.text( result.featuredpost.title );
const date = new Date( result.featuredpost.date );
const month = [
"January", "February", "March", "April"
, "May", "June", "July", "August"
, "September", "October", "November", "December"
];
$("#feat-blog-date")
.text(
month[date.getMonth()] + ' '
+ date.getDate() + ', '
+ date.getFullYear()
);
$("#feat-blog-author")
.text( result.featuredpost.author );
// JSON.stringify(result.featuredpost.abstract);
$("#feat-blog-abstract").text( result.featuredpost.abstract );
$("#feat-blog-more").click("slow", function(){
for (let n = 0; n < result.featuredpost.body.length; n++) {
$("#feat-blog-body")
.add("p #para")
.text( result.featuredpost.body[n] );
}
$("#feat-blog-body").slideToggle("slow");
});
$("#feat-blog-comments-num").text( result.featuredpost.comments.length );
}
}
);
});
</script>
<!-- Blog entry -->
<div class="w3-card-4 w3-margin w3-white" id="blog0">
<img src="/images/skies.jpg" alt="Skies" class="w3-image">
<div class="w3-container">
<h3 id="blog0-title"><b></b></h3>
<h5>
Posted on
<span class="w3-opacity" id="blog0-date"></span>
by <span class="w3-opacity" id="blog0-author"></span>
</h5>
</div>
<div class="w3-container">
<p id="blog0-abstract"></p>
<div class="w3-row">
<div class="w3-col m8 s12">
<p>
<button class="w3-button w3-padding-large w3-white w3-border" id="blog0-more">
<b>READ MORE »</b>
</button>
</p>
</div>
<div class="w3-col m4 w3-hide-small">
<p>
<span class="w3-padding-large w3-right">
<b>Comments</b>
<span id="blog0-comments-num" class="w3-badge"></span>
</span>
</p>
</div>
</div>
<div class="" id="blog0-body"></div>
</div>
</div>
<hr>
<script>
$(document).ready(function(){
$.ajax(
{
url: "/posts/db.json"
, success: function(result){
$("#blog0-title")
.text( result.posts[0].title );
const date = new Date( result.posts[0].date );
const month = [
"January", "February", "March", "April"
, "May", "June", "July", "August"
, "September", "October", "November", "December"
];
$("#blog0-date")
.text(
month[date.getMonth()] + ' '
+ date.getDate() + ', '
+ date.getFullYear()
);
$("#blog0-author")
.text( result.posts[0].author );
// text(JSON.stringify(result.posts[0].abstract));
$("#blog0-abstract").text( result.posts[0].abstract );
$("#blog0-more").click("slow", function(){
for (let n = 0; n < result.posts[0].body.length; n++) {
$("#blog0-body")
.add("p #para")
.text( result.posts[0].body[n] );
}
$("#blog0-body").slideToggle("slow");
});
$("#blog0-comments-num").text( result.posts[0].comments.length );
}
}
);
});
</script>
</div><!-- END BLOG ENTRIES -->
<!-- Introduction menu -->
<div class="w3-col">
<!-- Papers -->
<div class="w3-auto w3-margin">
<div class="w3-container w3-padding">
<h4>Papers</h4>
</div>
<ul class="w3-ul w3-hoverable w3-white">
<li class="w3-padding-16">
<img src="/Papers/zbynek-burival-GrmwVnVSSdU-unsplash.jpg"
alt="Pump-jack mining crude oil with the sunset"
class="w3-left w3-margin-right" style="width:100px"
id="paper1-image">
<a href="/Papers/EnergySecurity.html"
>
<span class="w3-medium" id="paper1-title"></span>
</a>
<br>
<span class="w3-small" id="paper1-abstract"></span>
</li>
<script>
$(document).ready(function(){
$("#paper1-title")
.load("/Papers/EnergySecurity.html #pub-title");
$("#paper1-abstract")
.load("/Papers/EnergySecurity.html #abstract p");
});
</script>
<li class="w3-padding-16">
<img src="/images/logo_ashrae.png" alt="ASHRAE Logo"
class="w3-left w3-margin-right" style="width:50px">
<span class="w3-large">Lorem Ipsum</span>
<br>
<span>Praes tinci sed</span>
</li>
</ul>
</div>
<hr>
<!-- Labels / tags -->
<div class="w3-card w3-margin">
<div class="w3-container w3-padding">
<h4>Tags</h4>
</div>
<div class="w3-container w3-white">
<p>
<a id="tag-opinion" href="#opinion">
<span class="w3-tag w3-black w3-margin-bottom">Opinion</span>
</a>
<a id="tag-technology" href="#technology">
<span class="w3-tag w3-light-grey w3-small w3-margin-bottom">Technology</span>
</a>
<a id="tag-science" href="#science">
<span class="w3-tag w3-light-grey w3-small w3-margin-bottom">Science</span>
</a>
<span class="w3-tag w3-light-grey w3-small w3-margin-bottom">Travel</span>
<span class="w3-tag w3-light-grey w3-small w3-margin-bottom">Web Development</span>
<span class="w3-tag w3-light-grey w3-small w3-margin-bottom">Health</span>
<span class="w3-tag w3-light-grey w3-small w3-margin-bottom">DIY</span>
<span class="w3-tag w3-light-grey w3-small w3-margin-bottom">Ideas</span>
<span class="w3-tag w3-light-grey w3-small w3-margin-bottom">Games</span>
</p>
</div>
</div>
</div><!-- END Labels / tags -->
</div><!-- END Introduction Menu -->
</div><br><!-- END GRID -->
</div><!-- END w3-content -->
<!-- Footer -->
<footer class="w3-container w3-dark-grey w3-padding-32 w3-margin-top">
<div class="w3-bar">
<a href="https://www.facebook.com/">
<i class="fa fa-facebook-official w3-hover-opacity"></i>
Facebook
</a>
<a href="https://www.instagram.com">
<i class="fa fa-instagram w3-hover-opacity"></i>
Instagram
</a>
<a href="https://www.twitter.com/">
<i class="fa fa-twitter w3-hover-opacity"></i>
Twitter
</a>
<a href="https://www.linkedin.com/">
<i class="fa fa-linkedin w3-hover-opacity"></i>
LinkedIn
</a>
</div>
<hr>
<p>© Copyright Dimitris</p>
</footer>
<script>
</script>
</body>
</html>