background color

This commit is contained in:
deepzz0
2016-10-19 19:39:21 +08:00
parent 31d3b8c43f
commit 2f52a53ff3
5 changed files with 18 additions and 42 deletions

10
back.go
View File

@@ -89,6 +89,11 @@ func HandleProfile(c *gin.Context) {
}
// 写文章==>Write
type T struct {
ID string `json:"id"`
Tags string `json:"tags"`
}
func HandlePost(c *gin.Context) {
h := GetBack()
id, err := strconv.Atoi(c.Query("cid"))
@@ -103,6 +108,11 @@ func HandlePost(c *gin.Context) {
h["Title"] = "撰写文章 | " + Ei.BTitle
h["Domain"] = setting.Conf.Mode.Domain
h["Series"] = Ei.Series
var tags []T
for tag, _ := range Ei.Tags {
tags = append(tags, T{tag, tag})
}
h["Tags"] = tags
c.HTML(http.StatusOK, "backLayout.html", h)
}

File diff suppressed because one or more lines are too long

View File

@@ -155,19 +155,6 @@
$('#typecho-nav-list').find('.child').hide();
});
})();
// if ($('.typecho-login').length == 0) {
// $('a').each(function() {
// var t = $(this),
// href = t.attr('href');
// if ((href && href[0] == '#') || /^http\:\/\/localhost\/admin\/.*$/.exec(href)) {
// return;
// }
// t.attr('target', '_blank');
// });
// }
});
})();
</script>

View File

@@ -14,7 +14,7 @@
</p>
<p class="mono url-slug">
<label for="slug" class="sr-only">网址缩略名</label>
{{.Domain}}/post/<input type="text" id="slug" name="slug" autocomplete="off" {{with .Edit}}value="{{.Slug}}" {{end}} class="mono" />.html </p>
https://{{.Domain}}/post/<input type="text" id="slug" name="slug" autocomplete="off" {{with .Edit}}value="{{.Slug}}" {{end}} class="mono" />.html </p>
<p>
<label for="text" class="sr-only">文章内容</label>
<textarea style="height: 350px" autocomplete="off" id="text" name="text" class="w-100 mono">{{with .Edit}}{{.Content}}{{end}}</textarea>
@@ -40,7 +40,7 @@
</p>
</section>
<section class="typecho-post-option category-option">
<label class="typecho-label">分类</label>
<label class="typecho-label">专题</label>
<ul>
{{range $k,$v:=.Series}}
<li>
@@ -136,7 +136,7 @@ $(document).ready(function() {
$('#title').select();
// text 自动拉伸
Typecho.editorResize('text', 'http://localhost/index.php/action/ajax?do=editorResize&_=53e23a1bd0daab03b05d9c23190904a4');
// Typecho.editorResize('text', 'http://localhost/index.php/action/ajax?do=editorResize&_=53e23a1bd0daab03b05d9c23190904a4');
// tag autocomplete 提示
var tags = $('#tags'),
@@ -158,19 +158,7 @@ $(document).ready(function() {
});
}
tags.tokenInput([{
"id": "sadfasdf",
"tags": "sadfasdf"
}, {
"id": "sdfsdfasd",
"tags": "sdfsdfasd"
}, {
"id": "sdfsdfasdf",
"tags": "sdfsdfasdf"
}, {
"id": "asdfasd",
"tags": "asdfasd"
}], {
tags.tokenInput({{.Tags}}, {
propertyToSearch: 'tags',
tokenValue: 'tags',
searchDelay: 0,
@@ -283,7 +271,7 @@ $(document).ready(function() {
locked = false;
}, 'json');
}
}, 10000);
}, 20000);
}
if (autoSaveOnce) {
@@ -350,15 +338,6 @@ $(document).ready(function() {
password.addClass('hidden');
}
});
// 草稿删除确认
$('.edit-draft-notice a').click(function() {
if (confirm('您确认要删除这份草稿吗?')) {
window.location.href = $(this).attr('href');
}
return false;
});
});
</script>
<script src="/static/admin/pagedown.js"></script>

File diff suppressed because one or more lines are too long