emlog主题模板建造教程:通用头部建造

  我们先把上篇中筹备好的IKUJIA文件夹全部复制到emlog模板目次下,接着打开方针站首页,“右键”→“查察原代码”(也可以欣赏器上的“查察”→“源文件”)。

  打代码全选后复制,打开DW(Dreamweaver简称),把DW下的代码全部排除后粘贴,然后生存到我们的IKUJIA文件夹下,我定名为index.htm。然后我们把CSS和JS部门改成IKUJIA文件夹下的CSS和JS文件路径。

  结果如图:

  

emlog主题模板制作教程:通用头部制作

  接着我们在DW的“设计模式”下选取头部部门,选取后,我们可以看到“代码模式”下的代码也被选取了,OK这就是我们要提取的头部部门,复制代码,我们再新建一PHP文件,定名为:header.php生存到ikujia文件夹下(忘了说:记得全部操纵页面属性都是UTF-8)。

  再把刚刚复制的代码粘贴到header.php文件里,然后开始加EMLOG标签,这是我提取出来的代码:(内里的所有毗连我都改成了#)。

<div id="loading">Loading...</div>

<div id="page_wrap">
<div id="topbar">
<ul class="right">
<li class="feed"><a href="#" title="订阅 imotta.cn">RSS Feed</a>
<li class="twitter"><a href="#" title="Follow me on twitter">twitter</a></li>
<li class="flickr"><a href="#" title="View my flickr">flick<span class="flickr_r">r</span></a></li>
<li class="contact"><a href="#/" title="接洽方法">Contact</a></li>
</li>
</ul>
<div class="clear"></div>
</div><!-- end topbar -->

<div id="header">
<div class="blog_title">
<h1><a href="#">motta’s here</a></h1>
</div>
<div class="clear"></div>
</div><!-- end header -->

<div id="main_navi">
<ul class="left">
<li class="home"><a href="#/">Home</a></li>
<li class="archives"><a href="#/">Archives</a></li>
<li class="links"><a href="#/">Links</a></li>
<li class="about"><a href="#/">About</a></li>
</ul>
<div class="clear"></div>
</div><!-- end main_navi -->

这是我加上EMLOG标签后的代码:标签利用可以参考emlog默认模板或《emlog主题模板建造教程:标签阐明》。

<?php
/*
Template Name:ikujia
Description:ikujia提供模板,简捷优雅 ……
Author:ikujia
Author Url:
Sidebar Amount:1
*/
if(!defined('EMLOG_ROOT')) {exit('error!');}
require_once View::getView('module');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head profile="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><?php echo $blogtitle; ?></title>
<meta name="keywords" content=http://down.chinaz.com/"<?php echo $site_key; ?>" />
<meta name="description" content=http://down.chinaz.com/"<?php echo $description; ?>" />
<meta name="description" content="emlog" />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href=http://down.chinaz.com/"<?php echo BLOG_URL; ?>xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href=http://down.chinaz.com/"<?php echo BLOG_URL; ?>wlwmanifest.xml" />
<link rel="alternate" type="application/rss+xml" title="RSS" href=http://down.chinaz.com/"<?php echo BLOG_URL; ?>rss.php" />
<link href=http://down.chinaz.com/"<?php echo TEMPLATE_URL; ?>css_reset.css" rel="stylesheet" type="text/css" />
<link href=http://down.chinaz.com/"<?php echo TEMPLATE_URL; ?>style.css" rel="stylesheet" type="text/css" />
<script src=http://down.chinaz.com/"<?php echo BLOG_URL; ?>include/lib/js/common_tpl.js" type="text/javascript"></script>
<script type='text/javascript' src='<?php echo TEMPLATE_URL; ?>js/l10n.js?ver=20101110'></script>
<script type='text/javascript' src='<?php echo TEMPLATE_URL; ?>js/jquery.js?ver=1.4.4'></script>
<?php doAction('index_head'); ?>
</head>
<body>
<div id="loading">Loading...</div>
<div id="page_wrap">
<div id="topbar">
<ul class="right">
<li class="feed"><a href=http://down.chinaz.com/"<?php echo BLOG_URL; ?>rss.php" title="订阅 ikujia.com">RSS Feed</a>
<?php
foreach ($navibar as $key => $val):
if ($val['hide'] == 'y'){continue;}
if (emptyempty($val['url'])){$val['url'] = Url::log($key);}
?>
<li class="feed"><a href=http://down.chinaz.com/"<?php echo $val['url']; ?>" target=http://down.chinaz.com/"<?php echo $val['is_blank']; ?>"><?php echo $val['title']; ?></a></li>
<?php endforeach;?>
<?php doAction('navbar', '<li class="archives">', '</li>'); ?>
</ul>
<div class="clear"></div>
</div><!-- end topbar -->
<div id="header">
<div class="blog_title">
<h1><a href=http://down.chinaz.com/"<?php echo BLOG_URL; ?>"><?php echo $blogname; ?></a></h1>
</div>
<div class="clear"></div>
</div><!-- end header -->
<div id="main_navi">
<ul class="left">
<li class="home"><a href=http://down.chinaz.com/"<?php echo BLOG_URL; ?>">Home</a></li>
<?php if($istwitter == 'y'):?>
<li class="archives"><a href=http://down.chinaz.com/"<?php echo BLOG_URL; ?>t/"><?php echo Option::get('twnavi');?></a></li>
<?php endif;?>
<?php if(ROLE == 'admin' || ROLE == 'writer'): ?>
<li class="archives"><a href=http://down.chinaz.com/"<?php echo BLOG_URL; ?>admin/write_log.php">Writing</a></li>
<li class="archives"><a href=http://down.chinaz.com/"<?php echo BLOG_URL; ?>admin/">Conac</a></li>
<li class="archives"><a href=http://down.chinaz.com/"<?php echo BLOG_URL; ?>admin/?action=logout">Exit</a></li>
<?php else: ?>
<li class="archives"><a href=http://down.chinaz.com/"<?php echo BLOG_URL; ?>admin/">Enter</a></li>
<?php endif; ?>
</ul>
<div class="clear"></div>
</div><!-- end main_navi -->

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/10722.html