delete medium theme

This commit is contained in:
life
2015-01-08 23:27:13 +08:00
parent ddf3236c4f
commit 52d0a7ed21
27 changed files with 125 additions and 1553 deletions

View File

@ -1,26 +1,26 @@
package app
import (
"encoding/json"
"fmt"
"github.com/revel/revel"
. "github.com/leanote/leanote/app/lea"
"github.com/leanote/leanote/app/service"
"github.com/leanote/leanote/app/db"
"github.com/leanote/leanote/app/controllers"
"github.com/leanote/leanote/app/controllers/admin"
"github.com/leanote/leanote/app/controllers/member"
"github.com/leanote/leanote/app/db"
. "github.com/leanote/leanote/app/lea"
_ "github.com/leanote/leanote/app/lea/binder"
"github.com/leanote/leanote/app/lea/session"
"github.com/leanote/leanote/app/lea/memcache"
"github.com/leanote/leanote/app/lea/route"
"github.com/leanote/leanote/app/lea/session"
"github.com/leanote/leanote/app/service"
"github.com/revel/revel"
"reflect"
"fmt"
"html/template"
"math"
"net/url"
"reflect"
"strconv"
"strings"
"strconv"
"time"
"encoding/json"
"net/url"
)
func init() {
@ -47,21 +47,20 @@ func init() {
revel.ActionInvoker, // Invoke the action.
}
//自定义模版函数
revel.TemplateFuncs["raw"] = func(str string) template.HTML {
return template.HTML(str)
}
revel.TemplateFuncs["add"] = func(i int) string {
i = i + 1
i = i + 1;
return fmt.Sprintf("%v", i)
}
revel.TemplateFuncs["sub"] = func(i int) int {
i = i - 1
i = i - 1;
return i
}
// 增加或减少
revel.TemplateFuncs["incr"] = func(n, i int) int {
n = n + i
n = n + i;
return n
}
revel.TemplateFuncs["join"] = func(arr []string) template.HTML {
@ -129,11 +128,6 @@ func init() {
if strings.HasPrefix(str, "???") {
str = tag
}
<<<<<<< HEAD
tagStr += str
if i != lenTags-1 {
tagStr += ","
=======
if InArray([]string{"red", "blue", "yellow", "green"}, tag) {
classes += " label-" + tag
} else {
@ -145,7 +139,6 @@ func init() {
tagStr += "<a class=\"" + classes + "\" href=\"" + url + "\">" + str + "</a>";
if i != lenTags - 1 {
tagStr += " "
>>>>>>> dev-life
}
}
return template.HTML(tagStr)
@ -219,7 +212,7 @@ func init() {
for i := 0; i < len(v); i = i + 2 {
item := v[i]
if i+1 == len(v) {
break
break;
}
value := v[i+1]
if item != nil && value != nil {
@ -276,21 +269,21 @@ func init() {
if sorterI != nil {
sorter, _ = sorterI.(string)
}
html := "data-url=\"" + url + "\" data-sorter=\"" + sorterField + "\""
html += " class=\"th-sortable "
html := "data-url=\"" + url + "\" data-sorter=\"" + sorterField + "\"";
html += " class=\"th-sortable ";
if sorter == sorterField + "-up" {
html += "th-sort-up\""
} else if sorter == sorterField+"-down" {
html += "th-sort-down"
html += "th-sort-up\"";
} else if(sorter == sorterField + "-down") {
html += "th-sort-down";
}
html += "\""
html += "\"";
return template.HTMLAttr(html)
}
// pagination
revel.TemplateFuncs["page"] = func(urlBase string, page, pageSize, count int) template.HTML {
if count == 0 {
return ""
return "";
}
totalPage := int(math.Ceil(float64(count)/float64(pageSize)))
@ -380,6 +373,5 @@ func init() {
admin.InitService()
member.InitService()
service.ConfigS.InitGlobalConfigs()
})
});
}

View File

@ -1,19 +0,0 @@
{{template "header.html" .}}
<div id="postsContainer">
<div id="posts">
<div class="each-post">
<div class="title">
404 NOT FOUND
</div>
<div class="desc">
Sorry, We can't find this page.
</div>
</div>
</div>
</div>
{{template "footer.html" $}}
</body>
</html>

View File

@ -1,38 +0,0 @@
{{template "header.html" .}}
<div id="postsContainer">
<div class="container">
<h2>归档 {{if $.curCateTitle}} - {{$.curCateTitle}}{{end}}</h2>
</div>
<div id="posts">
<div class="each-post">
<ul>
{{range $.archives}}
<li><span class="archive-year">{{.Year}}</span>
<ul>
{{range .MonthAchives}}
<li>
<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>
</li>
{{end}}
</ul>
</div>
</div>
</div>
{{template "footer.html" .}}
</body>
</html>

View File

@ -1,42 +0,0 @@
{{template "header.html" .}}
<div id="postsContainer">
<div class="container">
<h2>分类 - {{$.curCateTitle}}</h2>
</div>
<div id="posts">
{{range $.posts}}
<div class="each-post">
<div class="title">
<a href="{{$.postUrl}}/{{.UrlTitle}}" title="全文">
{{.Title}}
</a>
</div>
<div class="created-time">
<i class="fa fa-bookmark-o"></i>
{{if .Tags}}
{{blogTags $ .Tags}}
{{else}}
{{end}}
|
<i class="fa fa-calendar"></i> 更新 {{.UpdatedTime | datetime}}
|
<i class="fa fa-calendar"></i> 创建 {{.CreatedTime | datetime}}
</div>
<div class="desc">
{{.Abstract | raw}}
</div>
<a class="more" href="{{$.postUrl}}/{{.UrlTitle}}" title="全文">查看</a>
</div>
{{end}}
<!-- 分页 -->
{{template "paging.html" $}}
</div>
</div>
{{template "footer.html" $}}
{{template "highlight.html" $}}
</body>
</html>

View File

@ -1,65 +0,0 @@
<div id="footerContainer">
{{$userId := $.blogInfo.UserId}}
<div class="container" id="footer">
<div class="col-md-4">
<h3>导航</h3>
<ul>
<li><a href="{{$.indexUrl}}">主页</a></li>
{{range $.cates}}
<li>
<a href="{{$.cateUrl}}/{{.UrlTitle}}">{{.Title}}</a>
</li>
{{end}}
<!-- 单页 -->
{{range $.singles}}
<li class="{{if eq $.curSingleId .SingleId}}active{{end}}">
<a href="{{$.singleUrl}}/{{.UrlTitle}}">{{.Title}}</a>
</li>
{{end}}
<!-- 归档 -->
<li class="{{if $.curIsArchive}}active{{end}}">
<a href="{{$.archiveUrl}}">归档</a>
</li>
<li class="{{if $.curIsTags}}active{{end}}">
<a href="{{$.tagsUrl}}">标签</a>
</li>
</ul>
</div>
<div class="col-md-4">
<h3>最近发表</h3>
<ul>
{{range .recentPosts}}
<li title="{{.Title}}"><a href="{{$.postUrl}}/{{.UrlTitle}}">{{.Title}}</a></li>
{{end}}
</ul>
</div>
<div class="col-md-4">
<h3>友情链接 </h3>
<ul>
{{if $.themeInfo.FriendLinks}}
{{range $.themeInfo.FriendLinks}}
<li><a href="{{.Url}}" target="_blank">{{.Title}}</a></li>
{{end}}
{{end}}
</ul>
</div>
</div>
</div>
<script src="{{$.jQueryUrl}}"></script>
<script src="{{$.bootstrapJsUrl}}"></script>
<script src="{{$.siteUrl}}/js/bootstrap-hover-dropdown.js"></script>
<script>
// 搜索
function search(e) {
var keywords = $("#searchInput").val();
if(!keywords) {
location.href = "{{$.searchUrl}}";
} else {
var tpl = '<form action="{{$.searchUrl}}" method="get">';
tpl += '<input name="keywords" value="' + keywords + '" />';
tpl += "</form";
$(tpl).submit();
}
}
</script>

View File

@ -1,122 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="leanote,leanote.com">
<meta name="description" content="leanote, not only a notebook">
<meta name="author" content="leanote">
<title>
{{if $.curIsIndex}}
{{$.blogInfo.Title}}
{{else if $.curIsCate}}
分类-{{$.curCateTitle}}
{{else if $.curIsSearch}}
搜索-{{$.keywords}}
{{else if $.curIsTags}}
我的标签
{{else if $.curIsTagPosts}}
标签-{{$.curTag}}
{{else if $.curIsPost}}
{{$.post.Title}}
{{else if $.curIsSingle}}
{{$.single.Title}}
{{else if $.curIsArchive}}
归档
{{end}}
</title>
<!-- Bootstrap core CSS -->
<link href="{{$.bootstrapCssUrl}}" rel="stylesheet">
<!-- 字体必须同一域 -->
<link href="{{$.fontAwesomeUrl}}" rel="stylesheet">
<link href="{{$.themeBaseUrl}}/style.css" rel="stylesheet">
<script>
function log(o) {
}
</script>
<style>
</style>
</head>
<body>
<div id="headerAndNav" >
<div id="headerContainer" class="container">
<!-- 头部可放博客名, 导航 -->
<div id="header">
{{$username := .userInfo.Username}}
<h1>
<a href="{{$.indexUrl}}" id="logo">
{{if $.blogInfo.Logo}}
<img src="{{$.blogInfo.Logo}}" title="{{$.blogInfo.Title}}"/>
{{else}}
{{$.blogInfo.Title | raw}}
{{end}}
</a>
</h1>
<div id="blogDesc">
{{$.blogInfo.SubTitle | raw}}
</div>
</div>
</div>
<!-- Static navbar -->
<div class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{.indexUrl}}">
{{if $.blogInfo.Logo}}
<img src="{{$.blogInfo.Logo}}" title="{{$.blogInfo.Title}}"/>
{{else}}
{{$.blogInfo.Title | raw}}
{{end}}
</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="{{if $.curIsIndex}}active{{end}}"><a href="{{.indexUrl}}">主页</a></li>
<!-- 分类页 -->
{{range $.cates}}
<li class="{{if eq .CateId $.curCateId}}active{{end}}">
<a href="{{$.cateUrl}}/{{.UrlTitle}}"
>{{.Title}}</a>
</li>
{{end}}
<!-- 单页 -->
{{range $.singles}}
<li class="{{if eq $.curSingleId .SingleId}}active{{end}}">
<a href="{{$.singleUrl}}/{{.UrlTitle}}">{{.Title}}</a>
</li>
{{end}}
<!-- 归档 -->
<li class="{{if $.curIsArchive}}active{{end}}">
<a href="{{$.archiveUrl}}">归档</a>
</li>
<li class="{{if $.curIsTags}}active{{end}}">
<a href="{{$.tagsUrl}}">标签</a>
</li>
</ul>
<form class="navbar-form navbar-right" id="search" onsubmit="search(event);return false;">
<div class="input-group">
<span class="input-group-addon" id="searchIcon" onclick="search(event);"><i class="fa fa-search"></i></span>
<input type="text" placeholder="search" id="searchInput" class="form-control" value="{{.keywords}}">
</div>
</form>
</div><!--/.nav-collapse -->
</div>
</div>
</div>

View File

@ -1,6 +0,0 @@
<link href="{{$.prettifyCssUrl}}" type="text/css" rel="stylesheet"/>
<script src="{{$.prettifyJsUrl}}"></script>
<script>
$("pre").addClass("prettyprint linenums");
prettyPrint();
</script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 629 B

View File

@ -1,39 +0,0 @@
{{template "header.html" .}}
<div id="postsContainer">
<div id="posts">
{{range $.posts}}
<div class="each-post">
<div class="title">
<a href="{{$.postUrl}}/{{.UrlTitle}}" title="全文">
{{.Title}}
</a>
</div>
<div class="created-time">
<i class="fa fa-bookmark-o"></i>
{{if .Tags}}
{{blogTags $ .Tags}}
{{else}}
{{end}}
|
<i class="fa fa-calendar"></i> 更新 {{.UpdatedTime | datetime}}
|
<i class="fa fa-calendar"></i> 创建 {{.CreatedTime | datetime}}
</div>
<div class="desc">
{{.Abstract | raw}}
</div>
<a class="more" href="{{$.postUrl}}/{{.UrlTitle}}" title="全文">查看</a>
</div>
{{end}}
<!-- 分页 -->
{{template "paging.html" $}}
</div>
</div>
{{template "footer.html" $}}
{{template "highlight.html" $}}
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

View File

@ -1 +0,0 @@
aaaaaaaaaaaaaaaaaaa

View File

@ -1,27 +0,0 @@
{{if gt $.paging.TotalPage 1}}
<!-- 上一页 -->
{{if gt $.paging.CurPage 1}}
{{set . "prePageClass" ""}}
{{set . "prePageUrl" (urlConcat $.pagingBaseUrl "page" (incr $.paging.CurPage -1)) }}
{{else}}
{{set . "prePageClass" "disabled"}}
{{set . "prePageUrl" "#"}}
{{end}}
<!-- 下一页 -->
{{if lt $.paging.CurPage $.paging.TotalPage }}
{{set . "nextPageClass" ""}}
{{set . "nextPageUrl" (urlConcat $.pagingBaseUrl "page" (incr $.paging.CurPage 1)) }}
{{else}}
{{set . "nextPageClass" "disabled"}}
{{set . "nextPageUrl" "#"}}
{{end}}
{{$.paging.CurPage}}/{{$.paging.TotalPage}}
<ul class="pager">
<li class="{{$.prePageClass}}"><a href="{{$.prePageUrl}}">上一页</a></li>
<li class="{{$.nextPageClass}}"><a href="{{$.nextPageUrl}}">下一页</a></li>
</ul>
{{end}}

View File

@ -1,143 +0,0 @@
{{template "header.html" .}}
<div id="postsContainer">
<div id="posts">
<div class="each-post">
<div class="title">
{{.post.Title}}
</div>
<div class="created-time">
<i class="fa fa-bookmark-o"></i>
{{if .post.Tags}}
{{blogTags $ .post.Tags}}
{{else}}
{{end}}
|
<i class="fa fa-calendar"></i> 更新 {{$.post.UpdatedTime | datetime}}
|
<i class="fa fa-calendar"></i> 创建 {{$.post.CreatedTime | datetime}}
</div>
<!-- 仅为移动端 -->
<div class="mobile-created-time">
{{ if $.blogInfo.UserLogo}}
<img src="{{$.blogInfo.UserLogo}}" id="userLogo">
{{else}}
<img src="{{$.siteUrl}}/images/blog/default_avatar.png" id="userLogo">
{{end}}
{{$.blogInfo.Username}}
{{if .post.Tags}}
&nbsp;
<i class="fa fa-bookmark-o" style="color: #666"></i>
{{blogTags $ $.post.Tags}}
{{end}}
</div>
<div class="desc {{if $.post.IsMarkdown }}markdown-content{{end}}" id="content">
{{if $.post.IsMarkdown }}
<div id="markdownContent" style="display: none">
<!-- 用textarea装html, 防止得到的值失真 -->
<textarea>{{$.post.Content | raw}}</textarea>
</div>
<div style="padding: 20px; text-align: center">
<img src="{{$.themeBaseUrl}}/images/loading-32.gif" />
</div>
{{else}}
{{$.post.Content | raw}}
{{end}}
</div>
<div class="pre-next-post">
<p>
上一篇: {{if $.prePost}}<a href="{{$.postUrl}}/{{$.prePost.UrlTitle}}">{{$.prePost.Title}}</a>{{else}}无{{end}}
</p>
<p>
下一篇: {{if $.nextPost}}<a href="{{$.postUrl}}/{{$.nextPost.UrlTitle}}">{{$.nextPost.Title}}</a>{{else}}无{{end}}
</p>
</div>
<!-- share & comment -->
{{template "share_comment.html" $}}
</div>
</div>
</div>
{{template "footer.html" $}}
{{template "highlight.html" $}}
<div id="blogNav">
<div id="blogNavNav">
<i class="fa fa-align-justify" title="文档导航"></i>
<span>文档导航</span>
</div>
<div id="blogNavContent">
</div>
</div>
<!-- 一些在share_comment.js 需要使用的变量 -->
<script>
var siteUrl = "{{$.siteUrl}}"; // common.js需要
// 以下 share_comment.js需要
var blogInfo={UserId: "{{$.blogInfo.UserId}}", OpenComment: {{$.blogInfo.OpenComment}}, CommentType: "{{$.blogInfo.CommentType}}"};
var noteId = "{{$.post.NoteId}}"; //
var preLikeNum = +"{{$.post.LikeNum}}";
var commentNum = +"{{$.post.CommentNum}}";
</script>
<!-- 共享与评论css -->
<link href="{{$.shareCommentCssUrl}}" rel="stylesheet">
<!-- 一些公用的js -->
<script src="{{$.blogCommonJsUrl}}"></script>
<script src="{{$.siteUrl}}/public/blog/js/jsrender.js"></script>
<script src="{{$.siteUrl}}/public/blog/js/jquery-cookie-min.js"></script>
<script src="{{$.siteUrl}}/public/blog/js/bootstrap-dialog.min.js"></script>
<script src="{{$.siteUrl}}/public/blog/js/jquery.qrcode.min.js"></script>
<!-- share && comment -->
<script src="{{$.shareCommentJsUrl}}"></script>
<!--
markdown
调用markdown来解析得到html
-->
{{if $.post.IsMarkdown }}
<script src="/public/mdeditor/editor/pagedown/Markdown.Converter.js"></script>
<script src="/public/mdeditor/editor/pagedown/Markdown.Sanitizer.js"></script>
<script src="/public/mdeditor/editor/pagedown/Markdown.Editor.js"></script>
<script src="/public/mdeditor/editor/pagedown/local/Markdown.local.zh.js"></script>
<script src="/public/mdeditor/editor/Markdown.Extra.js"></script>
<!--mathjax-->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ["\\(","\\)"]], processEscapes: true }, messageStyle: "none"});
</script>
<script src="/public/mdeditor/editor/mathJax.js"></script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script>
var content = $.trim($("#markdownContent textarea").val());
var converter = Markdown.getSanitizingConverter();
Markdown.Extra.init(converter, {extensions: ["tables", "fenced_code_gfm", "def_list"]});
var html = converter.makeHtml(content);
$("#content").html(html);
$("pre").addClass("prettyprint linenums");
prettyPrint();
MathJax.Hub.Queue(["Typeset",MathJax.Hub,"wmd-preview"]);
initNav();
weixin();
</script>
<!-- 不是markdown -->
{{else}}
<script>
$(function() {
initNav();
weixin();
});
</script>
{{end}}
</body>
</html>

View File

@ -1,49 +0,0 @@
{{template "header.html" .}}
<div id="postsContainer">
<div class="container">
<h2>搜索 - {{.keywords}} </h2>
</div>
<div id="posts">
{{range .posts}}
<div class="each-post">
<div class="title">
<a href="{{$.postUrl}}/{{.UrlTitle}}" title="全文">
{{.Title}}
</a>
</div>
<div class="created-time">
<i class="fa fa-bookmark-o"></i>
{{if .Tags}}
{{blogTags $ .Tags}}
{{else}}
{{end}}
|
<i class="fa fa-calendar"></i> 更新 {{.UpdatedTime | datetime}} |
<i class="fa fa-calendar"></i> 创建 {{.CreatedTime | datetime}}
</div>
<div class="desc">
{{.Abstract | raw}}
</div>
<a class="more" href="{{$.postUrl}}/{{.UrlTitle}}" title="全文">查看</a>
</div>
{{else}}
<div class="each-post">
</div>
{{end}}
<!-- 分页 -->
{{template "paging.html" $}}
</div>
</div>
{{template "footer.html" $}}
{{template "highlight.html" $}}
</body>
</html>

View File

@ -1,172 +0,0 @@
<!---->
<div class="entry-controls clearfix">
<div class="vote-section-wrapper clearfix">
<button class="btn btn-default btn-zan" id="likeBtn"><i class="fa fa-thumbs-o-up"></i> <span id="likeNum">{{$.post.LikeNum}}</span></button>
<span class="control-item read-counts"><i class="fa fa-eye"></i> {{if $.post.ReadNum}}{{$.post.ReadNum}}{{else}}1{{end}} 人读过</span>
</div>
<div class="right-section">
<div id="weixinQRCode"></div>
<button class="btn btn-share btn-default btn-weibo"><i class="fa fa-weibo"></i> 新浪微博</button>
<button class="btn btn-share btn-default btn-weixin"><i class="fa fa-wechat"></i> 微信</button>
<div class="dropdown" style="display: inline-block; cursor: pointer; padding: 5px 10px;">
<!-- open -->
<div class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown">
<i class="fa fa-share-square-o"></i>
更多分享
</div>
<ul class="dropdown-menu" role="menu">
<li><a href="#" class="btn-share tencent-weibo"><i class="fa fa-tencent-weibo"></i> 腾讯微博</a></li>
<li><a href="#" class="btn-share qq"><i class="fa fa-qq"></i> QQ空间</a></li>
<li><a href="#" class="btn-share renren"><i class="fa fa-renren"></i> 人人网</a></li>
</ul>
</div>
</div>
<div class="voters clearfix" id="likers">
</div>
</div>
<script type="text/x-jsrender" id="tLikers">
[[for users]]
<a id="liker_[[:UserId]]" title="[[:BlogTitle]]" href="[[:BlogUrl]]" target="_blank" class="voter">
[[if Logo]]
<img alt="avatar" class="avatar-small" src="[[:Logo]]">
[[else]]
<img alt="avatar" class="avatar-small" src="/images/blog/default_avatar.png">
[[/if]]
</a>
[[/for]]
</script>
{{if and $.blogInfo.OpenComment (not (eq $.blogInfo.CommentType "disqus"))}}
<script type="text/x-jsrender" id="tComments">
[[for comments]]
<li class="comment-item">
<!-- 头像 -->
<a ui-hovercard="" target="_blank" class="avatar-link" title="[[:UserInfo.Username]]" href="[[:UserInfo.BlogUrl]]">
<img class="avatar" src="[[:UserInfo.Logo]]">
</a>
<!-- 评论 -->
<div class="comment-body">
<div class="comment-hd">
<a href="[[:UserInfo.BlogUrl]]" target="_blank" >[[:UserInfo.Username]]</a>
[[if IsAuthorComment]]
<span>(作者)</span>
[[/if]]
<!-- 回复其它人 -->
[[if ToUserInfo]]
<span class="in-reply-to">
回复
<a href="[[:ToUserInfo.BlogUrl]]">[[:ToUserInfo.Username]]</a>
</span>
[[if ToUserIsAuthor]]
<span>(作者)</span>
[[/if]]
[[/if]]
</div>
<div class="comment-content ng-binding" ng-bind-html="comment.content">
[[html:Content]]
</div>
<div class="comment-ft clearfix" data-comment-id="[[:CommentId]]" >
<span title="" ui-time="" class="date">[[:PublishDate]] </span>
<span class="like-num [[if !LikeNum]]hide[[/if]]" title="[[:LikeNum]] 赞"><span class="like-num-i">[[:LikeNum]]</span> </span></span>
[[if ~root.visitUserInfo.UserId]]
[[if IsMyNote && !IsMyComment]]
<a href="javascript:;" class="comment-trash op-link "><i class="fa fa-trash"></i> </a>
[[/if]]
[[if !IsMyComment]]
<a href="javascript:;" class="comment-reply op-link ">
<i class="fa fa-reply"></i>
回复
</a>
<a href="javascript:;" class="comment-like op-link"><i class="fa fa-thumbs-o-up"></i> <span class="like-text">[[if IsILikeIt]][[else]][[/if]]</span></a>
[[else]]
<a href="javascript:;" class="comment-trash op-link "><i class="fa fa-trash"></i> </a>
[[/if]]
[[/if]]
</div>
<!-- 回复该评论 -->
[[if ~root.visitUserInfo.UserId]]
<form class="comment-form comment-box-ft">
<div class="clearfix">
<div class="avatar-wrap">
<img class="avatar" src="[[:~root.visitUserInfo.Logo]]">
</div>
<div class="editor-wrap">
<textarea class="editable" id="commentContent" name="commentContent" placeholder="回复"></textarea>
</div>
</div>
<div class="command clearfix" style="display: block;">
<button class="reply-comment-btn save btn btn-primary" data-comment-id="[[:CommentId]]">提交评论</button>
<a class="cancel reply-cancel btn-link">取消</a>
</div>
</form>
[[/if]]
</div>
</li>
[[/for]]
</script>
<!-- 评论 -->
<div class="comment-box hide">
<form class="comment-form comment-box-ft hide" id="commentForm">
<div class="clearfix">
<div class="avatar-wrap">
<img class="avatar" id="visitUserLogo">
</div>
<div class="editor-wrap">
<textarea class="editable" id="commentContent" name="commentContent" placeholder="评论" style="height: 100px;"></textarea>
</div>
</div>
<div class="command clearfix" style="display: block;">
<button id="commentBtn" class="reply-comment-btn save btn btn-primary">提交评论</button>
</div>
</form>
<div class="needLogin hide" id="noLoginContainer">
<a onclick="goLogin()">立即登录</a>, 发表评论.
<br />
没有帐号? <a onclick="goRegister()">立即注册</a>
</div>
<div class="box-header">
<span class="counter">
<i class="icon icon-comment"></i><span id="commentNum">{{$.post.CommentNum}}</span> 条评论
</span>
</div>
<!-- 评论列表 -->
<ul id="comments">
</ul>
</div>
<!-- 更多评论 -->
<div id="moreComments">
<div class="hide comments-more">
<a>More...</a>
</div>
<div class="comments-loading">
<img src="/images/loading-32.gif" />
</div>
</div>
{{end}}
{{if and $.blogInfo.OpenComment (eq $.blogInfo.CommentType "disqus")}}
<div id="disqus_thread"></div>
<!-- comment -->
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '{{.blogInfo.DisqusId}}'; // required: replace example with your forum shortname
var disqus_identifier = '{{.blogInfo.UserId}}/{{$.post.NoteId}}/{{$.post.Title}}'; // 博客链接
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
{{end}}

View File

@ -1,53 +0,0 @@
{{template "header.html" .}}
<div id="postsContainer">
<div id="posts">
<div class="each-post">
<div class="title">
{{.single.Title}}
</div>
<div class="created-time">
<i class="fa fa-calendar"></i> 更新 {{$.single.UpdatedTime | datetime}}
|
<i class="fa fa-calendar"></i> 创建 {{$.single.CreatedTime | datetime}}
</div>
<!-- 仅为移动端 -->
<div class="mobile-created-time">
{{ if $.blogInfo.UserLogo}}
<img src="{{$.blogInfo.UserLogo}}" id="userLogo">
{{else}}
<img src="{{$.siteUrl}}/images/blog/default_avatar.png" id="userLogo">
{{end}}
{{$.blogInfo.Username}}
</div>
<div class="desc" id="content">
{{$.single.Content | raw}}
</div>
</div>
</div>
</div>
{{template "footer.html" $}}
{{template "highlight.html" $}}
<div id="blogNav">
<div id="blogNavNav">
<i class="fa fa-align-justify" title="文档导航"></i>
<span>文档导航</span>
</div>
<div id="blogNavContent">
</div>
</div>
<!-- 一些公用的js -->
<script src="{{$.leanoteUrl}}/public/blog/js/common.js"></script>
<script>
$(function() {
initNav();
});
</script>
</body>
</html>

View File

@ -1,530 +0,0 @@
#posts img {
max-width: 100%;
}
#content * {
font-size: 16px;
}
#content h1 {
font-size: 30px;
}
#content h2 {
font-size: 24px;
}
#content h3 {
font-size: 18px;
}
#content h4 {
font-size: 14px;
}
@-webkit-keyframes dropdown {
0% {
margin-top: -25px;
opacity: 0;
}
90% {
margin-top: 2px;
}
100% {
margin-top: 0;
opacity: 1;
}
}
@-moz-keyframes dropdown {
0% {
margin-top: -25px;
opacity: 0;
}
90% {
margin-top: 2px;
}
100% {
margin-top: 0;
opacity: 1;
}
}
@-ms-keyframes dropdown {
0% {
margin-top: -25px;
opacity: 0;
}
90% {
margin-top: 2px;
}
100% {
margin-top: 0;
opacity: 1;
}
}
@keyframes dropdown {
0% {
margin-top: -25px;
opacity: 0;
}
90% {
margin-top: 2px;
}
100% {
margin-top: 0;
opacity: 1;
}
}
@-webkit-keyframes pulldown {
0% {
top: 0;
opacity: 0;
}
90% {
top: 90%;
}
100% {
top: 100%;
opacity: 1;
}
}
@-moz-keyframes pulldown {
0% {
top: 0;
opacity: 0;
}
90% {
top: 90%;
}
100% {
top: 100%;
opacity: 1;
}
}
@-ms-keyframes pulldown {
0% {
top: 0;
opacity: 0;
}
90% {
top: 90%;
}
100% {
top: 100%;
opacity: 1;
}
}
@keyframes pulldown {
0% {
top: 0;
opacity: 0;
}
90% {
top: 90%;
}
100% {
top: 100%;
opacity: 1;
}
}
a,
.btn {
-webkit-transition: all 0.2s ease;
-moz-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.btn:focus {
outline: none;
}
ul.dropdown-menu {
box-shadow: rgba(0, 0, 0, 0.172549) 0px 6px 12px 0px;
}
ul.dropdown-menu:before {
content: "";
width: 20px;
height: 12px;
position: absolute;
top: -12px;
right: 20px;
background-image: url("images/triangle_2x.png");
background-size: 20px 12px;
}
ul.dropdown-menu {
display: block;
visibility: hidden;
opacity: 0;
}
.open ul.dropdown-menu {
-webkit-animation: pulldown .2s;
animation: pulldown .2s;
visibility: visible;
opacity: 1;
}
.created-time .fa {
color: #666;
}
#blogNav {
display: none;
background-color: #fff;
opacity: 0.7;
position: fixed;
z-index: 10;
padding: 3px;
border-radius: 3px;
}
#blogNavContent {
overflow-y: auto;
max-height: 250px;
display: none;
-webkit-overflow-scrolling: touch !important;
}
#blogNavNav {
cursor: pointer;
}
#blogNav a {
color: #666;
}
#blogNav:hover {
opacity: 0.9;
}
#blogNav a:hover {
color: #0fb264;
}
#blogNav ul {
padding-left: 20px;
}
#blogNav ul .nav-h2 {
margin-left: 20px;
}
#blogNav ul .nav-h3 {
margin-left: 30px;
}
#blogNav ul .nav-h4 {
margin-left: 40px;
}
#blogNav ul .nav-h5 {
margin-left: 50px;
}
.mobile-created-time {
display: none;
}
#footer {
padding-bottom: 10px;
}
.navbar-brand {
display: none;
}
#themeList label {
text-align: center;
margin-bottom: 5px;
}
#themeList .preview {
display: block;
width: 400px;
background: #fff;
border: 1px solid #ccc;
padding: 5px;
border-radius: 5px;
}
/*"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue", Helvetica, "Microsoft Yahei", Verdana, Simsun, "Segoe UI", "Segoe UI Web Regular", "Segoe UI Symbol", "BBAlpha Sans", "S60 Sans", Arial, sans-serif;*/
::selection {
background: #000000;
color: #ffffff;
}
::-moz-selection {
background: #000000;
color: #ffffff;
}
::-webkit-selection {
background: #000000;
color: #ffffff;
}
*,
body {
font-family: 'Open Sans', 'Helvetica Neue', Arial, 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
font-weight: 300;
font-size: 14px;
}
h1,
h2,
h3 {
font-family: 'Open Sans', 'Helvetica Neue', Arial, 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
font-weight: 300 !important;
}
a {
cursor: pointer;
}
a:hover {
text-decoration: none !important;
}
#headerContainer {
height: 100px;
background-color: #fff;
}
#posts {
width: 845px;
margin: auto;
}
#postsContainer {
background: #f5f5f5 url("images/noise.png");
padding-bottom: 5px;
}
/* header */
#header {
color: #000000;
position: relative;
padding: 0 0 20px 0;
margin-top: 15px;
}
#header h1 {
margin: 0;
font-size: 32px;
}
#header h1 a {
color: #000000;
font-size: 32px;
}
#header h1 a img {
height: 40px;
}
#header #blogDesc {
margin-top: 10px;
}
.navbar {
margin-bottom: 0;
border-radius: 0;
border: none;
}
.navbar-collapse {
padding-left: 0;
padding-right: 0;
}
.navbar-form {
padding: 0;
}
/* posts */
#posts {
padding-top: 10px;
}
#posts .each-post {
border-bottom: 1px solid #ebeff2;
margin-bottom: 10px;
padding: 30px;
background-color: #fff;
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
border-radius: 3px;
}
#posts .each-post .title {
font-size: 32px;
color: #0fb264;
padding: 0 0 15px 0;
}
#posts .each-post .title a {
font-size: 32px;
color: #0fb264;
padding: 0 0 15px 0;
}
#posts .each-post .created-time {
border-bottom: 1px solid #eee;
padding-bottom: 3px;
margin-bottom: 5px;
}
#posts .each-post .more {
background: #0fb264;
padding: 9px 10px;
border-radius: 2px;
line-height: 1;
font-size: 13px;
display: inline-block;
text-transform: uppercase;
margin-top: 15px;
margin-bottom: 15px;
color: #fff;
}
#disqus_thread {
border-top: 1px solid #eee;
padding: 5px 0 0 0;
}
#search {
width: 200px;
}
#footerContainer {
background-color: #ffffff;
color: #666666;
}
#footerContainer #footer a {
color: #666666;
}
#footerContainer #footer ul {
list-style: none;
margin: 0;
padding-left: 20px;
}
@media screen and (max-width: 600px) {
html,
body {
overflow-x: hidden;
background-color: #fbfcf7;
}
* {
font-size: 16px;
}
#headerContainer,
#footerContainer {
background-color: #fbfcf7;
margin: 10px 0;
}
#posts .each-post,
#postsContainer {
background-color: #fbfcf7 !important;
}
img {
max-width: 100%;
}
#posts .each-post {
padding: 10px;
}
#posts .each-post .title {
font-size: 24px;
border-left: 5px solid #65bd77;
font-weight: bold;
padding: 5px 0;
padding-left: 10px;
margin-bottom: 10px;
}
.container {
padding-right: 10px;
padding-left: 10px;
}
.created-time {
display: none;
}
.mobile-created-time {
display: block;
}
.mobile-created-time #userLogo {
display: inline-block;
max-height: 40px;
width: 40px;
border-radius: 50%;
}
#content {
margin-top: 10px;
}
.right-section .dropdown,
.right-section .btn {
display: none !important;
}
#blogNav {
left: initial !important;
right: 10px !important;
}
#postsContainer .container,
#footerContainer .container {
max-width: 100%;
}
#postsContainer {
margin: 0 !important;
max-width: 100%;
padding-top: 10px;
background: #f5f5f5 url("../../images/noise.png");
}
#posts {
max-width: 100% !important;
}
#footerContainer #footer a {
padding: 3px;
}
#footerContainer #footer a:hover,
#footerContainer #footer a:focus {
color: #65bd77;
}
#headerAndNav {
position: initial;
text-align: left;
width: 100%;
border-bottom: 2px dashed #ebeff2;
}
#headerAndNav #headerContainer {
width: 100%;
height: auto;
padding-top: 30px;
}
#headerAndNav #header {
margin: 0;
padding: 0;
}
#headerAndNav #header h1 {
display: none;
}
#headerAndNav .navbar-collapse {
overflow-x: hidden;
}
#headerAndNav #blogDesc {
border: none;
margin-top: 20px;
font-size: 24px;
}
#headerAndNav .navbar-brand {
display: inline-block;
line-height: 50px;
padding: 0;
padding-left: 10px;
}
#headerAndNav .navbar-brand img {
height: 40px;
}
#headerAndNav .navbar .container {
width: auto;
padding: 0 15px;
}
#headerAndNav .navbar {
position: fixed;
top: 0;
right: 0;
left: 0;
background: #fbfcf7;
z-index: 1000;
border-bottom: 1px solid #DEDDDF;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), inset 0 1px 0 #ffffff;
background-color: #FDFFF5;
}
#headerAndNav .navbar-nav {
margin: 0 10px;
}
#headerAndNav .navbar-nav a {
padding-left: 10px;
border-radius: 5px;
}
#headerAndNav #search {
width: 100%;
margin: 10px;
}
#headerAndNav .navbar-form {
border: none;
}
#myTab,
.tab-content {
padding: 0 10px;
}
}
table {
margin-bottom: 16px;
}
table th, table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
table th {
font-weight: bold;
}
table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.mce-item-table, .mce-item-table td, .mce-item-table th, .mce-item-table caption {
border: 1px solid #ddd;
border-collapse: collapse;
padding: 6px 13px;
}

View File

@ -1,47 +0,0 @@
{{template "header.html" .}}
<div id="postsContainer">
<div class="container">
<h2>标签 - {{.curTag}} </h2>
</div>
<div id="posts">
{{range .posts}}
<div class="each-post">
<div class="title">
<a href="{{$.postUrl}}/{{.UrlTitle}}" title="全文">
{{.Title}}
</a>
</div>
<div class="created-time">
<i class="fa fa-bookmark-o"></i>
{{if .Tags}}
{{blogTags $ .Tags}}
{{else}}
{{end}}
|
<i class="fa fa-calendar"></i> 更新 {{.UpdatedTime | datetime}} |
<i class="fa fa-calendar"></i> 创建 {{.CreatedTime | datetime}}
</div>
<div class="desc">
{{.Abstract | raw}}
</div>
<a class="more" href="{{$.postUrl}}/{{.UrlTitle}}" title="全文">查看</a>
</div>
{{else}}
<div class="each-post">
</div>
{{end}}
<!-- 分页 -->
{{template "paging.html" $}}
</div>
</div>
{{template "footer.html" $}}
{{template "highlight.html" $}}
</body>
</html>

View File

@ -1,26 +0,0 @@
{{template "header.html" .}}
<div id="postsContainer">
<div class="container">
<h2>标签</h2>
</div>
<div id="posts">
<div class="each-post">
<ul>
{{range $.tags}}
<li>
<a href="{{$.tagPostsUrl}}/{{.Tag}}">
{{.Tag}} {{.Count}}
</a>
</li>
{{end}}
</ul>
</div>
</div>
</div>
{{template "footer.html" .}}
</body>
</html>

View File

@ -1,31 +0,0 @@
/*
, JSON
Name, Version, Author, AuthorUrl()
, FriendLinks, 使 $.themeInfo.FriendLinks
:
1) JSON, , ','
2) , !
* Name
* Version
* Author
* AuthorUrl
* FriendLinks
*/
{
"Name": "leanote default theme",
"Version": "1.0",
"Author": "leanote.com",
"AuthorUrl": "http://leanote.com",
"FriendLinks": [
{"Title": "我的笔记", "Url": "http://leanote.com/note"},
{"Title": "leanote home", "Url": "http://leanote.com"},
{"Title": "leanote 社区", "Url": "http://bbs.leanote.com"},
{"Title": "lea++", "Url": "http://lea.leanote.com"},
{"Title": "leanote github", "Url": "https://github.com/leanote/leanote"}
]
}

View File

@ -829,9 +829,6 @@ Notebook.deleteNotebook = function(target) {
// 改变nav
Notebook.changeNav();
//显示默认笔记本keep #5
$("#notebookList #548125adf4e872105c000007_span").trigger("click");
} else {
alert(ret.Msg);
}

File diff suppressed because one or more lines are too long

View File

@ -809,10 +809,7 @@ function setCookie(c_name, value, expiredays){
document.cookie = c_name+ "=" + escape(value) + ((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}
function logout() {
<<<<<<< HEAD
=======
setCookie("LEANOTE_SESSION", '', -1);
>>>>>>> dev-life
location.href = UrlPrefix + "/logout?id=1";
}