Wednesday, March 26, 2025

Sighn up..

 <div id="related-posts"></div>


<script>

// Automatically show related posts

(function() {

  const currentPostLabels = [<data:post.labels.map(label => `"${label.name}"`).join(',')>];

  const widget = document.getElementById('related-posts');

  

  if(currentPostLabels.length > 0) {

    const script = document.createElement('script');

    script.src = `/feeds/posts/default/-/${currentPostLabels[0]}?alt=json-in-script&callback=showRelatedPosts`;

    document.head.appendChild(script);

  }


  window.showRelatedPosts = function(data) {

    let html = '<h3>You Might Also Like</h3><ul>';

    data.feed.entry.slice(0, 3).forEach(post => {

      if(post.title.$t !== document.title) {

        html += `<li><a href="${post.link.pop().href}">${post.title.$t}</a></li>`;

      }

    });

    html += '</ul>';

    widget.innerHTML = html;

  };

})();

</script>


No comments:

Post a Comment

Batman alpha7 protocolhttps://claude.ai/public/artifacts/904390fd-57fd-41d4-b084-8f188e3eb738

 https://claude.ai/public/artifacts/904390fd-57fd-41d4-b084-8f188e3eb738 https://claude.ai/public/artifacts/904390fd-57fd-41d4-b084-8f188e3e...