| delicious page code |
|
|
|
| Written by Gerald L. Rudolph | |
| Wednesday, 28 February 2007 | |
|
To add page to your website, copy the code below and paste onto your web page. No warranties. Modify as you like. <!-- start copy here --> <div style="border:2px solid #ddd"> <div id="container" > <h2>Peace and Justice News</h2> <style type="text/css"> .newsarticle {margin: 5px 5px 15px 0px; } .articleheader {text-align: left; font-weight:bold;} .article-note { margin-bottom: 20px} </style> <script type="text/javascript" src="http://del.icio.us/feeds/json/geraldr_sc/carolinapeace?count=20"></script> <script type="text/javascript"> function showImage(img){ return (function(){ img.style.display='inline'; }) } var d = document.createElement('div'); for (var i=0, post; post = Delicious.posts[i]; i++) { var article = document.createElement('div'); article.setAttribute('class','newsarticle'); var a = document.createElement('a'); a.setAttribute('href', post.u); a.setAttribute('class', 'articleheader'); a.appendChild(document.createTextNode(post.d)); var div = document.createElement('div'); div.setAttribute('class', 'article-note'); if (post.n!=undefined){ div.appendChild(document.createTextNode(post.n)); } article.appendChild(a); article.appendChild(div); d.appendChild(article); } document.getElementById('container').appendChild(d); </script> <noscript>Javascript required for News Links</noscript> </div> </div> <!-- end of copy --> To use the above code on your site for your own links, create an account on del.icio.us, replace geraldr_sc in the code with your account name, and carolinapeace with the tag you wish to use for maintaining the news item list. When selecting a site to add using the del.icio,us entry dialog, the name field will become the title and text of the link, the Notes field will be the description following the title (limited by del.icio.us to 255 characters), the tag is where to enter your tag that corresponds to the tag you use instead of carolinapeace in the text above. |






