emlog | 寒光唯美式 优化教程二
寒光唯美式
全局背景选择固定图片背景,半透明样式。并添加了阴影半透蒙版,全局模块背景定义了统一颜色。 整合多种特效,清新唯美。平滑特效,全局pjax+响应式布局。
工具环境
编辑器:PhpStorm
域名:www.emlog_local.com
环境:emlog pro + Nginx + PHP7.4
优化说明
先前是修复错误,移除一些不需要的代码,接下来开始模板设置 options.php
<?php
/*@support tpl_options*/
!defined('EMLOG_ROOT') && exit('access deined!');
$options = array(
'TplOptionsNavi' => array(
'type' => 'radio',
'name' => '定义设置项标签页名称',
'values' => array(
'tpl-set-text' => '文本',
'tpl-set-choice' => '选择',
'tpl-set-img' => '图片',
),
'description' => '设置说明,支持 HTML 代码'
),
'text' => array(
'labels' => 'tpl-set-text',
'type' => 'text',
'name' => '文本',
'default' => '默认文本',
'description' => '文本说明'
),
'texts' => array(
'labels' => 'tpl-set-text',
'type' => 'text',
'name' => '多行文本',
'multi' => true,
'default' => '',
'description' => '多行文本说明'
),
'sort' => array(
'labels' => 'tpl-set-text',
'type' => 'text',
'name' => '分类',
'depend' => 'sort',
'default' => '',
'description' => '分类说明,可设置分类关键词等',
),
'radio' => array(
'labels' => 'tpl-set-choice',
'type' => 'radio',
'name' => '单选按钮',
'values' => array(
'open' => '开启',
'close' => '关闭',
),
'default' => 'open',
'description' => '单选按钮说明'
),
'checkbox' => array(
'labels' => 'tpl-set-choice',
'type' => 'checkbox',
'name' => '复选按钮',
'values' => array(
'one' => '一',
'two' => '二',
'three' => '三',
'four' => '四',
'five' => '五',
),
'description' => '复选按钮说明'
),
'sorts' => array(
'labels' => 'tpl-set-choice',
'type' => 'sort',
'name' => '分类',
'depend' => 'sort',
'default' => '',
'description' => '分类说明',
),
'sortss' => array(
'labels' => 'tpl-set-choice',
'type' => 'sort',
'name' => '分类',
'multi' => true,
'depend' => 'sort',
'default' => '',
'description' => '分类说明',
),
'page' => array(
'labels' => 'tpl-set-choice',
'type' => 'page',
'name' => '页面',
'default' => '',
'description' => '页面说明',
),
'pages' => array(
'labels' => 'tpl-set-choice',
'type' => 'page',
'name' => '页面',
'multi' => true,
'default' => '',
'description' => '页面说明',
),
'tag' => array(
'labels' => 'tpl-set-other',
'type' => 'tag',
'name' => '标签',
'default' => '',
'description' => '标签说明',
),
'image' => array(
'labels' => 'tpl-set-img',
'type' => 'image',
'name' => '图片(logo)',
'default' => TEMPLATE_URL . 'images/logo.png',
),
);
根据自己的需求自行更改代码,在需要的地方输出 echo _g('text'); 即可。