mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-04 22:02:26 +08:00
更新很多文件
This commit is contained in:
@@ -22,6 +22,7 @@ disqus:
|
||||
publickey: wdSgxRm9rdGAlLKFcFdToBe3GT4SibmV7Y8EjJQ0r4GWXeKtxpopMAeIeoI2dTEg
|
||||
postscount: https://disqus.com/api/3.0/threads/set.json
|
||||
postslist: https://disqus.com/api/3.0/threads/listPosts.json
|
||||
postcreate: https://disqus.com/api/3.0/posts/create.json
|
||||
interval: 5
|
||||
# 热搜词配置
|
||||
hotwords:
|
||||
@@ -32,7 +33,7 @@ google:
|
||||
v: "1"
|
||||
t: pageview
|
||||
# 静态文件版本
|
||||
staticversion: 2
|
||||
staticversion: 1
|
||||
# 七牛CDN
|
||||
kodo:
|
||||
name: eiblog
|
||||
@@ -50,7 +51,11 @@ mode:
|
||||
keyfile: conf/certs/domain.key
|
||||
domain: deepzz.com
|
||||
# twitter地址: twitter.com/chenqijing2
|
||||
twitter: twitter.com/chenqijing2
|
||||
twitter:
|
||||
card: summary
|
||||
site: chenqijing2
|
||||
image: st.deepzz.com/static/img/avatar.jpg
|
||||
address: twitter.com/chenqijing2
|
||||
# superfeedr url
|
||||
feedrurl: https://deepzz.superfeedr.com/
|
||||
# ping rpcs 地址
|
||||
|
||||
@@ -92,18 +92,16 @@ server {
|
||||
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
|
||||
|
||||
# DENY 将完全不允许页面被嵌套,可能会导致一些异常。如果遇到这样的问题,建议改成 SAMEORIGIN
|
||||
# deny 将完全不允许页面被嵌套,可能会导致一些异常。如果遇到这样的问题,建议改成 SAMEORIGIN
|
||||
# https://imququ.com/post/web-security-and-response-header.html#toc-1
|
||||
add_header X-Frame-Options DENY;
|
||||
add_header X-Frame-Options deny;
|
||||
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
|
||||
# proxy_set_header X-Via QingDao.Aliyun;
|
||||
proxy_set_header Connection "";
|
||||
proxy_set_header Host deepzz.com;
|
||||
proxy_set_header X-Real_IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-XSS-Protection "1; mode=block";
|
||||
|
||||
proxy_pass http://127.0.0.1:9000;
|
||||
}
|
||||
@@ -120,13 +118,14 @@ server {
|
||||
# https://imququ.com/post/http-public-key-pinning.html
|
||||
add_header Public-Key-Pins 'pin-sha256="lnsM2T/O9/J84sJFdnrpsFp3awZJ+ZZbYpCWhGloaHI="; pin-sha256="YLh1dUR9y6Kja30RrAn7JKnbQG/uEtLMkBgFF2Fuihg="; max-age=2592000; includeSubDomains';
|
||||
add_header Cache-Control no-cache;
|
||||
add_header X-Via Aliyun.QingDao;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
|
||||
proxy_ignore_headers Set-Cookie;
|
||||
|
||||
proxy_hide_header Vary;
|
||||
proxy_hide_header X-Powered-By;
|
||||
|
||||
proxy_set_header X-Via QingDao.Aliyun;
|
||||
proxy_set_header Connection "";
|
||||
proxy_set_header Host deepzz.com;
|
||||
proxy_set_header X-Real_IP $remote_addr;
|
||||
|
||||
70
disqus.go
70
disqus.go
@@ -26,7 +26,9 @@ func PostsCount() {
|
||||
if setting.Conf.Disqus.PostsCount == "" || setting.Conf.Disqus.PublicKey == "" || setting.Conf.Disqus.ShortName == "" {
|
||||
return
|
||||
}
|
||||
baseUrl := setting.Conf.Disqus.PostsCount + "?api_key=" + setting.Conf.Disqus.PublicKey + "&forum=" + setting.Conf.Disqus.ShortName + "&"
|
||||
baseUrl := setting.Conf.Disqus.PostsCount +
|
||||
"?api_key=" + setting.Conf.Disqus.PublicKey +
|
||||
"&forum=" + setting.Conf.Disqus.ShortName + "&"
|
||||
var count, index int
|
||||
for index < len(Ei.Articles) {
|
||||
logd.Debugf("count=====%d, index=======%d, length=======%d, bool=========%t\n", count, index, len(Ei.Articles), index < len(Ei.Articles) && count < 50)
|
||||
@@ -88,6 +90,7 @@ type postsList struct {
|
||||
Cache string
|
||||
}
|
||||
}
|
||||
Thread string
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,9 +98,12 @@ func PostsList(slug, cursor string) *postsList {
|
||||
if setting.Conf.Disqus.PostsList == "" || setting.Conf.Disqus.PublicKey == "" || setting.Conf.Disqus.ShortName == "" {
|
||||
return nil
|
||||
}
|
||||
url := setting.Conf.Disqus.PostsList + "?limit=50&api_key=" + setting.Conf.Disqus.PublicKey + "&forum=" + setting.Conf.Disqus.ShortName + "&cursor=" + cursor + "&thread:ident=post-" + slug
|
||||
url := setting.Conf.Disqus.PostsList + "?limit=50&api_key=" +
|
||||
setting.Conf.Disqus.PublicKey + "&forum=" + setting.Conf.Disqus.ShortName +
|
||||
"&cursor=" + cursor + "&thread:ident=post-" + slug
|
||||
resp, err := http.Get(url)
|
||||
if err != nil {
|
||||
logd.Error(err)
|
||||
return nil
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
@@ -118,3 +124,63 @@ func PostsList(slug, cursor string) *postsList {
|
||||
}
|
||||
return pl
|
||||
}
|
||||
|
||||
type PostCreate struct {
|
||||
Message string `json:"message"`
|
||||
Parent string `json:"parent"`
|
||||
Thread string `json:"thread"`
|
||||
AuthorEmail string `json:"author_email"`
|
||||
AuthorName string `json:"autor_name"`
|
||||
IpAddress string `json:"ip_address"`
|
||||
Identifier string `json:"identifier"`
|
||||
UserAgent string `json:"user_agent"`
|
||||
}
|
||||
|
||||
type PostResponse struct {
|
||||
Code int `json:"code"`
|
||||
Response struct {
|
||||
Id string `json:"id"`
|
||||
} `json:"response"`
|
||||
}
|
||||
|
||||
func PostComment(pc *PostCreate) string {
|
||||
if setting.Conf.Disqus.PostsList == "" || setting.Conf.Disqus.PublicKey == "" || setting.Conf.Disqus.ShortName == "" {
|
||||
return ""
|
||||
}
|
||||
url := setting.Conf.Disqus.PostCreate +
|
||||
"?api_key=E8Uh5l5fHZ6gD8U3KycjAIAk46f68Zw7C6eW8WSjZvCLXebZ7p0r1yrYDrLilk2F" +
|
||||
"&message=" + pc.Message + "&parent=" + pc.Parent +
|
||||
"&thread=" + pc.Thread + "&author_email=" + pc.AuthorEmail +
|
||||
"&author_name=" + pc.AuthorName
|
||||
|
||||
request, err := http.NewRequest("POST", url, nil)
|
||||
if err != nil {
|
||||
logd.Error(err)
|
||||
return ""
|
||||
}
|
||||
request.Header.Set("Referer", "https://disqus.com")
|
||||
logd.Print(*request)
|
||||
resp, err := http.DefaultClient.Do(request)
|
||||
if err != nil {
|
||||
logd.Error(err)
|
||||
return ""
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
b, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
logd.Error(err)
|
||||
return ""
|
||||
}
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
logd.Error(string(b))
|
||||
return ""
|
||||
}
|
||||
pr := &PostResponse{}
|
||||
err = json.Unmarshal(b, pr)
|
||||
if err != nil {
|
||||
logd.Error(err)
|
||||
return ""
|
||||
}
|
||||
logd.Print(pr.Response.Id)
|
||||
return pr.Response.Id
|
||||
}
|
||||
|
||||
58
front.go
58
front.go
@@ -188,6 +188,25 @@ func HandleSearchPage(c *gin.Context) {
|
||||
RenderHTMLFront(c, "search", h)
|
||||
}
|
||||
|
||||
func HandleDisqusFrom(c *gin.Context) {
|
||||
params := strings.Split(c.Param("slug"), "|")
|
||||
if len(params) != 4 || params[1] == "" {
|
||||
c.String(http.StatusOK, "出错啦。。。")
|
||||
return
|
||||
}
|
||||
artc := Ei.MapArticles[params[0]]
|
||||
data := gin.H{
|
||||
"Title": "发表评论 | " + Ei.BTitle,
|
||||
"ATitle": artc.Title,
|
||||
"Thread": params[1],
|
||||
}
|
||||
err := Tmpl.ExecuteTemplate(c.Writer, "disqus.html", data)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
c.Header("Content-Type", "text/html; charset=utf-8")
|
||||
}
|
||||
|
||||
func HandleFeed(c *gin.Context) {
|
||||
http.ServeFile(c.Writer, c.Request, "static/feed.xml")
|
||||
}
|
||||
@@ -250,6 +269,7 @@ type DisqusComments struct {
|
||||
Next string `json:"next"`
|
||||
Total int `json:"total,omitempty"`
|
||||
Comments []commentsDetail `json:"comments"`
|
||||
Thread string `json:"thread"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
@@ -274,9 +294,12 @@ func HandleDisqus(c *gin.Context) {
|
||||
if postsList.Cursor.HasNext {
|
||||
dcs.Data.Next = postsList.Cursor.Next
|
||||
}
|
||||
dcs.Data.Total = Ei.MapArticles[slug].Count
|
||||
dcs.Data.Total = len(postsList.Response)
|
||||
dcs.Data.Comments = make([]commentsDetail, len(postsList.Response))
|
||||
for i, v := range postsList.Response {
|
||||
if dcs.Data.Thread == "" {
|
||||
dcs.Data.Thread = v.Thread
|
||||
}
|
||||
dcs.Data.Comments[i] = commentsDetail{
|
||||
Id: v.Id,
|
||||
Name: v.Author.Name,
|
||||
@@ -295,6 +318,39 @@ func HandleDisqus(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, dcs)
|
||||
}
|
||||
|
||||
// [thread:[5279901489] parent:[] identifier:[post-troubleshooting-https] next:[] author_name:[你好] author_email:[chenqijing2@163.com] message:[fdsfdsf]]
|
||||
func HandleDisqusCreate(c *gin.Context) {
|
||||
rep := gin.H{"errno": SUCCESS, "errmsg": ""}
|
||||
defer c.JSON(http.StatusOK, rep)
|
||||
msg := c.PostForm("message")
|
||||
email := c.PostForm("author_email")
|
||||
name := c.PostForm("author_name")
|
||||
thread := c.PostForm("thread")
|
||||
identifier := c.PostForm("identifier")
|
||||
if msg == "" || email == "" || name == "" || thread == "" || identifier == "" {
|
||||
rep["errno"] = FAIL
|
||||
rep["errmsg"] = "参数错误"
|
||||
return
|
||||
}
|
||||
pc := &PostCreate{
|
||||
Message: msg,
|
||||
Parent: c.PostForm("parent"),
|
||||
Thread: thread,
|
||||
AuthorEmail: email,
|
||||
AuthorName: name,
|
||||
IpAddress: c.ClientIP(),
|
||||
}
|
||||
|
||||
id := PostComment(pc)
|
||||
if id == "" {
|
||||
rep["errno"] = FAIL
|
||||
rep["errmsg"] = "系统错误"
|
||||
return
|
||||
}
|
||||
rep["errno"] = SUCCESS
|
||||
rep["data"] = gin.H{"id": id}
|
||||
}
|
||||
|
||||
func RenderHTMLFront(c *gin.Context, name string, data gin.H) {
|
||||
var buf bytes.Buffer
|
||||
err := Tmpl.ExecuteTemplate(&buf, name, data)
|
||||
|
||||
@@ -84,14 +84,14 @@ const (
|
||||
)
|
||||
|
||||
func ConvertStr(str string) string {
|
||||
t, err := time.Parse("2006-01-02T15:04:05", str)
|
||||
t, err := time.ParseInLocation("2006-01-02T15:04:05", str, time.UTC)
|
||||
if err != nil {
|
||||
logd.Error(err, str)
|
||||
return JUST_NOW
|
||||
}
|
||||
now := time.Now()
|
||||
year1, month1, day1 := t.Date()
|
||||
year2, month2, day2 := now.Date()
|
||||
year2, month2, day2 := now.UTC().Date()
|
||||
if y := year2 - year1; y > 0 {
|
||||
return fmt.Sprintf(YEARS_AGO, y)
|
||||
}
|
||||
|
||||
@@ -54,7 +54,9 @@ func init() {
|
||||
router.GET("/archives.html", HandleArchivesPage)
|
||||
router.GET("/search.html", HandleSearchPage)
|
||||
router.GET("/beacon.html", HandleBeacon)
|
||||
router.GET("/disqus/:slug", HandleDisqus)
|
||||
router.GET("/disqus/post-:slug", HandleDisqus)
|
||||
router.GET("/disqus/form/post-:slug", HandleDisqusFrom)
|
||||
router.POST("/disqus/create", HandleDisqusCreate)
|
||||
router.GET("/rss.html", HandleFeed)
|
||||
router.GET("/feed", HandleFeed)
|
||||
router.GET("/opensearch.xml", HandleOpenSearch)
|
||||
|
||||
@@ -35,6 +35,7 @@ type Config struct {
|
||||
PublicKey string
|
||||
PostsCount string
|
||||
PostsList string
|
||||
PostCreate string
|
||||
Interval int
|
||||
}
|
||||
HotWords []string // 热搜词
|
||||
@@ -49,8 +50,13 @@ type Config struct {
|
||||
AccessKey string
|
||||
SecretKey string
|
||||
}
|
||||
Mode RunMode // 运行模式
|
||||
Twitter string // twitter地址
|
||||
Mode RunMode // 运行模式
|
||||
Twitter struct { // twitter信息
|
||||
Card string
|
||||
Site string
|
||||
Image string
|
||||
Address string
|
||||
}
|
||||
FeedrURL string // superfeedr url
|
||||
PingRPCs []string // ping rpc 地址
|
||||
Account struct {
|
||||
|
||||
@@ -1 +1 @@
|
||||
{{define "about"}}<div id=content class=inner>{{with .Article}}<article class="post post-{{.ID}}" itemscope itemtype="http://schema.org/Article"><h1 class=title itemprop=headline>{{.Title}}</h1><div class="entry-content" itemprop=articleBody>{{str2html .Header}}{{str2html .Content}}</div></article><section id=comments><h1 class=title>Comments<span id=switch_thread_mode></h1><div id=disqus_thread class=ds-thread data-identifier="post-{{.Slug}}" data-url="https://{{$.Domain}}/post/{{.Slug}}.html"></div><div id=simple_thread data-id="{{.Slug}}"></div></section>{{end}}</div>{{end}}
|
||||
{{define "about"}}<div id=content class=inner>{{with .Article}}<article class="post post-{{.ID}}" itemscope itemtype="http://schema.org/Article"><h1 class=title itemprop=headline>{{.Title}}</h1><div class="entry-content" itemprop=articleBody>{{str2html .Header}}{{str2html .Content}}</div></article><section id=comments><h1 class=title>Comments</h1><div class=total_thread data-identifier="post-{{.Slug}}" data-url="https://{{$.Domain}}/post/{{.Slug}}.html"></div></section>{{end}}</div>{{end}}
|
||||
|
||||
@@ -1 +1 @@
|
||||
{{define "article"}}<div id=content class=inner>{{with .Article}}<article class="post post-{{.ID}}" itemscope itemtype="http://schema.org/Article"><div class=meta><div class=date><time itemprop=datePublished content="{{dateformat .CreateTime "2006-01-02"}}">{{dateformat .CreateTime "Jan 02, 2006"}}</time></div><div class=comment><a href="#comments">{{.Count}} Comments</a></div></div><h1 class=title itemprop=headline>{{.Title}}</h1><div class="entry-content" itemprop=articleBody>{{str2html .Header}}{{str2html .Content}}<p>本文链接:<a rel="bookmark" title="Permalink to {{.Title}}" href="//{{$.Domain}}/post/{{.Slug}}.html" itemprop="url">https://{{$.Domain}}/post/{{.Slug}}.html</a>,<a href="//{{$.Domain}}/post/{{.Slug}}.html#comments">参与评论 »</a></p><p>--<acronym title="End of File">EOF</acronym>--</p><p class="post-info">发表于 <span class="date">{{dateformat .CreateTime "2006-01-02 15:04:05"}}</span>{{if gt (.Tags|len) 0}},并被添加「{{range $index, $elem := .Tags}}{{if gt $index 0}}、{{end}}<a href="/search.html?q=tag:{{$elem}}">{{$elem}}</a>{{end}}」标签{{end}}{{if .UpdateTime|isnotzero}},最后修改于 <span class="date">{{dateformat .UpdateTime "2006-01-02 15:04:05"}}</span>{{end}}。</p>{{with $.Copyright}}<p class="copyright-info">{{str2html $.Copyright}}<a href="//{{$.Domain}}/post/about.html#toc_1">更多说明 »</a></p>{{end}}{{if gt $.Days 100}}<p class="expire-tips">提醒:本文最后更新于 {{$.Days}} 天前,文中所描述的信息可能已发生改变,请谨慎使用。</p>{{end}}{{with $.Serie}}<div class="entry-series"><h3>专题「{{.Name}}」的其它文章 <a href="/series.html#toc-{{.ID}}" title="更多">»</a></h3><ul>{{range .Articles}}{{if ne .ID $.Article.ID}}<li><a href="/post/{{.Slug}}.html">{{.Title}}</a> <span class="date">({{dateformat .CreateTime "Jan 02, 2006"}})</span></li>{{end}}{{end}}</ul></div>{{end}}</div></article><nav class="page-navi">{{with .Prev}}<a href="/post/{{.Slug}}.html" class=prev>« {{.Title}}</a>{{end}}{{with .Next}}<a href="/post/{{.Slug}}.html" class=next>{{.Title}} »</a>{{end}}</nav><section id=comments><h1 class=title>Comments<span id=switch_thread_mode></h1><div id=disqus_thread class=ds-thread data-identifier="post-{{.Slug}}" data-url="https://{{$.Domain}}/post/{{.Slug}}.html"></div><div id=simple_thread data-id="{{.Slug}}"></div></section>{{end}}</div>{{end}}
|
||||
{{define "article"}}<div id=content class=inner>{{with .Article}}<article class="post post-{{.ID}}" itemscope itemtype="http://schema.org/Article"><div class=meta><div class=date><time itemprop=datePublished content="{{dateformat .CreateTime "2006-01-02T15:04:05Z07:00"}}">{{dateformat .CreateTime "Jan 02, 2006"}}</time></div><div class="date-modified"><time itemprop=dateModified content="{{dateformat .UpdateTime "2006-01-02T15:04:05Z07:00"}}">{{dateformat .UpdateTime "Jan 02, 2006"}}</time></div><div class=comment><a href="#comments">{{.Count}} Comments</a></div></div><h1 class=title itemprop=headline>{{.Title}}</h1><div class="entry-content" itemprop=articleBody>{{str2html .Header}}{{str2html .Content}}<p>本文链接:<a rel="bookmark" title="Permalink to {{.Title}}" href="//{{$.Domain}}/post/{{.Slug}}.html" itemprop="url">https://{{$.Domain}}/post/{{.Slug}}.html</a>,<a href="//{{$.Domain}}/post/{{.Slug}}.html#comments">参与评论 »</a></p><p>--<acronym title="End of File">EOF</acronym>--</p><p class="post-info">发表于 <span class="date">{{dateformat .CreateTime "2006-01-02 15:04:05"}}</span>{{if gt (.Tags|len) 0}},并被添加「{{range $index, $elem := .Tags}}{{if gt $index 0}}、{{end}}<a href="/search.html?q=tag:{{$elem}}">{{$elem}}</a>{{end}}」标签{{end}}{{if .UpdateTime|isnotzero}},最后修改于 <span class="date">{{dateformat .UpdateTime "2006-01-02 15:04:05"}}</span>{{end}}。</p>{{with $.Copyright}}<p class="copyright-info">{{str2html $.Copyright}}<a href="//{{$.Domain}}/post/about.html#toc_1">更多说明 »</a></p>{{end}}{{if gt $.Days 100}}<p class="expire-tips">提醒:本文最后更新于 {{$.Days}} 天前,文中所描述的信息可能已发生改变,请谨慎使用。</p>{{end}}{{with $.Serie}}<div class="entry-series"><h3>专题「{{.Name}}」的其它文章 <a href="/series.html#toc-{{.ID}}" title="更多">»</a></h3><ul>{{range .Articles}}{{if ne .ID $.Article.ID}}<li><a href="/post/{{.Slug}}.html">{{.Title}}</a> <span class="date">({{dateformat .CreateTime "Jan 02, 2006"}})</span></li>{{end}}{{end}}</ul></div>{{end}}</div></article><nav class="page-navi">{{with .Prev}}<a href="/post/{{.Slug}}.html" class=prev>« {{.Title}}</a>{{end}}{{with .Next}}<a href="/post/{{.Slug}}.html" class=next>{{.Title}} »</a>{{end}}</nav><section id=comments><h1 class=title>Comments</h1><div class=total_thread data-identifier="post-{{.Slug}}" data-url="https://{{$.Domain}}/post/{{.Slug}}.html"></div></section>{{end}}</div>{{end}}
|
||||
|
||||
2
views/disqus.html
Normal file
2
views/disqus.html
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
<!Doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta content="width=device-width,minimum-scale=1.0" name=viewport><meta name="format-detection" content="telephone=no"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name=referrer content=always><meta name=robots content="noindex, nofollow, noarchive"><title>{{.Title}}</title><style type="text/css">*{margin:0;padding:0}html,body{height:100%}body{background:#fff;color:#2a2e2e;font-size:15px;font-family:"Helvetica Neue",arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::selection,::-moz-selection,::-webkit-selection{background-color:#2479CC;color:#eee}h3{font-size:1.3em;line-height:1.5;margin:15px 30px;text-align:center}a{color:#2479CC;text-decoration:none}.card{margin:15px 25px;text-align:left}.submit input,.submit textarea{-webkit-appearance:none;border:1px solid #bbb;border-radius:1px;font-size:15px;height:20px;line-height:20px;margin-left:10px;padding:6px 8px}.submit span{position:relative;top:8px}.submit li{display:-webkit-box;margin:15px 0}.submit textarea{height:130px}.submit .line{-webkit-box-flex:1;display:block}.submit .btn-submit{-webkit-appearance:none;background:#12b0e6;border:none;border-radius:0;box-shadow:inset 0 -5px 20px rgba(0,0,0,.1);color:#fff;cursor:pointer;display:block;font-size:14px;line-height:1;padding:0.625em .5em;width:100%}.submit li.tips{color:#999;font-size:14px}</style></head><body><header><h3>对「{{.ATitle}}」发表评论</h3></header><div class=bd><div class="card submit"><form onsubmit="return false" id="create-post"><ul><li><span>昵称:</span><input class=line name=author_name required><li><span>邮箱:</span><input class=line name=author_email type=email required><li><span>内容:</span><textarea class="line" name="message" required></textarea><li><input type=hidden name=thread value="{{.Thread}}"><input type=hidden name=parent value=""><input type=hidden name=identifier value="post-troubleshooting-https"><input type=hidden name=next value=""><button class="btn-submit" type=submit>立即发表</button><li class=tips>注:通过本表单提交的数据,会原样转发给 Disqus,本站不做任何存储和记录。<li><a href="#close" onclick="window.close();void(0)">放弃评论</a></ul></form></div></div><footer></footer><script src="https://st.deepzz.com/static/js/jquery_f6c08.js" ></script><script>!function(a){function e(){try{localStorage.author_name=$('[name="author_name"]').val(),localStorage.author_email=$('[name="author_email"]').val()}catch(a){}}function t(){$('[name="author_name"]').val(localStorage.author_name),$('[name="author_email"]').val(localStorage.author_email),["author_name","author_email","message"].some(function(a){var e=$('[name="'+a+'"]');return e.val()?void 0:e.focus()})}var o=!1;$("#create-post").on("submit",function(e){if(e.preventDefault(),!o){o=!0;var t=$(".tips");t.html("提交中..."),$.post("/disqus/create",$("#create-post").serialize()).then(function(e){if(o=!1,e.errno)t.html("提交失败:"+e.errmsg);else{$(".btn-submit").prop("disabled",!0),t.html('提交成功!本窗口 <i id="timer">5</i> 秒后自动关闭。');try{setTimeout(function(){a.opener.location.hash="comment-"+e.data.id,a.opener.location.reload(),a.close()},5e3)}catch(n){}setInterval(function(){var a=$("#timer");a.html(Math.max(0,parseInt(a.html()))-1)},1e3)}})}}),t(),$('[name="author_name"], [name="author_email"]').on("change",e)}(this);</script></body></html>
|
||||
@@ -1 +1 @@
|
||||
<!DOCTYPE html><html lang="zh-cn"><head><meta charset="utf-8"><meta content="width=device-width,minimum-scale=1.0" name="viewport"><meta name="format-detection" content="telephone=no"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="referrer" content="always"><title>{{.Title}}</title><script>!function(n,t){function e(){o("nls",1)}function c(){t.documentElement.style.display="none",u(),location.reload()}function r(n){var t="";try{t=f[n]||"",t.length<99&&c()}catch(e){u()}return t}function i(n,t){try{f[n]=t,t!==f[n]&&u()}catch(e){u()}}function o(n,e){var c=999;e||(c=-1),c=new Date(+new Date+86400000*c).toGMTString();var r=n+"="+e+";path=/;secure;expires="+c;t.cookie=r}function a(n){var e=t.getElementById(n).innerHTML;i(n,e)}function l(e,c){var i=r(e),o=t.createElement(c?"script":"style");return n.execScript&&c?n.execScript(i):(o.innerHTML=i,void t.head.appendChild(o))}function u(){o("v",0)}var f,h=function(){},d=n.L={h:h,l:h,c:h};try{f=localStorage,d.h=a,d.l=l,d.c=o}catch(p){e()}}(this,document);</script>{{if .Version}}<script>L.c('v', {{.Version}})</script>{{end}}<link rel="apple-touch-icon" href="//{{.Kodo.Domain}}/static/img/favicon.ico"><link rel="search" type="application/opensearchdescription+xml" href="//{{.Domain}}/opensearch.xml" title="{{.BTitle}}">{{if .Version}}<style id="blog_css">{{template "blog_css"}}</style><script>L.h('blog_css')</script>{{else}}<script>L.l("blog_css")</script>{{end}}<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="//{{.Domain}}/rss.html"><meta name="description" content="{{.Description}}"><style id="style-1-cropbar-clipper">.en-markup-crop-options{top:18px!important;left:50%!important;margin-left:-100px!important;width:200px!important;border:2px rgba(255,255,255,.38) solid!important;border-radius:4px!important}.en-markup-crop-options div div:first-of-type{margin-left:0!important}</style></head><body><div class="container"><div class="left-col"><div class="intrude-less"><header id="header" class="inner"><div class="profilepic"><a href="/"></a></div><h1><a href="/">{{.BlogName}}</a></h1><p class="subtitle">{{.SubTitle}}</p><nav id="main-nav"><ul><li {{if eq .Path "/"}}class="on" {{end}}><a href="/"><span>首页</span></a></li><li {{if eq .Path "/series.html"}}class="on" {{end}}><a href="/series.html"><span>专题</span></a></li><li {{if eq .Path "/archives.html"}}class="on" {{end}}><a href="/archives.html"><span>归档</span></a></li><li {{if eq .Path "/post/blogroll.html"}}class="on" {{end}}><a href="/post/blogroll.html"><span>友链</span></a></li><li {{if eq .Path "/post/about.html"}}class="on" {{end}}><a href="/post/about.html"><span>关于</span></a></li></ul></nav><nav id="sub-nav"><div class="social"><a target="_blank" class="twitter external" rel="nofollow" href="//{{.Twitter}}" title="Twitter">Twitter</a><a target="_blank" class="rss" href="//{{.Domain}}/rss.html" title="RSS 订阅">RSS</a><a class="search" href="/search.html" title="站内搜索">Search</a></div></nav></header></div></div><div class="mid-col"><div class="mid-col-container">{{.LayoutContent}}</div><footer id=footer class=inner>© {{.CopyYear}} - {{.BTitle}} - <a target="_blank" rel="nofollow designer" class="external beian" href="http://www.miitbeian.gov.cn/">{{.BeiAn}}</a><br>Powered by <a target=_blank href="//github.com/eiblog/eiblog">Eiblog</a> & <a target=_blank rel="nofollow designer" class=external href="//imququ.com">JerryQu</a></footer></div></div><input type=hidden id=CURRENT_PAGE value="{{.CurrentPage}}"><input type=hidden id=CDN_DOMAIN value="//{{.Kodo.Domain}}">{{if .Version}}<script id="ana_js">{{template "ana_js"}}</script><script>L.h('ana_js')</script>{{else}}<script>L.l('ana_js', 1)</script>{{end}}{{if .Version}}<script id="jq_js">{{template "jq_js"}}</script><script>L.h('jq_js')</script>{{else}}<script>L.l('jq_js', 1)</script>{{end}}{{if .Version}}<script id="hl_js">{{template "hl_js"}}</script><script>L.h('hl_js')</script>{{else}}<script>L.l('hl_js', 1)</script>{{end}}{{if .Version}}<script id="blog_js">{{template "blog_js"}}</script><script>L.h('blog_js')</script>{{else}}<script>L.l('blog_js', 1)</script>{{end}}</body></html>
|
||||
<!DOCTYPE html><html lang="zh-cn"><head><meta charset="utf-8"><meta content="width=device-width,minimum-scale=1.0" name="viewport"><meta name="format-detection" content="telephone=no"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="referrer" content="always"><title>{{.Title}}</title><script>!function(n,t){function e(){o("nls",1)}function c(){t.documentElement.style.display="none",u(),location.reload()}function r(n){var t="";try{t=f[n]||"",t.length<99&&c()}catch(e){u()}return t}function i(n,t){try{f[n]=t,t!==f[n]&&u()}catch(e){u()}}function o(n,e){var c=999;e||(c=-1),c=new Date(+new Date+864e5*c).toGMTString();var r=n+"="+e+";path=/;secure;expires="+c;t.cookie=r}function a(n){var e=t.getElementById(n).innerHTML;i(n,e)}function l(e,c){var i=r(e),o=t.createElement(c?"script":"style");return n.execScript&&c?n.execScript(i):(o.innerHTML=i,void t.head.appendChild(o))}function u(){o("v",0)}var f,h=function(){},d=n.L={h:h,l:h,c:h};try{f=localStorage,d.h=a,d.l=l,d.c=o}catch(p){e()}}(this,document);</script>{{if .Version}}<script>L.c('v', {{.Version}})</script>{{end}}<link rel="apple-touch-icon" href="//{{.Kodo.Domain}}/static/img/favicon.ico"><link rel="search" type="application/opensearchdescription+xml" href="//{{.Domain}}/opensearch.xml" title="{{.BTitle}}">{{if .Version}}<style id="blog_css">{{template "blog_css"}}</style><script>L.h('blog_css')</script>{{else}}<script>L.l("blog_css")</script>{{end}}<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="//{{.Domain}}/rss.html"><meta name="description" content="{{.Description}}"><meta name="twitter:card" content={{.Twitter.Card}}><meta name="twitter:site" content="@{{.Twitter.Site}}"><meta name="twitter:title" content="{{.Title}}"><meta name="twitter:description" content="{{.Description}}"><meta name="twitter:image" content="//{{.Twitter.Image}}"></head><body><div class="container"><div class="left-col"><div class="intrude-less"><header id="header" class="inner"><div class="profilepic"><a href="/"></a></div><h1><a href="/">{{.BlogName}}</a></h1><p class="subtitle">{{.SubTitle}}</p><nav id="main-nav"><ul><li {{if eq .Path "/"}}class="on" {{end}}><a href="/"><span>首页</span></a></li><li {{if eq .Path "/series.html"}}class="on" {{end}}><a href="/series.html"><span>专题</span></a></li><li {{if eq .Path "/archives.html"}}class="on" {{end}}><a href="/archives.html"><span>归档</span></a></li><li {{if eq .Path "/post/blogroll.html"}}class="on" {{end}}><a href="/post/blogroll.html"><span>友链</span></a></li><li {{if eq .Path "/post/about.html"}}class="on" {{end}}><a href="/post/about.html"><span>关于</span></a></li></ul></nav><nav id="sub-nav"><div class="social"><a target="_blank" class="twitter external" rel="nofollow" href="//{{.Twitter.Address}}" title="Twitter" aria-label="Twitter">Twitter</a><a target="_blank" class="rss" href="//{{.Domain}}/rss.html" title="RSS 订阅" aria-label="RSS 订阅">RSS</a><a class="search" href="/search.html" title="站内搜索" aria-label="站内搜索">Search</a></div></nav></header></div></div><div class="mid-col"><div class="mid-col-container">{{.LayoutContent}}</div><footer id=footer class=inner>© {{.CopyYear}} - {{.BTitle}} - <a target="_blank" rel="nofollow designer" class="external beian" href="http://www.miitbeian.gov.cn/">{{.BeiAn}}</a><br>Powered by <a target=_blank href="//github.com/eiblog/eiblog">Eiblog</a> & <a target=_blank rel="nofollow designer" class=external href="//imququ.com">JerryQu</a></footer></div></div><input type=hidden id=CURRENT_PAGE value="{{.CurrentPage}}"><input type=hidden id=CDN_DOMAIN value="//{{.Kodo.Domain}}">{{if .Version}}<script id="ana_js">{{template "ana_js"}}</script><script>L.h('ana_js')</script>{{else}}<script>L.l('ana_js', 1)</script>{{end}}{{if .Version}}<script id="jq_js">{{template "jq_js"}}</script><script>L.h('jq_js')</script>{{else}}<script>L.l('jq_js', 1)</script>{{end}}{{if .Version}}<script id="hl_js">{{template "hl_js"}}</script><script>L.h('hl_js')</script>{{else}}<script>L.l('hl_js', 1)</script>{{end}}{{if .Version}}<script id="blog_js">{{template "blog_js"}}</script><script>L.h('blog_js')</script>{{else}}<script>L.l('blog_js', 1)</script>{{end}}</body></html>
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user