forked from haideralipunjabi/youtuber-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
blog.html
93 lines (83 loc) · 2.6 KB
/
blog.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
<link rel="icon" href="mr_quackers.png">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Blog | Will M</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<br>
<h1 style="text-align: center">Medium Blog Articles</h1>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-dateFormat/1.0/jquery.dateFormat.js"></script>
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<script type="text/javascript">
$(function () {
var $content = $('#prita-medium-content');
var data = {
rss_url: 'https://medium.com/feed/@willmccrudden'
};
$.get('https://api.rss2json.com/v1/api.json', data, function (response) {
if (response.status == 'ok') {
var output = '';
$.each(response.items, function (k, item) {
output += '<img style="width: 200px; border-radius: 10px" src="' + item.thumbnail + '"></img><br> <div class="medium-blog-post" onclick="window.open(\'' + item.guid + '\',\'mywindow\');">'
output += '<div class="medium-blog-title"><h3>' + item.title + '</h3></div>';
output += '<div class="medium-blog-date">' + $.format.date(item.pubDate, "MMMM dd, yyyy") + '</div>';
output += '</div>';
return k < 4;
});
$content.html(output).hide();
$content.fadeIn('slow');
}
});
});
</script>
<style>
h3 {
font-weight:normal !important;
}
.button {
background-color: #2C2F33;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
body {font-family: 'Open Sans'; margin: auto;}
.medium-blog-post {
display: table;
cursor: pointer;
transition: background-color 0.15s ease-in, transform 0.2s ease-in;
margin-bottom: 7px;
}
.medium-blog-title {
display: table-cell;
background-color: #37536A;
color: #FFFFFF;
padding: 0px 10px;
}
.medium-blog-title h2 {
margin: 0;
}
.medium-blog-date {
position: relative;
display: table-cell;
color: #FFFFFF;
background-color: #7289DA; /*vibblue*/
height: 100%;
margin-top: 0px;
padding: 10px;
}
.medium-blog-post:hover {
background-color: #7289DA; /*vibblue*/
transform: scale(1.02);
}
</style>
<center>
<div id="prita-medium-content"></div>
<br>
<a href="//medium.com/@willmccrudden" class="button">View All on Medium</a>
</center>