共享書籤

終於最後決定加入上共享書籤於此blog 上....
不過我還是喜歡用上include 的方法來加, 這樣看上去好像個xml 會易看一點吧.


先加入css

span.bookmark-icons { 
  float: left; 
}
span.bookmark-icons a{ 
  text-decoration: none; 
  padding:5pt 5px; 
}


再加入include block

<b:includable id='share_bookmarks' var='post'>  
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<span class='bookmark-icons'> 
共享書籤 : 
<a expr:href='"http://funp.com/pages/submit/?popup&amp;url=" + data:post.url + "&amp;title=" + data:post.title' target='_blank' title='貼到funP'>
<img src='http://sites.google.com/site/matthewhkh/file/bookmark-funp.gif' border='0'/>
</a>
<a expr:href='"http://www.hemidemi.com/user_bookmark/new?title=" + data:post.title + "&amp;url=" + data:post.url' target='_blank' title='加入HEMiDEMi分享書籤'>
<img alt='HEMiDEMi個人書籤' border='0' src='http://sites.google.com/site/matthewhkh/file/bookmark-hemidemi.gif'/>
</a>
<a expr:href='"http://myweb2.search.yahoo.com/myresults/bookmarklet?u=" + data:post.url + "&amp;=" + data:post.title' target='_blank' title='加入Yahoo分享書籤'>
<img alt='Yahoo分享書籤' border='0' src='http://sites.google.com/site/matthewhkh/file/bookmark-yahoo.jpg'/>
</a>
<a expr:href='"http://del.icio.us/post?url=" + data:post.url + "&amp;title=" + data:post.title' target='_blank' title='加入Del.icio.us分享書籤'>
<img alt='Del.icio.us個人書籤' border='0' src='http://sites.google.com/site/matthewhkh/file/bookmark-Delicious.gif'/>
</a>
<a expr:href='"http://digg.com/submit?phase=3&amp;url=" + data:post.url' target='_blank' title='DiggIt!'>
<img alt='DiggIt!' border='0' src='http://sites.google.com/site/matthewhkh/file/bookmark-digg.png'/>
</a>
<a expr:href='"http://www.google.com/bookmarks/mark?op=add&amp;bkmk=" + data:post.url + "&amp;title=" + data:post.title' target='_blank' title='加入Google分享書籤'>
<img alt='Google個人書籤' border='0' src='http://sites.google.com/site/matthewhkh/file/bookmark-google.png'/>
</a>
<a expr:href='"http://www.facebook.com/sharer.php?u=" + data:post.url + "&amp;t=" + data:post.title' target='_blank' title='加入Facebook分享書籤'>
<img alt='Facebook個人書籤' border='0' src='http://sites.google.com/site/matthewhkh/file/bookmark-facebook.png'/>
</a>
<a expr:href='"https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=" + data:post.url + "&amp;title=" + data:post.title' target='_blank' title='加入Live分享書籤'>
<img alt='Live個人書籤' border='0' src='http://sites.google.com/site/matthewhkh/file/bookmark-live.png'/>
</a>
</span> 
</b:if>
</b:includable>



再在想加入這個共享書籤的地方加上

<b:include data='post' name='share_bookmarks'/>


還不算是太難吧!! ^^

0 回應:

Post a Comment