mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-16 19:32:27 +08:00
background color
This commit is contained in:
10
back.go
10
back.go
@@ -89,6 +89,11 @@ func HandleProfile(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 写文章==>Write
|
// 写文章==>Write
|
||||||
|
type T struct {
|
||||||
|
ID string `json:"id"`
|
||||||
|
Tags string `json:"tags"`
|
||||||
|
}
|
||||||
|
|
||||||
func HandlePost(c *gin.Context) {
|
func HandlePost(c *gin.Context) {
|
||||||
h := GetBack()
|
h := GetBack()
|
||||||
id, err := strconv.Atoi(c.Query("cid"))
|
id, err := strconv.Atoi(c.Query("cid"))
|
||||||
@@ -103,6 +108,11 @@ func HandlePost(c *gin.Context) {
|
|||||||
h["Title"] = "撰写文章 | " + Ei.BTitle
|
h["Title"] = "撰写文章 | " + Ei.BTitle
|
||||||
h["Domain"] = setting.Conf.Mode.Domain
|
h["Domain"] = setting.Conf.Mode.Domain
|
||||||
h["Series"] = Ei.Series
|
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)
|
c.HTML(http.StatusOK, "backLayout.html", h)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -155,19 +155,6 @@
|
|||||||
$('#typecho-nav-list').find('.child').hide();
|
$('#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>
|
</script>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<p class="mono url-slug">
|
<p class="mono url-slug">
|
||||||
<label for="slug" class="sr-only">网址缩略名</label>
|
<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>
|
<p>
|
||||||
<label for="text" class="sr-only">文章内容</label>
|
<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>
|
<textarea style="height: 350px" autocomplete="off" id="text" name="text" class="w-100 mono">{{with .Edit}}{{.Content}}{{end}}</textarea>
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
<section class="typecho-post-option category-option">
|
<section class="typecho-post-option category-option">
|
||||||
<label class="typecho-label">分类</label>
|
<label class="typecho-label">专题</label>
|
||||||
<ul>
|
<ul>
|
||||||
{{range $k,$v:=.Series}}
|
{{range $k,$v:=.Series}}
|
||||||
<li>
|
<li>
|
||||||
@@ -136,7 +136,7 @@ $(document).ready(function() {
|
|||||||
$('#title').select();
|
$('#title').select();
|
||||||
|
|
||||||
// text 自动拉伸
|
// 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 提示
|
// tag autocomplete 提示
|
||||||
var tags = $('#tags'),
|
var tags = $('#tags'),
|
||||||
@@ -158,19 +158,7 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
tags.tokenInput([{
|
tags.tokenInput({{.Tags}}, {
|
||||||
"id": "sadfasdf",
|
|
||||||
"tags": "sadfasdf"
|
|
||||||
}, {
|
|
||||||
"id": "sdfsdfasd",
|
|
||||||
"tags": "sdfsdfasd"
|
|
||||||
}, {
|
|
||||||
"id": "sdfsdfasdf",
|
|
||||||
"tags": "sdfsdfasdf"
|
|
||||||
}, {
|
|
||||||
"id": "asdfasd",
|
|
||||||
"tags": "asdfasd"
|
|
||||||
}], {
|
|
||||||
propertyToSearch: 'tags',
|
propertyToSearch: 'tags',
|
||||||
tokenValue: 'tags',
|
tokenValue: 'tags',
|
||||||
searchDelay: 0,
|
searchDelay: 0,
|
||||||
@@ -283,7 +271,7 @@ $(document).ready(function() {
|
|||||||
locked = false;
|
locked = false;
|
||||||
}, 'json');
|
}, 'json');
|
||||||
}
|
}
|
||||||
}, 10000);
|
}, 20000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (autoSaveOnce) {
|
if (autoSaveOnce) {
|
||||||
@@ -350,15 +338,6 @@ $(document).ready(function() {
|
|||||||
password.addClass('hidden');
|
password.addClass('hidden');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 草稿删除确认
|
|
||||||
$('.edit-draft-notice a').click(function() {
|
|
||||||
if (confirm('您确认要删除这份草稿吗?')) {
|
|
||||||
window.location.href = $(this).attr('href');
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script src="/static/admin/pagedown.js"></script>
|
<script src="/static/admin/pagedown.js"></script>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user