[Blog] Expandable posts with Peekaboo view (blogger beta)
這個功能,個人覺得比起之前的「"...Read More"篇」的更為實用,因為不需要重新載入新的頁面,直接就打開來...反應速度更快,閱讀完畢時,又可馬上縮起來,不占版面空間,相當的方便 ^_^
.實作方法如下:
Step1:將底下這行加到你的template的<head>裡頭。<script type='text/javascript' src='http://www.anniyalogam.com/widgets/hackosphere.js' />
Step2:找到底下這段,加入紅色的部份<b:includable id='post' var='post'>
<div class='post' expr:id='"post-" + data:post.id'>
<a expr:name='data:post.id'/>
Step3:找到底下這段,同樣加入紅色的部份<div class='post-header-line-1'/>
<div class='post-body'>
<b:if cond='data:blog.pageType == "item"'>
<p><data:post.body/></p>
<b:else/>
<style>#fullpost {display:none;}</style>
<p><data:post.body/></p>
<span id='showlink'>
<p><a href='javascript:void(0);'
expr:onclick='"javascript:showFull(\"post-" +
data:post.id + "\");"'>[+/-] Read More...</a></p>
</span>
<span id='hidelink' style='display:none'>
<p><a href='javascript:void(0);'
expr:onclick='"javascript:hideFull(\"post-" +
data:post.id + "\");"'>[+/-] Summary only...</a></p>
</span>
<script type='text/javascript'>
checkFull("post-" + "<data:post.id/>");
</script>
</b:if>
<div style='clear: both;'/> <!-- clear for photos floats --></div>
※若要更改"顯示文字",請自行更改上頭程式碼裡頭的"[+/-] Read More..."和"[+/-] Summary only..." 這兩個文字標籤...
Step4:基本上這樣就完成了! 最後,先登入Blogger,再到「Settings->Formatting」,將<span id="fullpost"> 想要隱藏的部分 </span>填入Formatting的框框裡即可,如此一來,每次編輯新文章時,即會自動填入所需的程式碼囉 ^_^ oh ya!!
※注意是span,並非如同之前這篇「"...Read More"篇」所提到的,是用div...請小心!!



6 comments:
December 16, 2006 6:04 AM
雖然這樣很方便,
不過可能因此喪失計數器的準確性XD
這是我蠻在意的
對了,這個樣板改得很成功喔!
我也很喜歡這個樣板呢。
January 02, 2007 3:25 AM
Hi Hugojay 宇狗:
嗯…沒錯,這其中就要有些取捨..看個人喜好囉!!
謝謝你的誇講...不過是把WordPress中的Kubrick Theme Porting過來而已...
還有,我忘了設定"Comment Notification"..囧rz,導致現在才看到此留言..sorry..
March 26, 2007 6:48 AM
Hi, Tsung.
Great job! This template is wonderful! :D
Could you translate this article to english?
Thanks a lot!
March 26, 2007 4:52 PM
To cristiano a.:
Here it is in English ^_^
Hackosphere -> Expandable posts with Peekaboo view
February 04, 2009 1:45 AM
Catch the wow gold star that holds your gold in wow destiny,cheap wow gold the one that forever maplestory money twinkles within your heart. Take advantage of precious opportunities while they still sparkle before you. Always believe that your buy maplestory mesos ultimate goal is attainable cheap mesos as long as you commit yourself to it.maple money Though barriers may sometimes stand in the way of your dreams, remember that your destiny is hiding behind them.wow gold kaufen Accept the fact that not everyone is going to approve of the choices Maple Story Accounts you've made. Have faith in your judgment.wow gold farmen Catch the star that maple story money twinkles in your heart and it will lead you to your destiny's path. Follow that pathway and uncover the sweet sunrises that await you. Take pride in your accomplishments, as they are stepping stones to your dreams. Understand that you may make mistakes, powerlevelbut don't let them discourage you.ms mesos Value your capabilities and talents for they are what make you truly unique. The greatest gifts in life are not purchased, but acquired through hard work and determination.maplestory mesos Find the star that twinkles in your heart?for you alone maplestory powerleveling are capable of making your brightest dreams come true
December 13, 2009 10:32 PM
hm... good thread ))
Post a Comment