blogger中寫網頁code

2011年7月21日 星期四


<
換成
"& l t ;"

>
換成
"& g t ;"

空格記得去掉XDD

blogger文章列表

css中加入

.t_title{
border-bottom:none;
font-size: 130%;
text-align:left;
margin-top:10px;
margin-left:20px;
font-weight: normal;
font-family: Trebuchet MS, Verdana, Sans-serif;
}

找到

<b:includable id="main" var="top">
<!-- posts -->

<div class="blog-posts">
<b:include name="status-message" data="top"></b:include>
<?xml:namespace prefix = data /><data:adstart></data:adstart>
<b:loop var="post" values="data:posts">
<b:if cond="data:post.dateHeader">


<h2 class="date-header"><data:post.dateheader></data:post.dateheader></h2>
</b:if>
<b:include name="post" data="post"></b:include>
<b:if cond="'data:blog.pageType">
<b:include name="comments" data="post"></b:include>
</b:if>
</b:loop>
<data:adend></data:adend>
</div>
<!-- navigation -->
<b:include name="nextprev"></b:include>
<!-- feed links -->
<b:include name="feedLinks"></b:include>

換成

<?xml:namespace prefix = b /><b:includable id="main" var="top">
<!-- posts -->


<div class="blog-posts">
<!-- on a label page, add a header saying 'Contents' -->
<b:if cond="data:blog.homepageUrl != data:blog.url">
<b:if cond="'data:blog.pageType">
<b:if cond="'data:blog.pageType">


<h2 class="date-header">Contents</h2>
</b:if>
</b:if>
</b:if>
<!-- Start loop for displaying posts here -->
<b:loop var="post" values="data:posts">
<!-- Date-headers are only displayed if on main, item or archive page -->
<!-- If on label-page, then no date-header -->
<b:if cond="data:blog.homepageUrl == data:blog.url">
<b:if cond="data:post.dateHeader">


<h2 class="date-header"><?xml:namespace prefix = data /><data:post.dateheader></data:post.dateheader></h2>
</b:if>
<b:else></b:else>
<b:if cond="'data:blog.pageType">
<b:if cond="data:post.dateHeader">


<h2 class="date-header"><data:post.dateheader></data:post.dateheader></h2>
</b:if>
<b:else></b:else>
<b:if cond="'data:blog.pageType">
<b:if cond="data:post.dateHeader">


<h2 class="date-header"><data:post.dateheader></data:post.dateheader></h2>
</b:if>
</b:if>
</b:if>
</b:if>
<!-- Here we start displaying the posts. -->
<!-- If we are on a label page, only the posttitle is displayed -->
<!-- On other pages the entire post is displayed -->
<b:if cond="data:blog.homepageUrl != data:blog.url">
<b:if cond="'data:blog.pageType">
<b:if cond="'data:blog.pageType">
<a class="t_title" href="data:post.url"><data:post.title></data:post.title></a>

<b:else></b:else>
<b:include name="post" data="post"></b:include>
</b:if>
<b:else></b:else>
<b:include name="post" data="post"></b:include>
</b:if>
<b:else></b:else>
<b:include name="post" data="post"></b:include>
</b:if>
<!-- If on item page display comments -->
<b:if cond="'data:blog.pageType">
<b:if cond="data:post.allowComments">
<b:include name="comments" data="post"></b:include>
</b:if>
</b:if>
</b:loop>
</div>


<p>
<!-- navigation -->
<b:include name="nextprev"></b:include>
<!-- feed links -->
<b:include name="feedLinks"></b:include></p>
</b:includable><b:includable id="main" var="top"><b:includable id="main" var="top"></b:includable></b:includable>

Toc

http://shiouhhc.blogspot.com/2007/08/toc-table-of-contents.html

筆記:加上文章列表(ToC: Table of Contents)
ToC(ToC: Table of Contents)這個功能可以將部落格所有的文章整理成一個列表。點擊側邊Table of Contents欄位中的Show Table of Contents,就會在原本發佈文章的主欄位上方列出所有文章,再點擊一次Hide Table of Contents,就可以收起文章列表。
點擊列表標題欄位POST TITLE或POST DATE,可以依標題或時間排序;
點擊LABELS,則篩選列出同一標籤的文章。
這個實用的功能也是Beautiful Beta的HANS所釋出,原文請參考BlogToC Widget Released。以下仍是我依樣畫葫蘆所做的修改:

Step 1:允許範本主欄位(Main)可以再新增一個網頁元素。找到
main 的section
加入maxwidgets='2' 更改showaddelement='yes'

Step 2:將下面有關表格格式設定的程式碼貼在與之間的css區塊
我自己是貼在]]> 之前

Step 3:儲存範本。切換至【範本 網頁元素】(Template/Page Elements)。

Step 4:在中間主欄位(Main)上方,【加入網頁元素】(Add a Page Element),新增【HTML/JavaScript】網路元素,標題留白,貼上下列原始碼。

Step 5:在側邊欄位(sidebar),【加入網頁元素 】,新增【HTML/JavaScript】網路元素,標題訂ToC或Table of Contents,貼上下列原始碼,將YOURBLOG改成自己的部落格域名。

Step 6:移動Table of contents這個網路元素到喜歡的位置,儲存。