feat(frontend): replace lazy loading with zibll lazysizes
This commit is contained in:
@@ -20,8 +20,21 @@ class GlobalSchema {
|
||||
'version' => '1.0.0',
|
||||
'option_key' => 'aksrt_settings',
|
||||
'groups' => [
|
||||
['key' => 'performance', 'title' => '性能优化', 'fields' => [
|
||||
['key' => 'lazyload_enabled', 'label' => '图片懒加载', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'performance', 'title' => '图像异步懒加载', 'fields' => [
|
||||
['key' => 'lazy_posts_thumb', 'label' => '文章缩略图懒加载', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'lazy_avatar', 'label' => '头像懒加载', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'lazy_posts_content', 'label' => '文章内容图片懒加载', 'type' => 'switch', 'default' => false],
|
||||
['key' => 'lazy_comment', 'label' => '评论内容图片懒加载', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'lazy_private', 'label' => '私信聊天图片懒加载', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'lazy_sider', 'label' => '幻灯片图片懒加载', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'lazy_cover', 'label' => '封面图片懒加载', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'lazy_other', 'label' => '其它图片懒加载', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'lazy_animation', 'label' => '懒加载动画效果', 'type' => 'select', 'default' => 'blur', 'options' => [
|
||||
['label' => '淡出淡入', 'value' => 'fade'],
|
||||
['label' => '高斯模糊', 'value' => 'blur'],
|
||||
['label' => '放大缩小', 'value' => 'scale'],
|
||||
]],
|
||||
['key' => 'thumbnail', 'label' => '懒加载预载图', 'type' => 'media', 'default' => get_template_directory_uri() . '/assets/img/thumbnail.svg'],
|
||||
]],
|
||||
['key' => 'filing', 'title' => '备案信息', 'fields' => [
|
||||
['key' => 'icp_filing', 'label' => 'ICP 备案号', 'type' => 'input', 'default' => ''],
|
||||
@@ -93,34 +106,6 @@ class GlobalSchema {
|
||||
]],
|
||||
],
|
||||
],
|
||||
'lazyload' => [
|
||||
'key' => 'lazyload',
|
||||
'title' => '懒加载设置',
|
||||
'version' => '1.0.0',
|
||||
'option_key' => 'aksrt_settings',
|
||||
'groups' => [
|
||||
['key' => 'basic', 'title' => '懒加载开关', 'fields' => [
|
||||
['key' => 'lazyload_enabled', 'label' => '图像异步懒加载', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'lazyload_animation', 'label' => '懒加载动画效果', 'type' => 'select', 'default' => 'blur', 'options' => [
|
||||
['label' => '淡出淡入', 'value' => 'fade'],
|
||||
['label' => '高斯模糊', 'value' => 'blur'],
|
||||
['label' => '放大缩小', 'value' => 'scale'],
|
||||
]],
|
||||
['key' => 'lazyload_placeholder', 'label' => '懒加载预载图', 'type' => 'media', 'default' => ''],
|
||||
['key' => 'lazyload_blur', 'label' => '模糊预览', 'type' => 'switch', 'default' => true],
|
||||
]],
|
||||
['key' => 'scope', 'title' => '懒加载范围', 'fields' => [
|
||||
['key' => 'lazyload_avatar', 'label' => '头像懒加载', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'lazyload_content', 'label' => '文章内容图片懒加载', 'type' => 'switch', 'default' => false],
|
||||
['key' => 'lazyload_comment', 'label' => '评论内容图片懒加载', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'lazyload_private', 'label' => '私信聊天图片懒加载', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'lazyload_slider', 'label' => '幻灯片图片懒加载', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'lazyload_cover', 'label' => '封面图片懒加载', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'lazyload_other', 'label' => '其它图片懒加载', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'lazyload_widget', 'label' => '小工具图片懒加载', 'type' => 'switch', 'default' => true],
|
||||
]],
|
||||
],
|
||||
],
|
||||
'layout' => [
|
||||
'key' => 'layout',
|
||||
'title' => '显示&布局',
|
||||
|
||||
Reference in New Issue
Block a user