Iklan

Sitemap

<style type="text/css">
#sitemap {font-family: Arial, sans-serif;}
#sitemap ul {list-style: none; padding-left: 0;}
#sitemap li {margin: 5px 0;}
</style>

<div id="sitemap">
  <h2>Daftar Artikel</h2>
  <ul id="postList"></ul>
</div>

<script>
var postList = document.getElementById('postList');

function loadPosts(startIndex) {
  var script = document.createElement('script');
  script.src = "/feeds/posts/default?alt=json-in-script&start-index=" + startIndex + "&max-results=100&callback=showPosts";
  document.body.appendChild(script);
}

function showPosts(data) {
  var entries = data.feed.entry;
  if (!entries) return;

  for (var i = 0; i < entries.length; i++) {
    var title = entries[i].title.$t;
    var link;
    for (var j = 0; j < entries[i].link.length; j++) {
      if (entries[i].link[j].rel == 'alternate') {
        link = entries[i].link[j].href;
        break;
      }
    }

    var li = document.createElement('li');
    li.innerHTML = '<a href="' + link + '">' + title + '</a>';
    postList.appendChild(li);
  }

  if (entries.length == 100) {
    loadPosts(data.feed.openSearch$startIndex.$t + 100);
  }
}

loadPosts(1);
</script>

Terpopuler

Last Week

Diberdayakan oleh Blogger.

Comments

Recent

Bottom Ad [Post Page]

Archive

Author Description

Hey there, We are Blossom Themes! We are trying to provide you the new way to look and use the blogger templates. Our designers are working hard and pushing the boundaries of possibilities to widen the horizon of the regular templates and provide high quality blogger templates to all hardworking bloggers!

Post Page Advertisement [Top]

Advertisement

Last Month

Last Year