blog i18n
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
<div id="posts">
|
||||
<div class="each-post">
|
||||
<div class="title">
|
||||
关于我
|
||||
{{msg . "aboutMe"}}
|
||||
</div>
|
||||
<div class="created-time">
|
||||
</div>
|
||||
|
@ -2,19 +2,19 @@
|
||||
{{$userId := .userBlog.UserId.Hex}}
|
||||
<div class="container" id="footer">
|
||||
<div class="col-md-4">
|
||||
<h3>导航</h3>
|
||||
<h3>{{msg . "blogNavs"}}</h3>
|
||||
<ul>
|
||||
<li><a href="/blog/{{$userId}}">首页</a></li>
|
||||
<li><a href="/blog/{{$userId}}">{{msg . "home"}}</a></li>
|
||||
{{range .notebooks}}
|
||||
<li>
|
||||
<a href="/blog/{{$userId}}/{{.NotebookId.Hex}}">{{.Title}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
<li><a href="/blog/aboutMe/{{$userId}}">关于我</a></li>
|
||||
<li><a href="/blog/aboutMe/{{$userId}}">{{msg . "aboutMe"}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h3>最近发表</h3>
|
||||
<h3>{{msg . "latestPosts"}}</h3>
|
||||
<ul>
|
||||
{{range .recentBlogs}}
|
||||
<li title="{{.Title}}"><a href="/blog/view/{{.NoteId.Hex}}/">{{.Title}}</a></li>
|
||||
@ -22,10 +22,10 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h3>快速链接</h3>
|
||||
<h3>{{msg . "quickLinks"}}</h3>
|
||||
<ul>
|
||||
<li><a href="/note">我的笔记</a></li>
|
||||
<li><a href="/login">登录</a></li>
|
||||
<li><a href="/note">{{msg . "myNote"}}</a></li>
|
||||
<li><a href="/login">{{msg . "login"}}</a></li>
|
||||
<li><a href="http://leanote.com" target="_blank">leanote</a></li>
|
||||
<li><a href="https://github.com/leanote/leanote" target="_blank">leanote github</a></li>
|
||||
</ul>
|
||||
|
@ -58,7 +58,7 @@ function log(o) {
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
{{$navNotebookId := .notebookId}}
|
||||
<li class="{{if .index}}active{{end}}"><a href="/blog/{{$username}}">首页</a></li>
|
||||
<li class="{{if .index}}active{{end}}"><a href="/blog/{{$username}}">{{msg . "home"}}</a></li>
|
||||
{{range .notebooks}}
|
||||
{{$notebookId := .NotebookId.Hex}}
|
||||
<li class="{{if eq $navNotebookId $notebookId}}active{{else}}{{end}}">
|
||||
@ -66,9 +66,9 @@ function log(o) {
|
||||
>{{.Title}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
<li class="{{if .aboutMe}}active{{end}}"><a href="/blog/aboutMe/{{$username}}">关于我</a></li>
|
||||
<li class="{{if .aboutMe}}active{{end}}"><a href="/blog/aboutMe/{{$username}}">{{msg . "aboutMe"}}</a></li>
|
||||
{{if .isMe}}
|
||||
<li class="{{if .set}}active{{end}}"><a href="/blog/set" >博客设置</a></li>
|
||||
<li class="{{if .set}}active{{end}}"><a href="/blog/set">{{msg . "blogSet"}}</a></li>
|
||||
<li><a href="/note" >{{msg . "myNote"}}</a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
|
@ -1,3 +1,5 @@
|
||||
<!-- This file is Depreciated -->
|
||||
|
||||
<link href="/public/mdeditor/editor/google-code-prettify/prettify.css" type="text/css" rel="stylesheet">
|
||||
<script src="/public/mdeditor/editor/google-code-prettify/prettify.js"></script>
|
||||
|
||||
|
@ -3,14 +3,15 @@
|
||||
<div id="postsContainer">
|
||||
<div class="container">
|
||||
{{if .notebookId}}
|
||||
<h2>分类 {{.notebook.Title}}</h2>
|
||||
<h2>{{msg . "blogClass"}}: {{.notebook.Title}}</h2>
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="posts">
|
||||
{{$G := .}}
|
||||
{{range .blogs}}
|
||||
<div class="each-post">
|
||||
<div class="title">
|
||||
<a href="/blog/view/{{.NoteId.Hex}}" title="全文">
|
||||
<a href="/blog/view/{{.NoteId.Hex}}" title="{{msg $G "fullBlog"}}">
|
||||
{{.Title}}
|
||||
</a>
|
||||
</div>
|
||||
@ -19,16 +20,16 @@
|
||||
{{if .Tags}}
|
||||
{{blogTags .Tags}}
|
||||
{{else}}
|
||||
无
|
||||
{{msg $G "noTag"}}
|
||||
{{end}}
|
||||
|
|
||||
<i class="fa fa-calendar" style="color: #666"></i> 更新 {{.UpdatedTime | datetime}} |
|
||||
<i class="fa fa-calendar" style="color: #666"></i> 创建 {{.CreatedTime | datetime}}
|
||||
<i class="fa fa-calendar" style="color: #666"></i> {{msg $G "updatedTime"}} {{.UpdatedTime | datetime}} |
|
||||
<i class="fa fa-calendar" style="color: #666"></i> {{msg $G "createdTime"}} {{.CreatedTime | datetime}}
|
||||
</div>
|
||||
<div class="desc">
|
||||
{{.Content | raw}}
|
||||
</div>
|
||||
<a class="more" href="/blog/view/{{.NoteId.Hex}}" title="更多">More...</a>
|
||||
<a class="more" href="/blog/view/{{.NoteId.Hex}}" title="{{msg $G "fullBlog"}}">More...</a>
|
||||
</div>
|
||||
{{end}}
|
||||
<!-- 分页 -->
|
||||
|
@ -1,8 +1,7 @@
|
||||
{{template "Blog/header.html" .}}
|
||||
|
||||
<!-- -->
|
||||
<link rel="stylesheet" href="/tinymce/skins/custom/skin.min.css"
|
||||
type="text/css">
|
||||
<link rel="stylesheet" href="/tinymce/skins/custom/skin.min.css" type="text/css">
|
||||
<style>
|
||||
.tab-pane {
|
||||
padding-top: 10px;
|
||||
@ -11,9 +10,9 @@
|
||||
<div id="postsContainer">
|
||||
<div id="posts">
|
||||
<ul id="myTab" class="nav nav-tabs">
|
||||
<li class="active"><a href="#baseInfo" data-toggle="tab">基本设置</a></li>
|
||||
<li class=""><a href="#commentInfo" data-toggle="tab">评论设置</a></li>
|
||||
<li class=""><a href="#styleInfo" data-toggle="tab">主题设置</a></li>
|
||||
<li class="active"><a href="#baseInfo" data-toggle="tab">{{msg . "baseInfoSet"}}</a></li>
|
||||
<li class=""><a href="#commentInfo" data-toggle="tab">{{msg . "commentSet"}}</a></li>
|
||||
<li class=""><a href="#styleInfo" data-toggle="tab">{{msg . "themeSet"}}</a></li>
|
||||
</ul>
|
||||
|
||||
<!-- Tab panes -->
|
||||
@ -21,7 +20,7 @@
|
||||
<div class="tab-pane" id="styleInfo">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label for="Style" class="col-sm-2 control-label">主题</label>
|
||||
<label for="Style" class="col-sm-2 control-label">{{msg . "theme"}}</label>
|
||||
<div class="col-sm-10">
|
||||
<label><input type="radio" name="Style"
|
||||
value="blog_default"
|
||||
@ -32,19 +31,19 @@
|
||||
checked="checked"
|
||||
{{end}}
|
||||
{{end}}>
|
||||
默认 </label>
|
||||
{{msg . "default"}} </label>
|
||||
<label><input type="radio" name="Style"
|
||||
value="blog_daqi"
|
||||
{{if eq .userBlog.Style "blog_daqi"}}checked="checked"{{end}}>
|
||||
大气</label>
|
||||
{{msg . "elegant"}}</label>
|
||||
<label><input type="radio" name="Style"
|
||||
value="blog_left_fixed"
|
||||
{{if eq .userBlog.Style "blog_left_fixed"}}checked="checked"{{end}}>
|
||||
左侧导航固定</label>
|
||||
{{msg . "navFixed"}}</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button class="btn btn-success">保存</button>
|
||||
<button class="btn btn-success">{{msg . "save"}}</button>
|
||||
<span class="msg"></span>
|
||||
</div>
|
||||
</div>
|
||||
@ -54,26 +53,25 @@
|
||||
<div class="tab-pane" id="commentInfo">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label for="subTitle" class="col-sm-2 control-label">开启评论</label>
|
||||
<label for="subTitle" class="col-sm-2 control-label">{{msg . "openComment"}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="checkbox" id="CanComment" name="CanComment"
|
||||
{{if .userBlog.CanComment}}checked="checked"{{end}} >
|
||||
<br />
|
||||
leanote采用 <a href="http://disqus.com" target="_blank">Disqus</a>
|
||||
作为评论系统
|
||||
{{msg . "commentSys"}}
|
||||
<div id="disqusSet">
|
||||
<label for="DisqusId">Disqus Id</label> <input type="text"
|
||||
class="form-control" style="display: inline; width: 50%"
|
||||
id="DisqusId" name="DisqusId"
|
||||
value="{{if .userBlog.DisqusId}}{{.userBlog.DisqusId}}{{else}}leanote{{end}}">
|
||||
<br /> (请填写您申请的Disqus唯一url前缀, 建议您申请Disqus帐号, 这样可以自己管理评论.
|
||||
或使用leanote的默认Disqus Id. <a target="_blank"
|
||||
href="/blog/view/52db8463e01c530ef8000001">需要帮助?</a>)
|
||||
<br />
|
||||
{{msg . "disqusHelp"}}
|
||||
<a target="_blank" href="http://leanote.com/blog/view/52db8463e01c530ef8000001">{{msg . "needHelp"}}</a>)
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button class="btn btn-success">保存</button>
|
||||
<button class="btn btn-success">{{msg . "save"}}</button>
|
||||
<span class="msg"></span>
|
||||
</div>
|
||||
</div>
|
||||
@ -90,16 +88,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="title" class="col-sm-2 control-label">博客名称</label>
|
||||
<label for="title" class="col-sm-2 control-label">{{msg . "blogName"}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="Title" name="Title"
|
||||
placeholder="比如: leanote的博客"
|
||||
value="{{if .userBlog.Title}}{{.userBlog.Title}}{{else}}{{.userInfo.Email}} 的博客{{end}}">
|
||||
placeholder="eg: leanote's blog"
|
||||
value="{{if .userBlog.Title}}{{.userBlog.Title}}{{else}}{{.userInfo.Email}} 's blog{{end}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="logo" class="col-sm-2 control-label">博客Logo</label>
|
||||
<label for="logo" class="col-sm-2 control-label">{{msg . "blogLogo"}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="hidden" name="Logo" id="Logo"
|
||||
value="{{.userBlog.Logo}}" />
|
||||
@ -107,14 +105,15 @@
|
||||
enctype="multipart/form-data" target="logoTarget"
|
||||
onsubmit="inProgress()">
|
||||
<input type="file" class="form-control" id="logo2" name="file"
|
||||
onChange='$("#formLogo").submit();' /> 上传logo将显示logo(替代博客标题)
|
||||
onChange='$("#formLogo").submit();' />
|
||||
{{msg . "blogLogoTips"}}
|
||||
<div id="logoImg"
|
||||
{{if .userBlog.Logo }}
|
||||
{{else}}
|
||||
style="display: none"{{end}}
|
||||
>
|
||||
<img src="{{.userBlog.Logo}}" style="height: 40px" /> <a
|
||||
href="#" id="deleteLogo">删除</a>
|
||||
href="#" id="deleteLogo">{{msg . "delete"}}</a>
|
||||
</div>
|
||||
</form>
|
||||
<iframe id="logoTarget" name="logoTarget" src="#"
|
||||
@ -123,11 +122,11 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="subTitle" class="col-sm-2 control-label">博客描述</label>
|
||||
<label for="subTitle" class="col-sm-2 control-label">{{msg . "blogDesc"}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="SubTitle"
|
||||
name="SubTitle" value="{{.userBlog.SubTitle}}"
|
||||
placeholder="比如: leanote, 不只是笔记">
|
||||
placeholder="eg: leanote, your own cloud note">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -139,7 +138,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="aboutMe" class="col-sm-2 control-label">关于我</label>
|
||||
<label for="aboutMe" class="col-sm-2 control-label">{{msg . "aboutMe"}}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="AboutMe" name="AboutMe">{{.userBlog.AboutMe}}</textarea>
|
||||
</div>
|
||||
@ -147,7 +146,7 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button class="btn btn-success">保存</button>
|
||||
<button class="btn btn-success">{{msg . "save"}}</button>
|
||||
<span class="msg"></span>
|
||||
</div>
|
||||
</div>
|
||||
@ -218,7 +217,7 @@ $(function() {
|
||||
}
|
||||
|
||||
post("/blog/setUserBlogBase", data, function(ret) {
|
||||
showMsg2($("#baseInfo .msg"), "保存成功", 2000);
|
||||
showMsg2($("#baseInfo .msg"), "{{msg . "saveSuccess"}}", 2000);
|
||||
$("#blogDesc").html(data.SubTitle);
|
||||
$("#logo").html(data.Title);
|
||||
if(data.Logo) {
|
||||
@ -234,7 +233,7 @@ $(function() {
|
||||
DisqusId : $("#DisqusId").val(),
|
||||
}
|
||||
post("/blog/setUserBlogComment", data, function(ret) {
|
||||
showMsg2($("#commentInfo .msg"), "保存成功", 2000);
|
||||
showMsg2($("#commentInfo .msg"), "{{msg . "saveSuccess"}}", 2000);
|
||||
}, this);
|
||||
});
|
||||
// 主题
|
||||
@ -244,7 +243,7 @@ $(function() {
|
||||
Style : $("input[name='Style']:checked").val()
|
||||
}
|
||||
post("/blog/setUserBlogStyle", data, function(ret) {
|
||||
showMsg2($("#styleInfo .msg"), "保存成功", 2000);
|
||||
showMsg2($("#styleInfo .msg"), "{{msg . "saveSuccess"}}", 2000);
|
||||
}, this);
|
||||
});
|
||||
$("input[name='Style']").click(function() {
|
||||
|
@ -12,11 +12,11 @@
|
||||
{{if .blog.Tags}}
|
||||
{{blogTags .blog.Tags}}
|
||||
{{else}}
|
||||
无
|
||||
{{msg . "noTag"}}
|
||||
{{end}}
|
||||
|
|
||||
<i class="fa fa-calendar" style="color: #666"></i> 更新 {{.blog.UpdatedTime | datetime}} |
|
||||
<i class="fa fa-calendar" style="color: #666"></i> 创建 {{.blog.CreatedTime | datetime}}
|
||||
<i class="fa fa-calendar" style="color: #666"></i> {{msg . "updatedTime"}} {{.blog.UpdatedTime | datetime}} |
|
||||
<i class="fa fa-calendar" style="color: #666"></i> {{msg . "createdTime"}} {{.blog.CreatedTime | datetime}}
|
||||
</div>
|
||||
|
||||
<div class="desc" id="content">
|
||||
@ -93,7 +93,7 @@
|
||||
<div id="blogNav">
|
||||
<div id="blogNavNav">
|
||||
<i class="fa fa-align-justify" title="文档导航"></i>
|
||||
<span>{{msg . "nav"}}</span>
|
||||
<span>{{msg . "blogNav"}}</span>
|
||||
</div>
|
||||
<div id="blogNavContent" style="max-width: 200px">
|
||||
</div>
|
||||
|
@ -4,11 +4,11 @@
|
||||
</style>
|
||||
<section>
|
||||
<div class="header">
|
||||
<h2>leanote, Your own cloud note!</h2>
|
||||
<h2>leanote, your own cloud note!</h2>
|
||||
<p>Knowledge, Sharing, Cooperation, Blog... all just in leanote</p>
|
||||
|
||||
<div>
|
||||
<a class="btn btn-primary" href="https://github.com/leanote/leanote">Fork leanote from Github</a>
|
||||
<a class="btn btn-primary" href="https://github.com/leanote/leanote">Fork leanote on Github</a>
|
||||
|
||||
|
||||
<a class="btn btn-default" href="/demo">Try it</a>
|
||||
|
@ -707,7 +707,7 @@ function log(o) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 长微博 -->
|
||||
<!-- 激活邮件 -->
|
||||
<div id="reSendActiveEmailDialog">
|
||||
<div class="modal-body">
|
||||
<div style="max-height: 300px; padding: 5px 0; text-align: center; overflow: scroll;" class="weibo">
|
||||
|
Reference in New Issue
Block a user