一,微站模板篇:
模板存放路径: \themes\mobile\自制摸版文件名
模板文件介绍:
header.html头部footer.html尾部*index.html微站首页slide.html微站幻灯片site/list.html文章列表页site/detail.html文章内容页album/list.html相册首页album/detail.html相册内容页home.html个人中心首页member.html个人中心用户信息message.html信息提示*manifest.xml微站配置文件*preview.jpg微站封面图片
摸版机制介绍: 上述列表中打星号的为制作摸版必建立的文件,其他如果本摸版下没有将自动引用默认摸版(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[这里写摸版的出处链接(可直接写 https://app.heimaoba.cn/)]]></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:{if empty($_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-item i{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 class="box"> {loop $navs $nav} <!--循环导航菜单信息--> <a href="{$nav['url']}" class="box-item"> {if !empty($nav['icon'])} <!--判断导航图标类型--> <i style="background:url({$_W['attachurl']}{$nav['icon']}) no-repeat;background-size:cover;" class="img-circle"></i> {else} <i class="{$nav['css']['icon']['icon']} img-circle" style="{$nav['css']['icon']['style']}"></i> {/if} <span style="{$nav['css']['name']}">{$nav['name']}</span> </a> {/loop} </div> {template 'footer'} <!--引用尾部文件--> 
|