change moto and delete lea

This commit is contained in:
life
2014-10-15 17:31:27 +08:00
parent f99cca40c2
commit 8ae438272b
16 changed files with 17 additions and 256 deletions

View File

@ -2,7 +2,7 @@
## 1. Introduction
Leanote, your own cloud note.
Leanote, note just a notebook!
**Some Features**
@ -109,7 +109,7 @@ Please fork this repository and contribute back using [pull requests](https://gi
## 1. 介绍
Leanote, 你的私人云笔记!
Leanote, 不只是笔记!
**特性**
@ -214,6 +214,6 @@ $> sudo sh run.sh
leanote还有很多问题, 如果你喜欢它, 欢迎加入我们一起完善leanote.
## 讨论
* [leanote bbs](http://bbs.leanote.com)
* [leanote google group](https://groups.google.com/forum/#!forum/leanote)
* [leanote 社区](http://bbs.leanote.com)
* QQ群158716820
* [leanote google group](https://groups.google.com/forum/#!forum/leanote)

View File

@ -1,52 +0,0 @@
package controllers
import (
"github.com/revel/revel"
// "encoding/json"
. "github.com/leanote/leanote/app/lea"
// "github.com/leanote/leanote/app/types"
// "io/ioutil"
// "math"
// "os"
// "path"
)
// lea++博客平台
type Lea struct {
BaseController
}
// 进入某个用户的博客
func (c Lea) Index(tag, keywords string) revel.Result {
c.RenderArgs["nav"] = "recommend"
return c.p(tag, keywords, true)
}
func (c Lea) Latest(tag, keywords string) revel.Result {
c.RenderArgs["nav"] = "latest"
return c.p(tag, keywords, false);
}
func (c Lea) p(tag, keywords string, recommend bool) revel.Result {
var tags = []string{}
if recommend {
tags = configService.GetGlobalArrayConfig("recommendTags")
} else {
tags = configService.GetGlobalArrayConfig("newTags")
}
// 如果不在所在的tag就不能搜索
if !InArray(tags, tag) {
tag = ""
}
c.RenderArgs["tag"] = tag
page := c.GetPage()
pageInfo, blogs := blogService.ListAllBlogs(tag, keywords, recommend, page, 10, "UpdatedTime", false)
c.RenderArgs["pageInfo"] = pageInfo
c.RenderArgs["blogs"] = blogs
c.RenderArgs["tags"] = tags
c.RenderArgs["keywords"] = keywords
return c.RenderTemplate("lea/index.html");
}

View File

@ -2,7 +2,7 @@ package session
import (
"github.com/robfig/revel"
"leanote/app/lea/memcache"
"github.com/leanote/leanote/app/lea/memcache"
// . "leanote/app/lea"
)

View File

@ -5,7 +5,7 @@
<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, your own cloud note!">
<meta name="description" content="leanote, {{msg $ "moto"}}">
<meta name="author" content="leanote">
<title>{{.title}}</title>

View File

@ -5,7 +5,7 @@
<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, your own cloud note!">
<meta name="description" content="leanote, {{msg $ "moto"}}">
<meta name="author" content="leanote">
<title>{{.title}}</title>

View File

@ -126,7 +126,7 @@
<div class="col-sm-10">
<input type="text" class="form-control" id="SubTitle"
name="SubTitle" value="{{.userBlog.SubTitle}}"
placeholder="eg: leanote, your own cloud note">
placeholder="eg: leanote, {{msg $ "moto"}}">
</div>
</div>

View File

@ -5,7 +5,7 @@
<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, your own cloud note!">
<meta name="description" content="leanote, {{msg $ "moto"}}">
<meta name="author" content="leanote">
<title>{{.title}}</title>
@ -27,7 +27,7 @@ function log(o) {
<div class="pull-left">
<h1>
<a href="/index">
<img src="/images/logo/leanote_black.png" id="" style="height: 50px" title="leanote, Your own cloud note!"/>
<img src="/images/logo/leanote_black.png" id="" style="height: 50px" title="leanote, {{msg $ "moto"}}"/>
</a>
</h1>
</div>

View File

@ -5,7 +5,7 @@
<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, your own cloud note!">
<meta name="description" content="leanote, {{msg $ "moto"}}">
<meta name="author" content="leanote">
<title>{{.title}}</title>

View File

@ -1,7 +0,0 @@
<div id="footer">
<a href="/lea/index">lea++</a>, leanote博客平台.
<a href="/index">leanote</a> © 2014
</div>
</body>
</html>

View File

@ -1,48 +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="lea++, leanote,leanote.com">
<meta name="description" content="lea++, leanote blog platform. leanote, your own cloud note!">
<meta name="author" content="leanote">
<link href="/css/bootstrap.css" rel="stylesheet">
<link href="/css/font-awesome-4.0.3/css/font-awesome.css" rel="stylesheet"/>
<link href="/css/blog/p.css" rel="stylesheet">
<title>lea++, leanote博客平台</title>
<script>
function log(o) {
}
</script>
<style>
</style>
</head>
<body>
<div id="header">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<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="/lea/index">
<span id="logo"></span>
<span id="subTitle" title="lea++, leanote博客平台">lea++</span>
</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<form class="navbar-form navbar-right">
<input type="text" id="keywords" name="keywords" value="{{raw .keywords}}" class="form-control" placeholder="Search...">
</form>
<ul class="nav navbar-nav navbar-left">
<li {{if eq .nav "recommend"}}class="active"{{end}}><a href="/lea/index">推荐</a></li>
<li {{if eq .nav "latest"}}class="active"{{end}}><a href="/lea/latest">最新</a></li>
</ul>
</div>
</div>
</nav>
</div>

View File

@ -1,95 +0,0 @@
{{template "lea/header.html" .}}
{{if eq .nav "recommend"}}
{{set $ "baseUrl" "/lea/index" }}
{{else}}
{{set $ "baseUrl" "/lea/latest" }}
{{end}}
<div id="content">
<!-- 分类 -->
<ul class="clearfix sort-nav">
<li {{if not .tag}}class="active"{{end}}>
<a class="category" href="{{$.baseUrl}}">全部</a>
</li>
{{range $v := .tags}}
<li {{if eq $v $.tag}}class="active"{{end}}>
<a class="category" data-category-id="{{$v}}" href="{{$.baseUrl}}?tag={{$v}}">{{$v}}</a>
</li>
{{end}}
</ul>
<!-- 文章列表 -->
<ul class="thumbnails">
{{range .blogs}}
<li>
<div class="article">
<a class="title" href="/blog/view/{{.NoteId.Hex}}" title="{{.Title}} {{msg $ "fullBlog"}}" target="_blank">{{.Title}}</a>
<a class="avatar maleskine-author" href="/blog/{{.UserId.Hex}}" target="_blank" title="{{.User.Username}}">
{{ if .User.Logo}}
<img src="{{.User.Logo}}">
{{else}}
<img src="/images/blog/default_avatar.png">
{{end}}
</a>
<div class="content">
{{.Desc | raw}}
</div>
<div class="article-info">
<a class="author" href="/blog/{{.User.Username}}">
<span class="fa fa-user"></span>
{{.User.Username}}
</a>
<!--
<span class="fa fa-comments-o"></span>9
<span class="fa fa-heart-o"></span>6
-->
<span class="fa fa-bookmark-o"></span>
{{if .Tags}}
{{blogTags .Tags}}
{{else}}
{{msg $ "noTag"}}
{{end}}
</div>
</div>
</li>
{{end}}
</ul>
<div id="pagination" class="clearfix">
<ul class="pagination pagination-sm m-t-none m-b-none">
{{set . "url" (urlConcat .baseUrl "keywords" .keywords)}}
</ul>
</div>
</div>
<script src="/js/jquery-1.9.0.min.js"></script>
<script src="/js/bootstrap-min.js"></script>
<script src="/js/jquery.pagination.js"></script>
<script>
$(function() {
var totalPage = {{.pageInfo.TotalPage}};
if(totalPage > 1) {
var baseUrl = "{{.url}}";
var count = {{.pageInfo.Count}};
var curPage = {{.pageInfo.CurPage}}-1;
$(".pagination").pagination(count, {
items_per_page: 10,
prev_text:"&lt;",
next_text:"&gt;",
current_page: curPage,
callback: function(pageNum) {
pageNum++;
var url = baseUrl;
if(baseUrl.indexOf("?") > 0) {
url += "&page=" + pageNum;
} else {
url += "?page=" + pageNum;
}
location.href = url;
}
});
}
});
</script>
{{template "lea/footer.html" .}}

View File

@ -1,33 +0,0 @@
{{if gt .pageInfo.TotalPage 1}}
<ul class="pagination pagination-sm m-t-none m-b-none">
<li class="{{if eq $.pageInfo.CurPage 1}}disabled{{end}}" >
<a href="{{if eq $.pageInfo.CurPage 1}}javascript:;{{else}}{{sub $.pageInfo.CurPage | urlConcat $.url "page" }}{{end}}">
<i class="fa fa-chevron-left">
</i>
</a>
</li>
{{range $i := N 1 .pageInfo.TotalPage}}
{{if eq $i $.pageInfo.CurPage}}
<li class="active">
<a href="javascript:;">
{{$i}}
</a>
</li>
{{else}}
<li class="">
<a href="{{urlConcat $.url "page" $i}}">
{{$i}}
</a>
</li>
{{end}}
{{end}}
<li class="{{if eq .pageInfo.CurPage .pageInfo.TotalPage}}disabled{{end}}" >
<a href="{{if eq .pageInfo.CurPage .pageInfo.TotalPage}}javascript:;{{else}}{{add $.pageInfo.CurPage | urlConcat $.url "page" }}{{end}}">
<i class="fa fa-chevron-right">
</i>
</a>
</li>
</ul>
{{end}}

View File

@ -5,8 +5,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, your own cloud note">
<title>leanote, your own cloud note</title>
<meta name="description" content="leanote, {{msg $ "moto"}}">
<title>leanote, {{msg $ "moto"}}</title>
<link href="css/bootstrap.css" rel="stylesheet" />
<!-- 先加载, 没有样式, 宽度不定 -->
@ -164,10 +164,6 @@ function log(o) {
</div>
</div>
<div class="pull-right" style="line-height: 60px; margin:0 10px">
<a target="_blank" title="lea++, leanote blog platform" href="/lea/index">lea++</a>
</div>
<div class="pull-right" style="margin: 0 10px" id="topNav">
<a target="_blank" href="/blog/{{.userInfo.Username}}">
{{msg . "myBlog"}}

View File

@ -5,8 +5,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, your own cloud note">
<title>leanote, your own cloud note</title>
<meta name="description" content="leanote, {{msg $ "moto"}}">
<title>leanote, {{msg $ "moto"}}</title>
<link href="css/bootstrap.css" rel="stylesheet" />
<!-- 先加载, 没有样式, 宽度不定 -->

View File

@ -1,5 +1,5 @@
# leanote
moto=your own cloud note!
moto=Not Just A Notebook!
moto2=Knowledge, Sharing, Cooperation, Blog... all in leanote
moto3=Brief But Not Simple
fork github=Fork leanote on Github

View File

@ -1,5 +1,5 @@
# leanote
moto=你的私人云笔记!
moto=不只是笔记!
moto2=知识管理, 博客, 分享, 协作... 尽在leanote
moto3=简约而不简单
fork github=Github 源码