Guest User

Untitled

a guest
Jan 23rd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. <div class="recentpoststyle">
  2. <script type="text/javascript">
  3. function showlatestposts(e) {
  4. for (var t = 0; t < posts_no; t++) {
  5. var r, s = e.feed.entry[t],
  6. n = s.title.$t;
  7. if (t == e.feed.entry.length) break;
  8. for (var a = 0; a < s.link.length; a++)
  9. if ("alternate" == s.link[a].rel) {
  10. r = s.link[a].href;
  11. break
  12. }
  13. n = n.link(r);
  14. var i = "... read more";
  15. i = i.link(r);
  16. var l = s.published.$t,
  17. o = l.substring(0, 4),
  18. u = l.substring(5, 7),
  19. c = l.substring(8, 10),
  20. m = new Array;
  21. if (m[1] = "Jan", m[2] = "Feb", m[3] = "Mar", m[4] = "Apr", m[5] = "May", m[6] = "Jun", m[7] = "Jul", m[8] = "Aug", m[9] = "Sep", m[10] = "Oct", m[11] = "Nov", m[12] = "Dec", "content" in s) var d = s.content.$t;
  22. else if ("summary" in s) var d = s.summary.$t;
  23. else var d = "";
  24. var v = /<\S[^>]*>/g;
  25. if (d = d.replace(v, ""), 1 == posts_date && document.write('<div class="post-date">' + m[parseInt(u, 10)] + " " + c + " " + o + "</div>"), document.write('<li class="recent-post-title">'), document.write(n), document.write('</li><div class="recent-post-summ">'), 1 == post_summary)
  26. if (d.length < summary_chars) document.write(d);
  27. else {
  28. d = d.substring(0, summary_chars);
  29. var f = d.lastIndexOf(" ");
  30. d = d.substring(0, f), document.write(d + " " )
  31. }
  32. document.write("</div>")
  33. }
  34. }
  35. </script>
  36. <script type="text/javascript">
  37. var posts_no = 5;
  38. var posts_date = true;
  39. var post_summary = true;
  40. var summary_chars = 80;
  41. </script>
  42. <script src="/feeds/posts/default?orderby=published&alt=json-in-script&callback=showlatestposts">
  43. </script>
  44.  
  45. <style type="text/css">
  46. .recentpoststyle {
  47. list-style-type: none;
  48. }
  49. .recentpoststyle a {
  50. text-decoration: none;
  51. color: #49A8D1;
  52. }
  53. .recentpoststyle a:hover {
  54. color: #000;
  55. }
  56. .recentpoststyle li:before {
  57. float: left;
  58. z-index: 1;
  59. position: relative;
  60. font-size: 15px;
  61. font-weight: bold;
  62. color: #fff;
  63. background: #69B7E2;
  64. margin: 13px 5px 0px -6px;
  65. line-height: 30px;
  66. width: 30px;
  67. height: 30px;
  68. text-align: center;
  69. -webkit-border-radius: 50%;
  70. -moz-border-radius: 50%;
  71. border-radius: 50%;
  72. }
  73. li.recent-post-title {
  74. margin: 7px 0;
  75. padding: 0;
  76. }
  77. .recent-post-title a {
  78. color: #444;
  79. text-decoration: none;
  80. font: bold 13px 'Ruda';
  81. }
  82. .post-date {
  83. font-size: 11px;
  84. color: #999;
  85. margin:0;
  86. }
  87. .recent-post-summ {
  88. color: #777;
  89. padding: 0 0 15px;
  90. margin-bottom: 15px;
  91. font: 15px 'Open Sans', sans-serif;
  92. border-bottom: 1px solid #ececec;
  93. }
  94. </style></div>
Add Comment
Please, Sign In to add comment