From 575582e391ddab844e873e5a0cd03a7b9a73eccf Mon Sep 17 00:00:00 2001 From: deepzz0 Date: Sun, 2 Oct 2016 22:14:17 +0800 Subject: [PATCH] fis simple --- front.go | 4 +++- router.go | 2 +- views/article.html | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/front.go b/front.go index a532581..ea58ac6 100644 --- a/front.go +++ b/front.go @@ -207,7 +207,9 @@ func HandleSitemap(c *gin.Context) { func HandleBeacon(c *gin.Context) {} // 服务端获取评论详细 -func HandleComments(c *gin.Context) { +func HandleDisqus(c *gin.Context) { + slug := c.Query("slug") + logd.Debug(slug) // TODO comments var ss = map[string]interface{}{ "errno": 0, diff --git a/router.go b/router.go index 65592e1..2dcd7af 100644 --- a/router.go +++ b/router.go @@ -51,7 +51,7 @@ func init() { router.GET("/archives.html", HandleArchivesPage) router.GET("/search.html", HandleSearchPage) router.GET("/beacon.html", HandleBeacon) - router.GET("/data/comment", HandleComments) + router.GET("/disqus/:slug", HandleDisqus) router.GET("/rss.html", HandleFeed) router.GET("/feed", HandleFeed) router.GET("/opensearch.xml", HandleOpenSearch) diff --git a/views/article.html b/views/article.html index 27ed080..e238230 100644 --- a/views/article.html +++ b/views/article.html @@ -1 +1 @@ -{{define "article"}}
{{with .Article}}

{{.Title}}

{{str2html .Content}}

本文链接:参与评论 »

--EOF--

{{with $.Copyright}}{{end}} {{with $.Serie}}{{if gt $.Days 100}}

提醒:本文最后更新于 {{$.Days}} 天前,文中所描述的信息可能已发生改变,请谨慎使用。

{{end}}

专题「{{.Name}}」的其它文章 »

    {{range .Articles}}{{if ne .ID $.Article.ID}}
  • {{.Title}} ({{dateformat .CreateTime "Jan 02, 2006"}})
  • {{end}}{{end}}
{{end}}

Comments

{{end}}
{{end}} +{{define "article"}}
{{with .Article}}

{{.Title}}

{{str2html .Content}}

本文链接:参与评论 »

--EOF--

{{with $.Copyright}}{{end}} {{with $.Serie}}{{if gt $.Days 100}}

提醒:本文最后更新于 {{$.Days}} 天前,文中所描述的信息可能已发生改变,请谨慎使用。

{{end}}

专题「{{.Name}}」的其它文章 »

    {{range .Articles}}{{if ne .ID $.Article.ID}}
  • {{.Title}} ({{dateformat .CreateTime "Jan 02, 2006"}})
  • {{end}}{{end}}
{{end}}

Comments

{{end}}
{{end}}