Skip to content

Commit

Permalink
🐛 还原站点主色调配置选项
Browse files Browse the repository at this point in the history
  • Loading branch information
Licoy committed Oct 21, 2022
1 parent 6179f8b commit a3bae1e
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions inc/setting/options/OptionScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@

namespace Puock\Theme\setting\options;

class OptionScript extends BaseOptionItem{
class OptionScript extends BaseOptionItem
{

function get_fields(): array
{
return [
'key' => 'script',
'label' => '脚本及样式',
'icon'=>'dashicons-shortcode',
'icon' => 'dashicons-shortcode',
'fields' => [
[
'id' => 'style_color_primary',
'label' => '站点主色调',
'type' => 'color',
'sdt' => '#1c60f3',
],
[
'id' => 'block_not_tran',
'label' => '全站区块不透明度',
Expand All @@ -19,7 +26,7 @@ function get_fields(): array
'step' => 1,
'max' => 100,
// 'tips'=>"小于100则会进行透明显示,部分浏览器可能不兼容",
'tips'=>"func:(function(args){
'tips' => "func:(function(args){
return args.h('div',[
args.h('span',null,'小于100则会进行透明显示,部分浏览器可能不兼容 '),
args.h(args.el.nTag,{type:'primary',size:'small',round:true},'当前不透明度为:'+args.data.block_not_tran+'%')
Expand All @@ -31,15 +38,15 @@ function get_fields(): array
'label' => '头部流量统计代码',
'type' => 'textarea',
'sdt' => '',
'tips'=>"用于在页头添加统计代码(PS:若开启无刷新加载,请在标签上加上<code>data-instant</code>属性)"
'tips' => "用于在页头添加统计代码(PS:若开启无刷新加载,请在标签上加上<code>data-instant</code>属性)"
],
[
'id' => 'css_code_header',
'label' => '头部自定义全局CSS样式',
'type' => 'textarea',
'placeholder' => '例如:#header{background-color:red !important}',
'sdt' => '',
'tips'=>"用于在页头添加统自定义CSS样式"
'tips' => "用于在页头添加统自定义CSS样式"
],
[
'id' => 'tj_code_footer',
Expand All @@ -57,7 +64,7 @@ function get_fields(): array
'id' => 'footer_about_me_title',
'label' => '底部关于我们说明标题',
'sdt' => '关于我们',
'tips'=>"若为空则不显示此栏目"
'tips' => "若为空则不显示此栏目"
],
[
'id' => 'footer_about_me',
Expand All @@ -69,7 +76,7 @@ function get_fields(): array
'id' => 'footer_copyright_title',
'label' => '底部版权说明标题',
'sdt' => '版权说明',
'tips'=>"若为空则不显示此栏目"
'tips' => "若为空则不显示此栏目"
],
[
'id' => 'footer_copyright',
Expand Down

0 comments on commit a3bae1e

Please sign in to comment.