主题目录结构变更,把目录结构精简一层
@@ -36,9 +36,9 @@ class Fornt extends Base {
|
|||||||
|
|
||||||
protected function setThemes() {
|
protected function setThemes() {
|
||||||
//网站主题设置
|
//网站主题设置
|
||||||
$themes['mobile'] = config('mobile_themes') ? config('mobile_themes') : 'default';
|
$themes['mobile'] = config('mobile_themes') ? config('mobile_themes') : 'mobile';
|
||||||
$themes['pc'] = config('pc_themes') ? config('pc_themes') : 'default';
|
$themes['pc'] = config('pc_themes') ? config('pc_themes') : 'default';
|
||||||
$view_path = $this->isMobile() ? 'template/mobile/' . $themes['mobile'] . '/' : 'template/pc/' . $themes['pc'] . '/';
|
$view_path = $this->isMobile() ? 'template/' . $themes['mobile'] . '/' : 'template/' . $themes['pc'] . '/';
|
||||||
$module = $this->request->module();
|
$module = $this->request->module();
|
||||||
if (!in_array($module, array('index', 'install'))) {
|
if (!in_array($module, array('index', 'install'))) {
|
||||||
$view_path_pre = $module . '/';
|
$view_path_pre = $module . '/';
|
||||||
|
|||||||
@@ -80,16 +80,20 @@ class Config extends Base{
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function getList($type){
|
protected function getList($type){
|
||||||
$path = ROOT_PATH . 'template/' . $type . '/';
|
$path = ROOT_PATH . 'template/';
|
||||||
$file = opendir($path);
|
$file = opendir($path);
|
||||||
while (false !== ($filename = readdir($file))) {
|
while (false !== ($filename = readdir($file))) {
|
||||||
if (!in_array($filename, array('.', '..'))) {
|
if (!in_array($filename, array('.', '..'))) {
|
||||||
$files = $path . $filename . '/info.php';
|
$files = $path . $filename . '/info.php';
|
||||||
if (is_file($files)) {
|
if (is_file($files)) {
|
||||||
$info = include($files);
|
$info = include($files);
|
||||||
$info['id'] = $filename;
|
if ($info['type'] == $type) {
|
||||||
$info['img'] = '/template/' . $type . '/' . $filename . '/' . $info['img'];
|
$info['id'] = $filename;
|
||||||
$list[] = $info;
|
$info['img'] = '/template/' . $filename . '/' . $info['img'];
|
||||||
|
$list[] = $info;
|
||||||
|
}else{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
return array(
|
return array(
|
||||||
'name' => '默认模板', //
|
'name' => '默认模板', //模板名称
|
||||||
'remark' => '模板名称.', // 模板简单介绍
|
'remark' => '模板名称.', // 模板简单介绍
|
||||||
'img' => 'logo.png', // 后台显示模板缩列图 相对于模板目录路径
|
'img' => 'logo.png', // 后台显示模板缩列图 相对于模板目录路径
|
||||||
|
'type' => 'pc', //模板类型,pc为PC端模板,mobile为手机端模板
|
||||||
'version' => 'v1', // 模板版本
|
'version' => 'v1', // 模板版本
|
||||||
'author' => '郭平平', // 作者
|
'author' => '郭平平', // 作者
|
||||||
);
|
);
|
||||||
|
Before Width: | Height: | Size: 203 KiB After Width: | Height: | Size: 203 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 371 KiB After Width: | Height: | Size: 371 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |