feat: CH 增加自定义 Html head

master
LiaoYijun 1 year ago
parent 4ef6a7bcc5
commit f980259ffb

@ -1380,6 +1380,13 @@ class Information extends CI_Controller
$template $template
); );
} }
// 自定义 Html Head
$meta_custom_head = get_meta($information->ic_id, 'meta_custom_head');
if (!empty($meta_custom_head)) {
$template = str_replace('<!--@Custom-Head@-->', $meta_custom_head, $template);
}
//额外样式 //额外样式
$meta_addon_css = get_meta($information->ic_id, 'meta_addon_css'); $meta_addon_css = get_meta($information->ic_id, 'meta_addon_css');
if (!empty($meta_addon_css)) { if (!empty($meta_addon_css)) {

@ -1108,6 +1108,19 @@ if (!empty($setting_website_nav)) {
<textarea class="form-control" id="meta_construction_code" <textarea class="form-control" id="meta_construction_code"
name="meta_construction_code"><?php echo get_meta($information->ic_id, 'meta_construction_code'); ?></textarea> name="meta_construction_code"><?php echo get_meta($information->ic_id, 'meta_construction_code'); ?></textarea>
<label>
自定义 Head
<a href="javascript:void(0);"
onclick="meta('delete', '<?php echo $information->ic_id; ?>', 'meta_custom_head', $('#meta_custom_head').val())"><i
class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-remove"></i></a>
<a href="javascript:void(0);"
onclick="meta('save', '<?php echo $information->ic_id; ?>', 'meta_custom_head', $('#meta_custom_head').val())"><i
class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-hdd"></i></a>
</label>
<textarea class="form-control" id="meta_custom_head"
name="meta_custom_head"><?php echo get_meta($information->ic_id, 'meta_custom_head'); ?></textarea>
<div class="row"> <div class="row">
<div class="col-sm-4"> <div class="col-sm-4">
<label>展示列表图片 <label>展示列表图片

@ -28,6 +28,7 @@
<link rel="dns-prefetch" href="https://www.google-analytics.com"> <link rel="dns-prefetch" href="https://www.google-analytics.com">
<!--@MAIN-CSS@--> <!--@MAIN-CSS@-->
<!--@ADDON-CSS@--> <!--@ADDON-CSS@-->
<!--@Custom-Head@-->
<!--@CHINA-TRAINS-CSS@--> <!--@CHINA-TRAINS-CSS@-->
<!-- Google Tag Manager --> <!-- Google Tag Manager -->
<script>(function (w, d, s, l, i) { <script>(function (w, d, s, l, i) {

@ -25,6 +25,7 @@
<link rel="shortcut icon" href="https://data.chinahighlights.com/favicon.ico"> <link rel="shortcut icon" href="https://data.chinahighlights.com/favicon.ico">
<!--@MAIN-CSS@--> <!--@MAIN-CSS@-->
<!--@ADDON-CSS@--> <!--@ADDON-CSS@-->
<!--@Custom-Head@-->
<!--@CHINA-TRAINS-CSS@--> <!--@CHINA-TRAINS-CSS@-->
<!-- Google Tag Manager --> <!-- Google Tag Manager -->
<script>(function (w, d, s, l, i) { <script>(function (w, d, s, l, i) {

Loading…
Cancel
Save