Template của blogger được thiết kế trong 1 file XML.
Bài viết này mình sẽ hướng dẫn cách làm 1 template thật đơn giản, để các bạn có cái nhìn rõ nét về cách thiết kế template của nó.
Phác thảo 1 template:
Đây là phần hướng dẫn cơ bản để có cái nhìn toàn cảnh, nếu muốn khám phá, tuỳ chỉnh theo ý bạn thì hãy nhấn nút Expand...
Thank for regard.
Bài viết này mình sẽ hướng dẫn cách làm 1 template thật đơn giản, để các bạn có cái nhìn rõ nét về cách thiết kế template của nó.
Phác thảo 1 template:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<b:include data='blog' name='all-head-content'/>
<title>
<b:if cond='data:blog.homepageUrl == data:blog.url'>
<data:blog.title/>
<b:else/>
<data:blog.pageName/> | <data:blog.title/>
</b:if>
</title>
<b:skin>
<![CDATA[
/*css here*/
]]>
</b:skin>
</head>
<body>
<div id='outer-wrapper'><!-- wrapper begin -->
<!-- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<div id='header-wrapper'><!-- header begin -->
<div id="banner"><!-- banner -->
<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
<b:widget id='Header1' locked='true' title='Hquery Developer (Header)' type='Header'/>
</b:section>
</div>
<div id="nav"><!-- menu begin -->
<b:section class='crosscol' id='crosscol' maxwidgets='1' showaddelement='no'>
<b:widget id='PageList1' locked='false' title='Pages' type='PageList'/>
</b:section>
</div>
<!-- Search -->
<form expr:action='data:blog.homepageUrl + "search/"' id='searchform' method='get'>
<input id='s' name='q' onblur='if (this.value == '') {this.value = 'Search...';}' onfocus='if (this.value == 'Search...') {this.value = '';}' type='text' value='Search...'/>
<input id='searchsubmit' type='hidden'/>
</form>
</div>
<!-- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<div id="content-wrapper">
<div id='main-wrapper'><!-- content -->
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/>
</b:section>
</div>
<div id='sidebar-wrapper'><!-- sidebar -->
<b:section class='sidebar' id='sidebar' preferred='yes'>
<b:widget id='Label1' locked='false' title='Tags' type='Label'/>
<b:widget id='BlogArchive1' locked='false' title='Archive' type='BlogArchive'/>
</b:section>
</div>
<div class='clear'/>
</div>
<!-- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<div id='footer-wrapper'> <!-- footer begin -->
</div><!-- footer end -->
</div><!-- wrapper end -->
</body>
</html>
Download code.Đây là phần hướng dẫn cơ bản để có cái nhìn toàn cảnh, nếu muốn khám phá, tuỳ chỉnh theo ý bạn thì hãy nhấn nút Expand...
Thank for regard.






ban huu ich qua. Cam on ban !
Trả lờiXóa