只读模式
group, 分享
评论更多问题
博客标签总是存在一个
This commit is contained in:
lealife
2015-06-15 18:01:48 +08:00
parent 7e458bb433
commit 6987a38820
1453 changed files with 114561 additions and 91536 deletions

View File

@ -3,3 +3,5 @@
themes 是默认主题, 有3个
用户自定义的主题不在这里, 在public/upload/userId/thmems下
test

View File

@ -379,8 +379,8 @@ function getLikesAndComments(noteId, callback) {
ajaxGetP(getLeanoteUrl() + "/blog/getLikesAndComments", {noteId: noteId}, callback);
}
// 得到评论
function getComments(noteId, page) {
ajaxGetP(getLeanoteUrl() + "/blog/listComments", {noteId: noteId, page: page}, callback);
function getComments(noteId, page, callback) {
ajaxGetP(getLeanoteUrl() + "/blog/getComments", {noteId: noteId, page: page}, callback);
}
// 点赞
function likePost(noteId, callback) {

View File

@ -108,17 +108,34 @@ var commentNum = +"{{$.post.CommentNum}}";
markdown
调用markdown来解析得到html
-->
{{if $.post.IsMarkdown }}
<script src="/public/libs/md2html/md2html.js"></script>
<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="/public/libs/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>
<script>
var content = $.trim($("#markdownContent textarea").val());
md2Html(content, $("#content"), function(html) {
$("pre").addClass("prettyprint linenums");
prettyPrint();
initNav();
weixin();
});
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>

View File

@ -530,8 +530,3 @@ table tr:nth-child(2n) {
border-collapse: collapse;
padding: 6px 13px;
}
.desc *, #content * {
word-wrap: break-word;
}

View File

@ -107,17 +107,35 @@ var commentNum = +"{{$.post.CommentNum}}";
<!--
markdown
调用markdown来解析得到html
-->{{if $.post.IsMarkdown }}
<script src="/public/libs/md2html/md2html.js"></script>
-->
{{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="/public/libs/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>
<script>
var content = $.trim($("#markdownContent textarea").val());
md2Html(content, $("#content"), function(html) {
$("pre").addClass("prettyprint linenums");
prettyPrint();
initNav();
weixin();
});
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>

View File

@ -540,7 +540,4 @@ table tr:nth-child(2n) {
border: 1px solid #ddd;
border-collapse: collapse;
padding: 6px 13px;
}
.desc *, #content * {
word-wrap: break-word;
}

View File

@ -108,17 +108,34 @@ var commentNum = +"{{$.post.CommentNum}}";
markdown
调用markdown来解析得到html
-->
{{if $.post.IsMarkdown }}
<script src="/public/libs/md2html/md2html.js"></script>
<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="/public/libs/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>
<script>
var content = $.trim($("#markdownContent textarea").val());
md2Html(content, $("#content"), function(html) {
$("pre").addClass("prettyprint linenums");
prettyPrint();
initNav();
weixin();
});
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>

View File

@ -580,6 +580,3 @@ table tr:nth-child(2n) {
border-collapse: collapse;
padding: 6px 13px;
}
.desc *, #content * {
word-wrap: break-word;
}