fix conflicts
This commit is contained in:
@ -57,9 +57,9 @@ func (c Blog) render(templateName string, themePath string) revel.Result {
|
||||
isPreview = true
|
||||
themePath = themePath2.(string)
|
||||
c.setPreviewUrl()
|
||||
|
||||
|
||||
// 因为common的themeInfo是从UserBlog.ThemeId来取的, 所以这里要fugai下
|
||||
c.RenderArgs["themeInfo"] = c.RenderArgs["themeInfoPreview"]
|
||||
c.RenderArgs["themeInfo"] = c.RenderArgs["themeInfoPreview"];
|
||||
}
|
||||
return blog.RenderTemplate(templateName, c.RenderArgs, revel.BasePath+"/"+themePath, isPreview)
|
||||
}
|
||||
@ -119,9 +119,9 @@ func (c Blog) setPreviewUrl() {
|
||||
indexUrl = blogUrl + "/" + userIdOrEmail
|
||||
cateUrl = blogUrl + "/cate/" + userIdOrEmail // /notebookId
|
||||
|
||||
postUrl = blogUrl + "/post/" + userIdOrEmail // /xxxxx
|
||||
postUrl = blogUrl + "/post/" + userIdOrEmail // /xxxxx
|
||||
searchUrl = blogUrl + "/search/" + userIdOrEmail // blog.leanote.com/search/userId
|
||||
singleUrl = blogUrl + "/single/" + userIdOrEmail // blog.leanote.com/single/singleId
|
||||
singleUrl = blogUrl + "/single/" + userIdOrEmail // blog.leanote.com/single/singleId
|
||||
archiveUrl = blogUrl + "/archives/" + userIdOrEmail // blog.leanote.com/archive/userId
|
||||
tagsUrl = blogUrl + "/tags/" + userIdOrEmail // blog.leanote.com/archive/userId
|
||||
|
||||
@ -143,6 +143,10 @@ func (c Blog) setPreviewUrl() {
|
||||
// 各种地址设置
|
||||
func (c Blog) setUrl(userBlog info.UserBlog, userInfo info.User) {
|
||||
// 主页 http://leanote.com/blog/life or http://blog.leanote.com/life or http:// xxxx.leanote.com or aa.com
|
||||
host := c.Request.Request.Host
|
||||
var staticUrl = configService.GetUserUrl(strings.Split(host, ":")[0])
|
||||
// staticUrl == host, 为保证同源!!! 只有host, http://leanote.com, http://blog/leanote.com
|
||||
// life.leanote.com, lealife.com
|
||||
siteUrl := configService.GetSiteUrl()
|
||||
blogUrls := blogService.GetBlogUrls(&userBlog, &userInfo)
|
||||
// 分类
|
||||
@ -169,12 +173,12 @@ func (c Blog) setUrl(userBlog info.UserBlog, userInfo info.User) {
|
||||
c.RenderArgs["prettifyJsUrl"] = siteUrl + "/js/google-code-prettify/prettify.js"
|
||||
c.RenderArgs["prettifyCssUrl"] = siteUrl + "/js/google-code-prettify/prettify.css"
|
||||
|
||||
c.RenderArgs["blogCommonJsUrl"] = siteUrl + "/blog/js/common.js"
|
||||
c.RenderArgs["blogCommonJsUrl"] = siteUrl + "/public/blog/js/common.js"
|
||||
|
||||
c.RenderArgs["shareCommentCssUrl"] = siteUrl + "/blog/css/share_comment.css"
|
||||
c.RenderArgs["shareCommentJsUrl"] = siteUrl + "/blog/js/share_comment.js"
|
||||
c.RenderArgs["shareCommentCssUrl"] = siteUrl + "/public/blog/css/share_comment.css"
|
||||
c.RenderArgs["shareCommentJsUrl"] = siteUrl + "/public/blog/js/share_comment.js"
|
||||
|
||||
c.RenderArgs["fontAwesomeUrl"] = siteUrl + "/css/font-awesome-4.2.0/css/font-awesome.css"
|
||||
c.RenderArgs["fontAwesomeUrl"] = staticUrl + "/css/font-awesome-4.2.0/css/font-awesome.css"
|
||||
|
||||
c.RenderArgs["bootstrapCssUrl"] = siteUrl + "/css/bootstrap.css"
|
||||
c.RenderArgs["bootstrapJsUrl"] = siteUrl + "/js/bootstrap-min.js"
|
||||
@ -506,7 +510,6 @@ func (c Blog) Archives(userIdOrEmail string, cateId string, year, month int) (re
|
||||
// 进入某个用户的博客
|
||||
var blogPageSize = 5
|
||||
var searchBlogPageSize = 30
|
||||
|
||||
// 分类 /cate/xxxxxxxx?notebookId=1212
|
||||
func (c Blog) Cate(userIdOrEmail string, notebookId string) (re revel.Result) {
|
||||
// 自定义域名
|
||||
|
@ -376,4 +376,4 @@ func init() {
|
||||
service.ConfigS.InitGlobalConfigs()
|
||||
api.InitService()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ function log(o) {
|
||||
-->
|
||||
<li><a href="/index#download" target="#download" class="smooth-scroll">{{msg . "download"}}</a> </li>
|
||||
<li><a href="/index#donate" target="#donate" class="smooth-scroll">{{msg . "donate"}}</a> </li>
|
||||
<li><a id="leanoteBlog" href="{{.leaUrl}}/index" target="_blank" title="lea++, leanote博客平台" class="">lea++</a></li>
|
||||
<li style="position: relative; margin-right: 3px;">
|
||||
<a href="http://bbs.leanote.com" target="_blank" class="">{{msg . "discussion"}}</a>
|
||||
<div class="red-circle" style=""></div>
|
||||
@ -107,4 +108,4 @@ function log(o) {
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
-->
|
||||
|
@ -8,7 +8,6 @@ site.url=http://localhost:9000 # or http://x.com:8080, http://www.xx.com:9000
|
||||
|
||||
# mongdb
|
||||
db.host=localhost
|
||||
#db.host=leanote
|
||||
db.port=27017
|
||||
db.dbname=leanote # required
|
||||
db.username= # if not exists, please leave it blank
|
||||
@ -17,13 +16,14 @@ db.password= # if not exists, please leave it blank
|
||||
# mongodb://myuser:mypass@localhost:40001,otherhost:40001/mydb
|
||||
# db.url=mongodb://root:root123@localhost:27017/leanote
|
||||
|
||||
# You Must Change It !! About Security!!
|
||||
app.secret=V85ZzBeTnzpsHyjQX4zukbQ8qqtju9y2aDM55VWxAH9Qop19poekx3xkcDVvrD0y
|
||||
|
||||
#--------------------------------
|
||||
# revel config
|
||||
# for dev
|
||||
#--------------------------------
|
||||
app.name=leanote
|
||||
app.secret=V85ZzBeTnzpsHyjQX4zukbQ8qqtju9y2aDM55VWxAH9Qop19poekx3xkcDVvrD0y
|
||||
http.addr=
|
||||
http.ssl=false
|
||||
cookie.httponly=false
|
||||
|
@ -5,7 +5,7 @@
|
||||
module:testrunner
|
||||
|
||||
# Home is My Blog
|
||||
Get / Index.Index
|
||||
Get / Index.Default
|
||||
GET /note Note.Index
|
||||
# leanote home
|
||||
GET /index Index.Index
|
||||
|
Reference in New Issue
Block a user