1.1.直接使用
前言
- 通过本章节,你将会了解如何把这套静态后台加入自己的项目中。
- 你的项目可能是java web、php、node,只要是基于模板系统的,都可以套用。
下载
- git方式
git clone https://git.oschina.net/docafe/adminlte2-itcast.git
- 下载zip包
http://git.oschina.net/docafe/adminlte2-itcast/repository/archive/master
发布目录说明
release\dsit 发布目录\pages 页面\plugins 插件库\img 图片\css css
创建模板步骤
安置静态文件
请把
plugins、img、css三个目录放入模板系统的静态目录,在你的项目下可能是assets、static、public假设你是放在
public下:
\public\plugins\public\img\public\css
开始第一个页面,
后台首页复制
/release/dist/pages/all-admin-index.html到你的项目模板目录中替换文件路径
默认路径是相对的
../plugins/xxx, 在你的模板系统下可以这样替换查找
../plugins/, 替换成<%=public_path%>/plugins/<%=public_path%>是你模板系统的静态资源目录,请酌情修改
运行你的项目看看效果

模板化拆分页面
/release/dist/pages/all-admin-index.html 为例
页面结构说明

分为4个部分
顶部导航、侧栏菜单、底部版权、内容区域dom说明
如支持
Layout创建母版
<!DOCTYPE html><html><head><!-- 页面meta /--><!-- 页面css /--></head><body class="hold-transition skin-purple sidebar-mini"><div class="wrapper"><!-- 页面头部 /--><!-- 导航侧栏 /--><!-- 内容区域 /--><!-- 底部版权 /--></div><!-- 页面js /--></body></html>
- 直接使用
内容区域html- 在发布目录下,有单独的
内容区域html方便大家使用 - 如: 后台首页
admin-index,会提供两个文件对应/release/dist/pages/all-admin-index.html全部html/release/dist/pages/admin-index.html内容区域的html
- 在发布目录下,有单独的
下载已套好的模板套件
感谢传智播客老师辛苦劳动~
