-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelated-post-2.html
206 lines (201 loc) · 6.58 KB
/
related-post-2.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
<!DOCTYPE html>
<html dir='ltr' lang='id'>
<head>
<meta charset='utf-8'/>
<title>Related Post</title>
<style>
/* Reset CSS */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1.5;flex-flow:column wrap;}*{margin:0;padding:0}html{display:block}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{background:transparent}table{border-collapse:collapse;border-spacing:0}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif}
h1,h2,h3,h4,h5,h6{font-size:1em;font-weight:600;color:#262626}
a:link,a:hover,a:visited{color:#4285f4;text-decoration:none;outline:0;transition:all .3s}
/* Default CSS */
.f {
display:flex;
}
.if {
display:inline-flex;
}
.p15 {
padding:15px;
}
.p15-0 {
padding:15px 0;
}
.p5 {
padding:5px;
}
.p10 {
padding:10px;
}
.ml10 {
margin-left:10px;
}
.m05 {
margin:0 5px;
}
.r50 {
border-radius:50%;
}
.r25 {
border-radius:25px;
}
.r5 {
border-radius:5px;
}
.r4 {
border-radius:4px;
}
.bb {
border-bottom:1px solid #efefef;
}
.at {
align-items:center;
}
.jcc {
justify-content:center;
}
.jcsb {
justify-content:space-between;
}
.jcsa {
justify-content:space-around;
}
.fdr {
flex-direction:row;
}
.fdc {
flex-direction:column;
}
.fff {
background:#fff;
}
.000 {
background:#000;
}
.w100 {
width:100%;
}
.h100 {
height:100%;
}
.bs {
box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
}
.efe {
background:#efefef;
}
.mb15 {
margin-bottom:15px;
}
.mr10 {
margin-right:10px;
}
.ml10 {
margin-left:10px;
}
.b111 {
background:#111;
}
.post .post-title {
font-weight: 600;
color: #4285f4;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
max-height: 55px;
font-size: 18px;
line-height: 1.5;
margin: 10px 0;
}
.post__image {
height:50vh;
position:relative;
}
.snippet-thumbnail {
height: 100%;
object-fit: cover;
}
.snippet-thumbnail {
opacity: 0;
transition: all .6s ease;
transform: scale(.95) translateY(20px);
}
.snippet-thumbnail.active {
opacity: 1;
transform: scale(1) translateY(0);
}
.snippet {
font-size: 12px;
line-height: 1.5;
cursor: default;
}
@media only screen and (max-width:568px){span.news-text{display:none}}</style>
</head>
<body>
<ul>
<script>
function getQueryVariable(r) {
for (var l = window.location.search.substring(1).split("&"), e = 0; e < l.length; e++) {
var t = l[e].split("=");
if (t[0] == r) return t[1]
}
return !1
}
function saringtags(r, l) {
for (var e = r.split("<"), t = 0; t < e.length; t++) - 1 != e[t].indexOf(">") && (e[t] = e[t].substring(e[t].indexOf(">") + 1, e[t].length));
return e = e.join(""), e = e.substring(0, l - 1)
}
var simg = getQueryVariable("si"),
rsimg = (simg == false) ? "/s72-c/" : "/" + simg + "/";
function relpostimgcuplik(r) {
for (var l = 0; l < r.feed.entry.length; l++) {
var e = r.feed.entry[l];
reljudul[relnojudul] = e.title.$t, postcontent = "", "content" in e ? postcontent = e.content.$t : "summary" in e && (postcontent = e.summary.$t), relcuplikan[relnojudul] = saringtags(postcontent, numchars), postimg = "media$thumbnail" in e ? e.media$thumbnail.url.replace(/.*?:\/\//g, "//").replace(/\/s[0-9]+(\-c)?\//, rsimg) : "https://1.bp.blogspot.com/-LGEolwXn4BM/WS9-g9OMA_I/AAAAAAAAAU4/LWkMJrn8RI8m56N1U-10ZuLdAuFFJqTxQCLcB/s72/No%2BImage.png", relgambar[relnojudul] = postimg;
for (var t = 0; t < e.link.length; t++)
if ("alternate" == e.link[t].rel) {
relurls[relnojudul] = e.link[t].href;
break
} relnojudul++
}
}
function contains(r, l) {
for (var e = 0; e < r.length; e++)
if (r[e] == l) return !0;
return !1
}
function artikelterkait() {
for (var r = new Array(0), l = new Array(0), e = new Array(0), t = new Array(0), a = 0; a < relurls.length; a++) contains(r, relurls[a]) || (r.length += 1, r[r.length - 1] = relurls[a], l.length += 1, l[l.length - 1] = reljudul[a], e.length += 1, e[e.length - 1] = relcuplikan[a], t.length += 1, t[t.length - 1] = relgambar[a]);
for (reljudul = l, relurls = r, relcuplikan = e, relgambar = t, a = 0; a < reljudul.length; a++) {
var n = Math.floor((reljudul.length - 1) * Math.random()),
u = reljudul[a],
i = relurls[a],
s = relcuplikan[a],
o = relgambar[a];
reljudul[a] = reljudul[n], relurls[a] = relurls[n], relcuplikan[a] = relcuplikan[n], relgambar[a] = relgambar[n], reljudul[n] = u, relurls[n] = i, relcuplikan[n] = s, relgambar[n] = o
}
for (var g, c = 0, p = Math.floor((reljudul.length - 1) * Math.random()), m = p, d = getQueryVariable("pos"); c < relmaxtampil && (relurls[p] == d || (g = "<article class='news-title p5 mb15 post'>", g += "<div class='post__image w100'><a href='" + relurls[p] + "' rel='nofollow' target='_top' title='" + reljudul[p] + "'><img class='snippet-thumbnail lazy w100' src='" + relgambar[p] + "'/></a></div>", g += "<h3 class=''><a class='relinkjdulx' href='" + relurls[p] + "' target='_blank'>" + reljudul[p] + "</a></h3>", g += "<figure class='snippet'><figcaption class='news-text'>" + relcuplikan[p] + " ... </figcaption></figure>", g += "</article>", document.write(g), ++c != relmaxtampil)) && (p < reljudul.length - 1 ? p++ : p = 0, p != m););
}
for (
var labels = getQueryVariable("labels"),
relmaxtampil = getQueryVariable("num"),
domain = getQueryVariable("url"),
res = labels.split(","),
i = 0,
text = "";
res[i];
)
text += '<script src="' + domain + "/feeds/posts/default/-/" + res[i] + '?alt=json&callback=relpostimgcuplik&max-results=10"><\/script>', i++;
var relnojudul = 0,
numchars = 120,
reljudul = new Array,
relurls = new Array,
relcuplikan = new Array,
relgambar = new Array;
document.write(text + '<script>artikelterkait();<\/script>');
</script>
</ul>
</body>
</html>