添加额外样式

ct-mobile-first
ycc 5 years ago
parent c095cfe235
commit 08ef0dd254

@ -573,6 +573,11 @@ class Information extends CI_Controller
$mobile_template = str_replace('<!--@CANONICAL@-->', $this->input->post('site_url') . $this->input->post('ic_url'), $mobile_template);
$mobile_template_H1 = $this->call_mobile_template_H1($mobile_first_template_path, $this->input->post('is_path'), $this->input->post('ic_author'), $this->input->post('ic_title'), $this->input->post('ic_photo'));//H1模板替换
$mobile_template = str_replace('<!--@HEAD_1@-->', $mobile_template_H1, $mobile_template);
//额外样式
$meta_addon_css=get_meta($information->ic_id, 'meta_addon_css');
if(!empty($meta_addon_css)){
$mobile_template = str_replace('<!--@ADDON-CSS@-->', '<link href="'.$meta_addon_css.'" rel="stylesheet">', $mobile_template);
}
$mobile_template = str_replace('<!--@CUSTOM-CONENT@-->', $this->input->post('ic_content'), $mobile_template);
//Google广告代码
if(!empty(get_meta($information->ic_id, 'meta_google_ad_content'))){
@ -617,6 +622,11 @@ class Information extends CI_Controller
$template = str_replace('<!--@CANONICAL@-->', $this->input->post('site_url') . $this->input->post('ic_url'), $template);
$template_H1 = $this->call_mobile_template_H1($template_path, $this->input->post('is_path'), $this->input->post('ic_author'), $this->input->post('ic_title'), $this->input->post('ic_photo'));//H1模板替换
$template = str_replace('<!--@HEAD_1@-->', $template_H1, $template);
//额外样式
$meta_addon_css=get_meta($information->ic_id, 'meta_addon_css');
if(!empty($meta_addon_css)){
$template = str_replace('<!--@ADDON-CSS@-->', '<link href="'.$meta_addon_css.'" rel="stylesheet">', $template);
}
$template = str_replace('<!--@CUSTOM-CONENT@-->', $this->input->post('ic_content'), $template);
//Google广告代码
if(!empty(get_meta($information->ic_id, 'meta_google_ad_content'))){

@ -726,7 +726,7 @@ if (!empty($setting_website_nav)) {
<a href="javascript:void(0);" onclick="meta('delete', '<?php echo $information->ic_id; ?>', 'meta_addon_css', $('#meta_addon_css').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_addon_css', $('#meta_addon_css').val())"><i class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-hdd"></i></a>
</label>
<input class="form-control" type="text" id="meta_addon_css" name="meta_addon_css" placeholder="/css/aaa.css,/css/bbb.css" value="<?php echo get_meta($information->ic_id, 'meta_addon_css'); ?>" >
<input class="form-control" type="text" id="meta_addon_css" name="meta_addon_css" placeholder="https://data.chinahighlights.com/css/aaa.css" value="<?php echo get_meta($information->ic_id, 'meta_addon_css'); ?>" >
</div>
<div class="col-sm-7">
<label>附加JS

@ -21,6 +21,7 @@
<link rel="dns-prefetch" href="//connect.facebook.net">
<link rel="dns-prefetch" href="//www.facebook.com">
<link href="https://proxy-data.chinahighlights.com/css/mobile-first.css?v=1202913" rel="stylesheet">
<!--@ADDON-CSS@-->
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],

@ -10,6 +10,7 @@
<!--@OG:IMAGE@-->
<link rel="shortcut icon" href="//data.chinahighlights.com/favicon.ico">
<link href="https://proxy-data.chinahighlights.com/css/mobile-first.css?v=321" rel="stylesheet">
<!--@ADDON-CSS@-->
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],

Loading…
Cancel
Save