mirror of https://github.com/1099438829/apeblog
修正文章发布和默认主题预览图
This commit is contained in:
parent
6343c7af63
commit
d722e41828
|
|
@ -74,12 +74,6 @@
|
|||
<label for="content">文章内容</label>
|
||||
<textarea id="content" name="content"></textarea>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="show_time">发布时间</label>
|
||||
<input class="form-control js-datetimepicker" type="text" id="show_time"
|
||||
name="show_time" placeholder="请选择具体时间" value="" data-side-by-side="true"
|
||||
data-locale="zh-cn" data-format="YYYY-MM-DD HH:mm:ss"/>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<button type="submit" class="btn btn-primary ajax-post" target-form="add-form">立即提交
|
||||
</button>
|
||||
|
|
@ -107,7 +101,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group row col-md-2">
|
||||
<div class="col-xs-6">顶置</div>
|
||||
<div class="col-xs-6">置顶</div>
|
||||
<div class="col-xs-6">
|
||||
<label class="lyear-switch switch-solid switch-primary">
|
||||
<input type="checkbox" name="is_top">
|
||||
|
|
|
|||
|
|
@ -89,12 +89,6 @@
|
|||
<label for="content">文章内容</label>
|
||||
<textarea id="content" name="content">{$info.content}</textarea>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="show_time">发布时间</label>
|
||||
<input class="form-control js-datetimepicker" type="text" id="show_time"
|
||||
name="show_time" placeholder="请选择具体时间" value="{$info.show_time}"
|
||||
data-side-by-side="true" data-locale="zh-cn" data-format="YYYY-MM-DD HH:mm:ss"/>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<button type="submit" class="btn btn-primary ajax-post" target-form="add-form">立即提交
|
||||
</button>
|
||||
|
|
@ -122,7 +116,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group row col-md-2">
|
||||
<div class="col-xs-6">顶置</div>
|
||||
<div class="col-xs-6">置顶</div>
|
||||
<div class="col-xs-6">
|
||||
<label class="lyear-switch switch-solid switch-primary">
|
||||
<input type="checkbox" name="is_top" {if $info.is_top}checked{/if}>
|
||||
|
|
|
|||
|
|
@ -11,10 +11,15 @@ jQuery( function() {
|
|||
suppressScrollX: true
|
||||
});
|
||||
|
||||
var storage = 'localStorage';
|
||||
if(!window.localStorage){
|
||||
storage = 'cookie';
|
||||
}
|
||||
|
||||
// 读取cookie中的主题设置
|
||||
var the_logo_bg = $.cookie('the_logo_bg'),
|
||||
the_header_bg = $.cookie('the_header_bg'),
|
||||
the_sidebar_bg = $.cookie('the_sidebar_bg');
|
||||
var the_logo_bg = storage == 'localStorage'? window.localStorage.getItem('the_logo_bg'):$.cookie('the_logo_bg');
|
||||
the_header_bg = storage == 'localStorage'? window.localStorage.getItem('the_header_bg'):$.cookie('the_header_bg'),
|
||||
the_sidebar_bg = storage == 'localStorage'? window.localStorage.getItem('the_sidebar_bg'):$.cookie('the_sidebar_bg');
|
||||
|
||||
if (the_logo_bg) $('body').attr('data-logobg', the_logo_bg);
|
||||
if (the_header_bg) $('body').attr('data-headerbg', the_header_bg);
|
||||
|
|
@ -90,7 +95,7 @@ jQuery( function() {
|
|||
setTheme = function(input_name, data_name) {
|
||||
$("input[name='"+input_name+"']").click(function(){
|
||||
$('body').attr(data_name, $(this).val());
|
||||
$.cookie('the_'+input_name, $(this).val());
|
||||
storage == 'localStorage'? window.localStorage.setItem('the_'+input_name,$(this).val()):$.cookie('the_'+input_name,$(this).val());
|
||||
});
|
||||
}
|
||||
setTheme('logo_bg', 'data-logobg');
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 559 KiB After Width: | Height: | Size: 179 KiB |
Loading…
Reference in New Issue