February 16,2007

[翻譯]Joomla! 1.0.12版及較舊版本 樣板教學 3of9

原文: Hazman  
出處 : xtremeOpenSource

版頭(Header)
版頭(Header)我們通常用來放置網站的logo。
複製到index.php檔案裡。
<?php
/**
* @version - Template version goes here
* @package - Name of the template goes here
* @author - Author's name goes here
* @email - Your email goes here
* @website - Your website goes here
* @copyright (C) - Your copyright goes here
* @license - Type of license goes here
*/
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
// needed to seperate the ISO number from the language file constant _ISO
$iso = split( '=', _ISO );
// xml prolog
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<?php mosShowHead(); ?>
<?php if ( $my->id ) { initEditor(); } ?>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<?php echo "<link rel=\"stylesheet\" href=\"$GLOBALS[mosConfig_live_site]/templates/$GLOBALS[cur_template]/css/template_css.css\" type=\"text/css\"/>" ; ?>
</head>
<body>
<div id="main_container">
<div id="header">
Header
</div>
</div>
</body>
</html>

版頭的CSS
我們現在增加版頭(Header)的屬性如下。
將下列程式碼複製到我們的template_css.css檔案裡。
/**
* @version - Template version goes here
* @package - Name of the template goes here
* @author - Author's name goes here
* @email - Your email goes here
* @website - Your website goes here
* @copyright (C) - Your copyright goes here
* @license - Type of license goes here
*/ body {}tr, p, div {
font-family : Verdana, Arial, Helvetica, sans-serif;
font-size : 11px;
color : #666666;
}
/********** Main Container **********/
#main_container {
width : 100%;
display : table; /* must put this in for FireFox. */
text-align : left;
margin : auto;
border : 1px solid #cccccc;
}
/********** Header **********/
#header {
width : 100%;
height : 80px;
text-align : center;
margin-bottom : 15px;
border : 1px solid #cccccc;
}

主要內容(Main Content)

主要的內容( Main Content)由三欄(3 Column Table)表格構成。
左邊欄位, 中間欄位, 右邊欄位
我們增加這個三欄表格( 3 Column Table)如下。
將其複製到index.php檔案裡。
<?php
/**
* @version - Template version goes here
* @package - Name of the template goes here
* @author - Author's name goes here
* @email - Your email goes here
* @website - Your website goes here
* @copyright (C) - Your copyright goes here
* @license - Type of license goes here
*/
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
// needed to seperate the ISO number from the language file constant _ISO
$iso = split( '=', _ISO );
// xml prolog
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<?php mosShowHead(); ?>
<?php if ( $my->id ) { initEditor(); } ?>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<?php echo "<link rel=\"stylesheet\" href=\"$GLOBALS[mosConfig_live_site]/templates/$GLOBALS[cur_template]/css/template_css.css\" type=\"text/css\"/>" ; ?>
</head>
<body>
<div id="main_container">
<div id="header">
Header
</div>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top"> <td width="150">
Left Column Content
</td><td width="100%">
Center Column Content
</td><td width="150">
Right Column Content
</td></tr>
</table>
</div>
</body>
</html>

Posted by waking_life at 樂多Roodo! │21:33 │回應(1)引用(0)樣式表心法
樂多分類:網路/3C 共同主題:Joomla! 工具:編輯本文
Ads by Roodo! 

引用URL

http://cgi.blog.roodo.com/trackback/2726973
回應文章
[URL=http://www.wertino.cn/bilancio-stato] bilancio stato [/URL] bilancio stato [URL=http://www.wertino.cn/architettura-design] architettura design [/URL] architettura design [URL=http://www.wertino.cn/xstreamsat-tv] xstreamsat tv [/URL] xstreamsat tv
Posted by Beast at June 12,2008 15:03