This commit is contained in:
life
2014-11-12 17:32:03 +08:00
parent d979a0c3e2
commit 1f45666ec4
119 changed files with 2463 additions and 675 deletions

File diff suppressed because one or more lines are too long

View File

@ -133,7 +133,7 @@ function getDateDiff(dateTimeStamp) {
var weekC = diffValue / (7 * diff.day);
var dayC = diffValue / diff.day;
var hourC = diffValue / diff.hour;
var minC = diffValue / diff.minute;
var minC = parseInt(diffValue / diff.minute);
if (monthC >= 1) {
result = parseInt(monthC) + "个月前";
} else if (weekC >= 1) {
@ -142,8 +142,8 @@ function getDateDiff(dateTimeStamp) {
result = parseInt(dayC) + "天前";
} else if (hourC >= 1) {
result = parseInt(hourC) + "小时前";
} else if (minC >= 1) {
result = parseInt(minC) + "分钟前";
} else if (minC > 1) {
result = minC + "分钟前";
} else {
result = "刚刚";
}

View File

@ -0,0 +1 @@
<p>这里面是leanote默认主题</p>

View File

@ -13,16 +13,18 @@
{{$.blogInfo.Title}}
{{else if $.curIsCate}}
分类-{{$.curCateTitle}}
{{else if $.curIsView}}
{{$.post.Title}}
{{else if $.curIsSearch}}
搜索-{{$.keywords}}
{{else if $.curIsTags}}
我的标签
{{else if $.curIsTagPosts}}
标签-{{$.curTag}}
{{else}}
我的博客
{{else if $.curIsPost}}
{{$.post.Title}}
{{else if $.curIsSingle}}
{{$.single.Title}}
{{else if $.curIsArchive}}
归档
{{end}}
</title>

View File

@ -11,9 +11,17 @@
{{range $.archives}}
<li><span class="archive-year">{{.Year}}</span>
<ul>
{{range .Posts}}
{{range .MonthAchives}}
<li>
{{dateFormat .PublicTime "2006-01-02"}} <a href="{{$.postUrl}}/{{.NoteId}}">{{.Title}}</a>
<span class="archive-month">{{.Month}}</span>
<ul>
{{range .Posts}}
<li>
{{dateFormat .PublicTime "2006-01-02"}} <a href="{{$.postUrl}}/{{.UrlTitle}}">{{.Title}}</a>
</li>
{{end}}
</ul>
</li>
{{end}}
</ul>

View File

@ -90,14 +90,14 @@ function log(o) {
<!-- 分类页 -->
{{range $.cates}}
<li class="{{if eq .CateId $.curCateId}}active{{end}}">
<a href="{{$.cateUrl}}/{{.CateId}}"
<a href="{{$.cateUrl}}/{{.UrlTitle}}"
>{{.Title}}</a>
</li>
{{end}}
<!-- 单页 -->
{{range $.singles}}
<li class="{{if eq $.curSingleId .SingleId}}active{{end}}">
<a href="{{$.singleUrl}}/{{.SingleId}}">{{.Title}}</a>
<a href="{{$.singleUrl}}/{{.UrlTitle}}">{{.Title}}</a>
</li>
{{end}}

View File

@ -6,7 +6,7 @@
{{range $.posts}}
<div class="each-post">
<div class="title">
<a href="{{$.postUrl}}/{{.NoteId}}" title="全文">
<a href="{{$.postUrl}}/{{.UrlTitle}}" title="全文">
{{.Title}}
</a>
</div>
@ -25,7 +25,7 @@
<div class="desc">
{{.Abstract | raw}}
</div>
<a class="more" href="{{$.postUrl}}/{{.NoteId}}" title="全文">查看</a>
<a class="more" href="{{$.postUrl}}/{{.UrlTitle}}" title="全文">查看</a>
</div>
{{end}}
<!-- 分页 -->

View File

@ -51,10 +51,10 @@
<div class="pre-next-post">
<p>
上一篇: {{if $.prePost}}<a href="{{$.postUrl}}/{{$.prePost.NoteId}}">{{$.prePost.Title}}</a>{{else}}无{{end}}
上一篇: {{if $.prePost}}<a href="{{$.postUrl}}/{{$.prePost.UrlTitle}}">{{$.prePost.Title}}</a>{{else}}无{{end}}
</p>
<p>
下一篇: {{if $.nextPost}}<a href="{{$.postUrl}}/{{$.nextPost.NoteId}}">{{$.nextPost.Title}}</a>{{else}}无{{end}}
下一篇: {{if $.nextPost}}<a href="{{$.postUrl}}/{{$.nextPost.UrlTitle}}">{{$.nextPost.Title}}</a>{{else}}无{{end}}
</p>
</div>

View File

@ -9,7 +9,7 @@
{{range .posts}}
<div class="each-post">
<div class="title">
<a href="{{$.postUrl}}/{{.NoteId}}" title="全文">
<a href="{{$.postUrl}}/{{.UrlTitle}}" title="全文">
{{.Title}}
</a>
</div>
@ -27,7 +27,7 @@
<div class="desc">
{{.Abstract | raw}}
</div>
<a class="more" href="{{$.postUrl}}/{{.NoteId}}" title="全文">查看</a>
<a class="more" href="{{$.postUrl}}/{{.UrlTitle}}" title="全文">查看</a>
</div>

View File

@ -9,7 +9,7 @@
{{range .posts}}
<div class="each-post">
<div class="title">
<a href="{{$.postUrl}}/{{.NoteId}}" title="全文">
<a href="{{$.postUrl}}/{{.UrlTitle}}" title="全文">
{{.Title}}
</a>
</div>
@ -27,7 +27,7 @@
<div class="desc">
{{.Abstract | raw}}
</div>
<a class="more" href="{{$.postUrl}}/{{.NoteId}}" title="全文">查看</a>
<a class="more" href="{{$.postUrl}}/{{.UrlTitle}}" title="全文">查看</a>
</div>
{{else}}
<div class="each-post">

View File

@ -13,16 +13,18 @@
{{$.blogInfo.Title}}
{{else if $.curIsCate}}
分类-{{$.curCateTitle}}
{{else if $.curIsView}}
{{$.post.Title}}
{{else if $.curIsSearch}}
搜索-{{$.keywords}}
{{else if $.curIsTags}}
我的标签
{{else if $.curIsTagPosts}}
标签-{{$.curTag}}
{{else}}
我的博客
{{else if $.curIsPost}}
{{$.post.Title}}
{{else if $.curIsSingle}}
{{$.single.Title}}
{{else if $.curIsArchive}}
归档
{{end}}
</title>

View File

@ -4291,3 +4291,9 @@ fieldset[disabled] .btn-gplus.active {
padding: 10px;
font-size: 14px;
}
.url-title {
border: none;
outline: none;
border-bottom: 1px solid #eee;
background: #fffbcc;
}

View File

@ -4822,4 +4822,10 @@ body.container {
#avatarUploadMsg .alert {
padding: 10px;
font-size: 14px;
}
}
.url-title {
border: none;
outline: none;
border-bottom: 1px solid #eee;
background: #fffbcc;
}

View File

@ -149,7 +149,11 @@ tinymce.PluginManager.add('leaui_image', function(editor, url) {
}
if(fileId) {
// 得到fileId, 如果这个笔记不是我的, 那么肯定是协作的笔记, 那么需要将图片copy给原note owner
var curNote = Note.getCurNote();
// 博客设置中不用没有Note
var curNote;
if(Note && Note.getCurNote) {
curNote = Note.getCurNote();
}
if(curNote && curNote.UserId != UserInfo.UserId) {
(function(data) {
ajaxPost("/file/copyImage", {userId: UserInfo.UserId, fileId: fileId, toUserId: curNote.UserId}, function(re) {