微信开发者大本营吧 关注:268贴子:208
  • 1回复贴,共1

【微擎】微擎微站模板篇---如何安装搭建微站模版

只看楼主收藏回复

【注:适合于微擎0.6之前的任何程序版本】
模板存放路径:
\themes\mobile\自制摸版文件名
模板文件介绍:

摸版机制介绍:
上述列表中打星号的为制作摸版必建立的文件,其他如果本摸版下没有将自动引用默认摸版(default)里的文件
manifest.xml(摸版配置文件)详解:
<?xml version="1.0"encoding="utf-8"?>
<manifest versionCode="0.5,0.51">
<identifie><![CDATA[这里写摸版标识(与摸版文件名一致)]]></identifie>
<title><![CDATA[这里写摸版名称]]></title>
<description><![CDATA[这里写摸版描述]]></description>
<author><![CDATA[这里写摸版作者]]></author>
<url><![CDATA[这里写摸版的出处链接(可直接写 http://bbs.we7.cc)]]></url>
</manifest>
制作案例(首页 - index.html):
{template *header*} <!--引用头部文件-->
{template *slide*} <!--引用幻灯片文件-->
<style> <!--CSS中加入该摸版设计中的配置信息-->
body{
font:{$_W[*styles*][*fontsize*]} {$_W[*styles*][*fontfamily*]};
color:{$_W[*styles*][*fontcolor*]};
padding:0;
margin:0;
background-image:url(*{if!empty($_W[*styles*][*indexbgimg*])}{$_W[*styles*][*indexbgimg*]}{/if}*);
background-size:cover;
background-color:{ifempty($_W[*styles*][*indexbgcolor*])}#fbf5df{else}{$_W[*styles*][*indexbgcolor*]}{/if};
{$_W[*styles*][*indexbgextra*]}
}
a{color:{$_W[*styles*][*linkcolor*]}; text-decoration:none;}
{$_W[*styles*][*css*]}
.box{width:100%;overflow:hidden;margin-top:10px;}
.box.box-item{float:left;text-align:center;display:block;text-decoration:none;outline:none;width:25%;height:90px;margin-bottom:8px;position:relative;color:#333;}
.box .box-itemi{display:inline-block;width:60px;height:60px;line-height:60px;font-size:35px;color:#666;background:#EEE; overflow: hidden; border:2px #FFF solid;}
.box .box-item span{color:{$_W[*styles*][*fontnavcolor*]};display:block;font-size:14px;margin-top:-5px; position:absolute; bottom:0; width:100%;}
</style>
<div>
{loop $navs $nav} <!--循环导航菜单信息-->
<a href="{$nav[*url*]}"class="box-item">
{if!empty($nav[*icon*])} <!--判断导航图标类型-->
<istyle="background:url({$_W[*attachurl*]}{$nav[*icon*]})no-repeat;background-size:cover;"class="img-circle"></i>
{else}
<iclass="{$nav[*css*][*icon*][*icon*]} img-circle"style="{$nav[*css*][*icon*][*style*]}"></i>
{/if}
<spanstyle="{$nav[*css*][*name*]}">{$nav[*name*]}</span>
</a>
{/loop}
</div>
{template *footer*} <!--引用尾部文件-->


1楼2014-08-18 15:00回复
    轻蔑一笑,然后高贵地说:你们城里人真会玩!


    2楼2015-09-13 17:41
    回复