站点设置新增长代码显示控制选项

This commit is contained in:
yangjian 2021-06-08 14:33:47 +08:00
parent 8f68d7ca52
commit 79212e0603
4 changed files with 21 additions and 0 deletions

View File

@ -831,6 +831,7 @@ def admin_setting(request):
index_project_sort = request.POST.get('index_project_sort','1') # 首页文集默认排序
close_register = request.POST.get('close_register',None) # 禁止注册
require_login = request.POST.get('require_login',None) # 全站登录
long_code = request.POST.get('long_code', None) # 长代码显示
static_code = request.POST.get('static_code',None) # 统计代码
ad_code = request.POST.get('ad_code',None) # 广告位1
ad_code_2 = request.POST.get('ad_code_2',None) # 广告位2
@ -905,6 +906,11 @@ def admin_setting(request):
name='img_scale',
defaults={'value': img_scale, 'types': 'basic'}
)
# 更新长代码展示状态
SysSetting.objects.update_or_create(
name='long_code',
defaults={'value': long_code, 'types': 'basic'}
)
# 更新邮箱启用状态
SysSetting.objects.update_or_create(
name='enable_email',

View File

@ -46,6 +46,11 @@
max-width: 350px;
}
{% endif %}
{% if long_code == 'on' %}
pre.linenums,.vditor-reset > pre > code{
max-height: max-content!important;
}
{% endif %}
/* html{
filter: invert(1) hue-rotate(180deg);
} */

View File

@ -39,6 +39,11 @@
max-width: 350px;
}
{% endif %}
{% if long_code == 'on' %}
pre.linenums,.vditor-reset > pre > code{
max-height: max-content!important;
}
{% endif %}
/* html{
filter: invert(1) hue-rotate(180deg);
} */

View File

@ -40,6 +40,11 @@
max-width: 350px;
}
{% endif %}
{% if long_code == 'on' %}
pre.linenums,.vditor-reset > pre > code{
max-height: max-content!important;
}
{% endif %}
/* html{
filter: invert(1) hue-rotate(180deg);
} */