Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ffb10b923 | ||
|
|
ba9b35c46e | ||
|
|
acc67754c3 | ||
|
|
1ed9f0c96d | ||
|
|
2db2a55e81 | ||
|
|
634b17c6f7 | ||
|
|
468ad4dec7 | ||
|
|
7cbd38e8bf | ||
|
|
1d8be4c012 | ||
|
|
7b6a5c0929 | ||
|
|
fe10dbbd77 | ||
|
|
7db9d95108 | ||
|
|
91eb893814 | ||
|
|
fcc86de37c | ||
|
|
61a0b9caa0 | ||
|
|
95fe0c5289 | ||
|
|
bb0350fdac | ||
|
|
1494b25129 | ||
|
|
06eb27faab | ||
|
|
121eab5d38 | ||
|
|
37da418bdd | ||
|
|
eea6ad07f8 | ||
|
|
b0402f29dd | ||
|
|
8e05e433de | ||
|
|
a0acd31fcf | ||
|
|
a5b525affd | ||
|
|
414639dc3d | ||
|
|
cf4accc110 | ||
|
|
8d4a757ee9 | ||
|
|
68bacdc3bf | ||
|
|
3df6fa2bb7 | ||
|
|
e8c0001721 | ||
|
|
4210d56a0d | ||
|
|
63b65920db | ||
|
|
c55f364153 | ||
|
|
8af64c7b74 | ||
|
|
7bb05bd9e7 | ||
|
|
abf3297639 | ||
|
|
ad00f36fd9 | ||
|
|
c549957cdc | ||
|
|
7f9356c5a7 | ||
|
|
910b079c55 | ||
|
|
b1b36cec23 | ||
|
|
8eab8c7310 | ||
|
|
ddd0c13d34 |
No files matched your search
@@ -15,3 +15,4 @@ app/routes/routes.go
|
|||||||
app/tmp/main.go
|
app/tmp/main.go
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.settings
|
.settings
|
||||||
|
public/config.codekit
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
[中文](https://github.com/leanote/leanote#1-介绍)
|
||||||
|
|
||||||
## 1. Introduction
|
## 1. Introduction
|
||||||
|
|
||||||
Leanote, your own cloud note.
|
Leanote, your own cloud note.
|
||||||
@@ -20,10 +22,10 @@ To be honest, our inspiration comes from Evernote. We use Evernote to manage our
|
|||||||
|
|
||||||
### 3.1. Download leanote
|
### 3.1. Download leanote
|
||||||
|
|
||||||
Leanote v0.1 has been released. Binaries:
|
Leanote V0.3 has been released. Binaries:
|
||||||
|
|
||||||
* Linux: [leanote-linux-v0.1.bin.tar.gz](https://github.com/leanote/leanote/releases/download/0.1/leanote-linux-v0.1.bin.tar.gz)
|
* Linux: [leanote-linux-v0.3.bin.tar.gz](https://github.com/leanote/leanote/releases/download/0.3/leanote-linux-v0.3.bin.tar.gz)
|
||||||
* MacOS X: [leanote-mac-v0.1.bin.tar.gz](https://github.com/leanote/leanote/releases/download/0.1/leanote-mac-v0.1.bin.tar.gz)
|
* MacOS X: [leanote-mac-v0.3.bin.tar.gz](https://github.com/leanote/leanote/releases/download/0.3/leanote-mac-v0.3.bin.tar.gz)
|
||||||
|
|
||||||
### 3.2. Install MongoDB
|
### 3.2. Install MongoDB
|
||||||
|
|
||||||
@@ -39,11 +41,12 @@ The mongodb data is in `[PATH_TO_LEANOTE]/mongodb_backup/leanote_install_data`
|
|||||||
$> mongorestore -h localhost -d leanote --directoryperdb PATH_TO_LEANOTE/mongodb_backup/leanote_install_data
|
$> mongorestore -h localhost -d leanote --directoryperdb PATH_TO_LEANOTE/mongodb_backup/leanote_install_data
|
||||||
```
|
```
|
||||||
|
|
||||||
The initial database contains two users:
|
The initial database contains three users:
|
||||||
|
|
||||||
```
|
```
|
||||||
user1 username: leanote, password: abc123
|
user1 username: leanote, password: abc123
|
||||||
user2 username: admin, password: abc123
|
user2 username: admin, password: abc123
|
||||||
|
user3 username: demo@leanote.com, password: demo@leanote.com (this user is for demo)
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3.4. Configuration
|
### 3.4. Configuration
|
||||||
@@ -87,40 +90,123 @@ $> sudo sh run.sh
|
|||||||
|
|
||||||
## 4. How to develop leanote
|
## 4. How to develop leanote
|
||||||
|
|
||||||
For more tips please see [our wiki](https://github.com/leanote/leanote/wiki/How-to-develop-leanote)
|
Please see [How-to-develop-leanote](https://github.com/leanote/leanote/wiki/How-to-develop-leanote-%E5%A6%82%E4%BD%95%E5%BC%80%E5%8F%91leanote)
|
||||||
|
|
||||||
Leanote is a app based on [revel](https://revel.github.io/), so if you want to work on leanote, you should be familar with revel.
|
|
||||||
|
|
||||||
### 4.1 Install golang
|
## 5. Contributors
|
||||||
|
Thank you to all the [contributors](https://github.com/leanote/leanote/graphs/contributors) on
|
||||||
|
this project. Your help is much appreciated.
|
||||||
|
|
||||||
Install golang and set the `GOPATH` environment variable
|
## 6. Contributing
|
||||||
|
|
||||||
### 4.2 Install revel
|
Please fork this repository and contribute back using [pull requests](https://github.com/leanote/leanote/pulls).
|
||||||
```
|
|
||||||
$> go get github.com/revel/revel
|
|
||||||
$> go get github.com/revel/cmd/revel
|
|
||||||
```
|
|
||||||
|
|
||||||
### 4.3 Get leanote
|
|
||||||
|
|
||||||
```
|
|
||||||
$> go get github.com/leanote/leanote/app
|
|
||||||
```
|
|
||||||
|
|
||||||
### 4.4 Build/Run leanote via revel
|
|
||||||
|
|
||||||
```
|
|
||||||
$> cp conf/app.conf-default conf/app.conf
|
|
||||||
$> cp conf/routes-default conf/routes
|
|
||||||
```
|
|
||||||
|
|
||||||
Now you can modify the leanote source and build/run using `revel`
|
|
||||||
|
|
||||||
```
|
|
||||||
$> revel run github.com/leanote/leanote
|
|
||||||
```
|
|
||||||
|
|
||||||
You are welcome to join us and contribute code to leanote! Thanks.
|
|
||||||
|
|
||||||
## Discussion
|
## Discussion
|
||||||
[leanote google group](https://groups.google.com/forum/#!forum/leanote)
|
[leanote google group](https://groups.google.com/forum/#!forum/leanote)
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
## 1. 介绍
|
||||||
|
|
||||||
|
Leanote, 你的私人云笔记!
|
||||||
|
|
||||||
|
**特性**
|
||||||
|
|
||||||
|
* 知识管理: 通过leanote来管理知识, leanote有易操作的界面, 包含两款编辑器tinymce和markdown. 在leanote, 你可以尽情享受写作.
|
||||||
|
* 分享: 你也可以通过分享知识给好友, 让好友拥有你的知识.
|
||||||
|
* 协作: 在分享的同时也可以与好友一起协作知识.
|
||||||
|
* 博客: leanote也可以作为你的博客, 将知识公开成博客, 让leanote把你的知识传播的更远!
|
||||||
|
|
||||||
|
## 2. 为什么我们要创建leanote?
|
||||||
|
说实话, 我们曾是evernote的忠实粉丝, 但是我们也发现evernote的不足:
|
||||||
|
* leanote的编辑器不能满足我们的需求, 不能贴代码(格式会乱掉, 作为程序员, 代码是我们的基本需求啊), 图片不能缩放.
|
||||||
|
* 我们是markdown的爱好者, 可是evernote竟然没有.
|
||||||
|
* 我们也想将知识公开, 所以我们有自己的博客, 如wordpress, 但为什么这两者不能合二为一呢?
|
||||||
|
* 还有...
|
||||||
|
|
||||||
|
## 3.安装leanote
|
||||||
|
leanote是一款私有云笔记, 你可以下载它安装在自己的服务器上, 当然也可以在 http://leanote.com 上注册.
|
||||||
|
|
||||||
|
### 3.1. 下载leanote
|
||||||
|
|
||||||
|
Leanote V0.3 已发布, 二进制文件(暂时没有windows版的):
|
||||||
|
|
||||||
|
* Linux: [leanote-linux-v0.3.bin.tar.gz](https://github.com/leanote/leanote/releases/download/0.3/leanote-linux-v0.3.bin.tar.gz)
|
||||||
|
* MacOS X: [leanote-mac-v0.3.bin.tar.gz](https://github.com/leanote/leanote/releases/download/0.3/leanote-mac-v0.3.bin.tar.gz)
|
||||||
|
|
||||||
|
### 3.2. 安装 MongodbDB
|
||||||
|
|
||||||
|
Leanote是由golang(使用[revel](https://revel.github.io/)框架 和 [MongoDB](https://www.mongodb.org)数据库), 你需要先安装Mongodb.
|
||||||
|
|
||||||
|
安装MongodbDB, 导入数据更多细节请查看: [wiki](https://github.com/leanote/leanote/wiki/Install-Mongodb)
|
||||||
|
|
||||||
|
### 3.3. 导入初始数据
|
||||||
|
|
||||||
|
MongodbDB初始数据在 `[PATH_TO_LEANOTE]/mongodb_backup/leanote_install_data`
|
||||||
|
|
||||||
|
```
|
||||||
|
$> mongorestore -h localhost -d leanote --directoryperdb PATH_TO_LEANOTE/mongodb_backup/leanote_install_data
|
||||||
|
```
|
||||||
|
|
||||||
|
初始数据包含三个用户:
|
||||||
|
|
||||||
|
```
|
||||||
|
user1 username: leanote, password: abc123
|
||||||
|
user2 username: admin, password: abc123
|
||||||
|
user3 username: demo@leanote.com, password: demo@leanote.com (为体验使用)
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3.4. 配置
|
||||||
|
|
||||||
|
修改 `[PATH_TO_LEANOTE]/conf/app.conf`. 有以下选项:
|
||||||
|
|
||||||
|
``mongodb`` **必须配置!**
|
||||||
|
|
||||||
|
```Shell
|
||||||
|
db.host=localhost
|
||||||
|
db.port=27017
|
||||||
|
db.dbname=leanote
|
||||||
|
db.username=
|
||||||
|
db.password=
|
||||||
|
```
|
||||||
|
|
||||||
|
``http.port``
|
||||||
|
|
||||||
|
默认为 80
|
||||||
|
|
||||||
|
``site.url``
|
||||||
|
|
||||||
|
默认是 `http://localhost`, 这会在上传图片后的图片路径中用户, 还有发邮件, 找回密码验证邮箱时用到.
|
||||||
|
|
||||||
|
``email``
|
||||||
|
|
||||||
|
找回密码和验证邮箱时使用
|
||||||
|
|
||||||
|
``adminUsername``
|
||||||
|
|
||||||
|
默认是 `admin`. 首页即为该用户的博客
|
||||||
|
|
||||||
|
更多配置请查看 `app/app.conf` 和 [revel 手册](https://revel.github.io/)
|
||||||
|
|
||||||
|
### 3.5. 运行leanote
|
||||||
|
|
||||||
|
```
|
||||||
|
$> cd PATH_TO_LEANOTE/bin
|
||||||
|
$> sudo sh run.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## 4. 如何对leanote进行二次开发
|
||||||
|
|
||||||
|
请查看 [How-to-develop-leanote](https://github.com/leanote/leanote/wiki/How-to-develop-leanote-%E5%A6%82%E4%BD%95%E5%BC%80%E5%8F%91leanote)
|
||||||
|
|
||||||
|
## 5. 贡献者
|
||||||
|
多谢 [贡献者](https://github.com/leanote/leanote/graphs/contributors) 的贡献, leanote因有你们而更完美!
|
||||||
|
|
||||||
|
## 6. 加入我们
|
||||||
|
|
||||||
|
欢迎提交[pull requests](https://github.com/leanote/leanote/pulls) 到leanote.
|
||||||
|
|
||||||
|
leanote还有很多问题, 如果你喜欢它, 欢迎加入我们一起完善leanote.
|
||||||
|
|
||||||
|
## 讨论
|
||||||
|
[leanote google group](https://groups.google.com/forum/#!forum/leanote)
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package controllers
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/revel/revel"
|
||||||
|
// "encoding/json"
|
||||||
|
"github.com/leanote/leanote/app/info"
|
||||||
|
"gopkg.in/mgo.v2/bson"
|
||||||
|
// . "github.com/leanote/leanote/app/lea"
|
||||||
|
// "io/ioutil"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Album struct {
|
||||||
|
BaseController
|
||||||
|
}
|
||||||
|
|
||||||
|
// all albums by userId
|
||||||
|
func (c Album) GetAlbums() revel.Result {
|
||||||
|
re := albumService.GetAlbums(c.GetUserId())
|
||||||
|
return c.RenderJson(re)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c Album) DeleteAlbum(albumId string) revel.Result {
|
||||||
|
re, msg := albumService.DeleteAlbum(c.GetUserId(), albumId)
|
||||||
|
return c.RenderJson(info.Re{Ok: re, Msg: msg})
|
||||||
|
}
|
||||||
|
|
||||||
|
// add album
|
||||||
|
func (c Album) AddAlbum(name string) revel.Result {
|
||||||
|
album := info.Album{
|
||||||
|
AlbumId: bson.NewObjectId(),
|
||||||
|
Name: name,
|
||||||
|
Seq: -1,
|
||||||
|
UserId: c.GetObjectUserId()}
|
||||||
|
re := albumService.AddAlbum(album)
|
||||||
|
|
||||||
|
if(re) {
|
||||||
|
return c.RenderJson(album)
|
||||||
|
} else {
|
||||||
|
return c.RenderJson(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// update alnum name
|
||||||
|
func (c Album) UpdateAlbum(albumId, name string) revel.Result {
|
||||||
|
return c.RenderJson(albumService.UpdateAlbum(albumId, c.GetUserId(), name))
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@ package controllers
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/revel/revel"
|
"github.com/revel/revel"
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
// "io/ioutil"
|
// "io/ioutil"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package controllers
|
|||||||
import (
|
import (
|
||||||
"github.com/revel/revel"
|
"github.com/revel/revel"
|
||||||
// "encoding/json"
|
// "encoding/json"
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
// . "leanote/app/lea"
|
// . "leanote/app/lea"
|
||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
// "github.com/leanote/leanote/app/types"
|
// "github.com/leanote/leanote/app/types"
|
||||||
@@ -173,6 +173,8 @@ func (c Blog) Set() revel.Result {
|
|||||||
|
|
||||||
c.getRecentBlogs(userId)
|
c.getRecentBlogs(userId)
|
||||||
|
|
||||||
|
c.SetLocale();
|
||||||
|
|
||||||
return c.RenderTemplate("blog/set.html")
|
return c.RenderTemplate("blog/set.html")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 首页
|
// 首页
|
||||||
@@ -20,7 +21,7 @@ func (c File) UploadImage(renderHtml string) revel.Result {
|
|||||||
renderHtml = "file/image.html"
|
renderHtml = "file/image.html"
|
||||||
}
|
}
|
||||||
|
|
||||||
re := c.uploadImage();
|
re := c.uploadImage("", "");
|
||||||
|
|
||||||
c.RenderArgs["fileUrlPath"] = siteUrl + re.Id
|
c.RenderArgs["fileUrlPath"] = siteUrl + re.Id
|
||||||
c.RenderArgs["resultCode"] = re.Code
|
c.RenderArgs["resultCode"] = re.Code
|
||||||
@@ -34,24 +35,34 @@ func (c File) UploadBlogLogo() revel.Result {
|
|||||||
return c.UploadImage("file/blog_logo.html");
|
return c.UploadImage("file/blog_logo.html");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 拖拉上传
|
// 拖拉上传, pasteImage
|
||||||
func (c File) UploadImageJson(renderHtml string) revel.Result {
|
func (c File) UploadImageJson(renderHtml, from string) revel.Result {
|
||||||
re := c.uploadImage();
|
re := c.uploadImage(from, "");
|
||||||
|
re.Id = siteUrl + re.Id
|
||||||
|
// re.Id = re.Id
|
||||||
|
return c.RenderJson(re)
|
||||||
|
}
|
||||||
|
|
||||||
|
// leaui image plugin
|
||||||
|
func (c File) UploadImageLeaui(albumId string) revel.Result {
|
||||||
|
re := c.uploadImage("", albumId);
|
||||||
re.Id = siteUrl + re.Id
|
re.Id = siteUrl + re.Id
|
||||||
// re.Id = re.Id
|
// re.Id = re.Id
|
||||||
return c.RenderJson(re)
|
return c.RenderJson(re)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 上传图片, 公用方法
|
// 上传图片, 公用方法
|
||||||
func (c File) uploadImage() (re info.Re) {
|
func (c File) uploadImage(from, albumId string) (re info.Re) {
|
||||||
var fileUrlPath = ""
|
var fileUrlPath = ""
|
||||||
var resultCode = 0 // 1表示正常
|
var resultCode = 0 // 1表示正常
|
||||||
var resultMsg = "内部错误" // 错误信息
|
var resultMsg = "内部错误" // 错误信息
|
||||||
|
var Ok = false
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
re.Id = fileUrlPath
|
re.Id = fileUrlPath
|
||||||
re.Code = resultCode
|
re.Code = resultCode
|
||||||
re.Msg = resultMsg
|
re.Msg = resultMsg
|
||||||
|
re.Ok = Ok
|
||||||
}()
|
}()
|
||||||
|
|
||||||
file, handel, err := c.Request.FormFile("file")
|
file, handel, err := c.Request.FormFile("file")
|
||||||
@@ -69,11 +80,18 @@ func (c File) uploadImage() (re info.Re) {
|
|||||||
}
|
}
|
||||||
// 生成新的文件名
|
// 生成新的文件名
|
||||||
filename := handel.Filename
|
filename := handel.Filename
|
||||||
_, ext := SplitFilename(filename)
|
|
||||||
if(ext != ".gif" && ext != ".jpg" && ext != ".png" && ext != ".bmp" && ext != ".jpeg") {
|
var ext string;
|
||||||
resultMsg = "不是图片"
|
if from == "pasteImage" {
|
||||||
return re
|
ext = ".png"; // TODO 可能不是png类型
|
||||||
|
} else {
|
||||||
|
_, ext = SplitFilename(filename)
|
||||||
|
if(ext != ".gif" && ext != ".jpg" && ext != ".png" && ext != ".bmp" && ext != ".jpeg") {
|
||||||
|
resultMsg = "不是图片"
|
||||||
|
return re
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
filename = NewGuid() + ext
|
filename = NewGuid() + ext
|
||||||
data, err := ioutil.ReadAll(file)
|
data, err := ioutil.ReadAll(file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -96,10 +114,87 @@ func (c File) uploadImage() (re info.Re) {
|
|||||||
}
|
}
|
||||||
// 改变成gif图片
|
// 改变成gif图片
|
||||||
_, toPathGif := TransToGif(toPath, 0, true)
|
_, toPathGif := TransToGif(toPath, 0, true)
|
||||||
|
filename = GetFilename(toPathGif)
|
||||||
fileUrlPath += "/" + GetFilename(toPathGif)
|
filesize := GetFilesize(toPathGif)
|
||||||
|
fileUrlPath += "/" + filename
|
||||||
resultCode = 1
|
resultCode = 1
|
||||||
resultMsg = "上传成功!"
|
resultMsg = "上传成功!"
|
||||||
|
|
||||||
|
// File
|
||||||
|
fileInfo := info.File{Name: filename,
|
||||||
|
Title: handel.Filename,
|
||||||
|
Path: fileUrlPath,
|
||||||
|
Size: filesize}
|
||||||
|
|
||||||
|
Ok = fileService.AddImage(fileInfo, albumId, c.GetUserId())
|
||||||
|
|
||||||
|
re.Item = fileInfo
|
||||||
|
|
||||||
return re
|
return re
|
||||||
|
}
|
||||||
|
|
||||||
|
// get all images by userId with page
|
||||||
|
func (c File) GetImages(albumId, key string, page int) revel.Result {
|
||||||
|
re := fileService.ListImagesWithPage(c.GetUserId(), albumId, key, page, 12)
|
||||||
|
return c.RenderJson(re)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c File) UpdateImageTitle(fileId, title string) revel.Result {
|
||||||
|
re := info.NewRe()
|
||||||
|
re.Ok = fileService.UpdateImageTitle(c.GetUserId(), fileId, title)
|
||||||
|
return c.RenderJson(re)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c File) DeleteImage(fileId string) revel.Result {
|
||||||
|
re := info.NewRe()
|
||||||
|
re.Ok, re.Msg = fileService.DeleteImage(c.GetUserId(), fileId)
|
||||||
|
return c.RenderJson(re)
|
||||||
|
}
|
||||||
|
|
||||||
|
// update image uploader to leaui image,
|
||||||
|
// scan all user's images and insert into db
|
||||||
|
func (c File) UpgradeLeauiImage() revel.Result {
|
||||||
|
re := info.NewRe()
|
||||||
|
|
||||||
|
if ok, _ := revel.Config.Bool("upgradeLeauiImage"); !ok {
|
||||||
|
re.Msg = "Not allowed"
|
||||||
|
return c.RenderJson(re)
|
||||||
|
}
|
||||||
|
|
||||||
|
uploadPath := revel.BasePath + "/public/upload";
|
||||||
|
userIds := ListDir(uploadPath)
|
||||||
|
if userIds == nil {
|
||||||
|
re.Msg = "no user"
|
||||||
|
return c.RenderJson(re)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg := "";
|
||||||
|
|
||||||
|
for _, userId := range userIds {
|
||||||
|
dirPath := uploadPath + "/" + userId + "/images"
|
||||||
|
images := ListDir(dirPath)
|
||||||
|
if images == nil {
|
||||||
|
msg += userId + " no images "
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
hadImages := fileService.GetAllImageNamesMap(userId)
|
||||||
|
|
||||||
|
i := 0
|
||||||
|
for _, filename := range images {
|
||||||
|
if _, ok := hadImages[filename]; !ok {
|
||||||
|
fileUrlPath := "/upload/" + userId + "/images/" + filename
|
||||||
|
fileInfo := info.File{Name: filename,
|
||||||
|
Title: filename,
|
||||||
|
Path: fileUrlPath,
|
||||||
|
Size: GetFilesize(dirPath + "/" + filename)}
|
||||||
|
fileService.AddImage(fileInfo, "", userId)
|
||||||
|
i++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
msg += userId + ": " + strconv.Itoa(len(images)) + " -- " + strconv.Itoa(i) + " images "
|
||||||
|
}
|
||||||
|
|
||||||
|
re.Msg = msg
|
||||||
|
return c.RenderJson(re)
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,7 @@ package controllers
|
|||||||
import (
|
import (
|
||||||
"github.com/revel/revel"
|
"github.com/revel/revel"
|
||||||
// "encoding/json"
|
// "encoding/json"
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
. "github.com/leanote/leanote/app/lea"
|
. "github.com/leanote/leanote/app/lea"
|
||||||
"github.com/leanote/leanote/app/lea/html2image"
|
"github.com/leanote/leanote/app/lea/html2image"
|
||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"github.com/revel/revel"
|
"github.com/revel/revel"
|
||||||
// "encoding/json"
|
// "encoding/json"
|
||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
// . "github.com/leanote/leanote/app/lea"
|
// . "github.com/leanote/leanote/app/lea"
|
||||||
// "io/ioutil"
|
// "io/ioutil"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package controllers
|
|||||||
import (
|
import (
|
||||||
"github.com/revel/revel"
|
"github.com/revel/revel"
|
||||||
// "encoding/json"
|
// "encoding/json"
|
||||||
// "labix.org/v2/mgo/bson"
|
// "gopkg.in/mgo.v2/bson"
|
||||||
// . "github.com/leanote/leanote/app/lea"
|
// . "github.com/leanote/leanote/app/lea"
|
||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
// "github.com/leanote/leanote/app/types"
|
// "github.com/leanote/leanote/app/types"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package controllers
|
|||||||
import (
|
import (
|
||||||
"github.com/revel/revel"
|
"github.com/revel/revel"
|
||||||
// "encoding/json"
|
// "encoding/json"
|
||||||
// "labix.org/v2/mgo/bson"
|
// "gopkg.in/mgo.v2/bson"
|
||||||
. "github.com/leanote/leanote/app/lea"
|
. "github.com/leanote/leanote/app/lea"
|
||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
// "github.com/leanote/leanote/app/types"
|
// "github.com/leanote/leanote/app/types"
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ var pwdService *service.PwdService
|
|||||||
var tokenService *service.TokenService
|
var tokenService *service.TokenService
|
||||||
var suggestionService *service.SuggestionService
|
var suggestionService *service.SuggestionService
|
||||||
|
|
||||||
|
var albumService *service.AlbumService
|
||||||
|
var fileService *service.FileService
|
||||||
|
|
||||||
var pageSize = 1000
|
var pageSize = 1000
|
||||||
var defaultSortField = "UpdatedTime"
|
var defaultSortField = "UpdatedTime"
|
||||||
var leanoteUserId = "52d26b4e99c37b609a000001"
|
var leanoteUserId = "52d26b4e99c37b609a000001"
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package db
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"labix.org/v2/mgo"
|
"gopkg.in/mgo.v2"
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
"github.com/revel/revel"
|
"github.com/revel/revel"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -33,6 +33,10 @@ var Tokens *mgo.Collection
|
|||||||
|
|
||||||
var Suggestions *mgo.Collection
|
var Suggestions *mgo.Collection
|
||||||
|
|
||||||
|
// Album & file(image)
|
||||||
|
var Albums *mgo.Collection
|
||||||
|
var Files *mgo.Collection
|
||||||
|
|
||||||
// 初始化时连接数据库
|
// 初始化时连接数据库
|
||||||
func Init() {
|
func Init() {
|
||||||
var url string
|
var url string
|
||||||
@@ -94,8 +98,12 @@ func Init() {
|
|||||||
// find password
|
// find password
|
||||||
Tokens = Session.DB(dbname).C("tokens")
|
Tokens = Session.DB(dbname).C("tokens")
|
||||||
|
|
||||||
//
|
// Suggestion
|
||||||
Suggestions = Session.DB(dbname).C("suggestions")
|
Suggestions = Session.DB(dbname).C("suggestions")
|
||||||
|
|
||||||
|
// Album & file
|
||||||
|
Albums = Session.DB(dbname).C("albums")
|
||||||
|
Files = Session.DB(dbname).C("files")
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package info
|
||||||
|
|
||||||
|
import (
|
||||||
|
"gopkg.in/mgo.v2/bson"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Album struct {
|
||||||
|
AlbumId bson.ObjectId `bson:"_id,omitempty"` //
|
||||||
|
UserId bson.ObjectId `bson:"UserId"`
|
||||||
|
Name string `Name` // album name
|
||||||
|
Type int `Type` // type, the default is image: 0
|
||||||
|
Seq int `Seq`
|
||||||
|
CreatedTime time.Time `CreatedTime`
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package info
|
package info
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 只为blog, 不为note
|
// 只为blog, 不为note
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package info
|
||||||
|
|
||||||
|
import (
|
||||||
|
"gopkg.in/mgo.v2/bson"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type File struct {
|
||||||
|
FileId bson.ObjectId `bson:"_id,omitempty"` //
|
||||||
|
UserId bson.ObjectId `bson:"UserId"`
|
||||||
|
AlbumId bson.ObjectId `bson:"AlbumId"`
|
||||||
|
Name string `Name` // file name
|
||||||
|
Title string `Title` // file name or user defined for search
|
||||||
|
Size int64 `Size` // file size (byte)
|
||||||
|
Type string `Type` // file type, such as image/jpg
|
||||||
|
Path string `Path` // the file path, based on /upload
|
||||||
|
IsDefaultAlbum bool `IsDefaultAlbum`
|
||||||
|
CreatedTime time.Time `CreatedTime`
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package info
|
package info
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package info
|
package info
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package info
|
package info
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package info
|
package info
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 建议
|
// 建议
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package info
|
package info
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 这里主要是为了统计每个tag的note数目
|
// 这里主要是为了统计每个tag的note数目
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package info
|
package info
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package info
|
package info
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -8,5 +8,6 @@ import (
|
|||||||
type Page struct {
|
type Page struct {
|
||||||
CurPage int // 当前页码
|
CurPage int // 当前页码
|
||||||
TotalPage int // 总页
|
TotalPage int // 总页
|
||||||
|
Count int // 总记录数
|
||||||
List interface{}
|
List interface{}
|
||||||
}
|
}
|
||||||
@@ -28,8 +28,8 @@ var bodyTpl = `
|
|||||||
<div style="float:left; height: 40px;">
|
<div style="float:left; height: 40px;">
|
||||||
<a href="http://leanote.com" style="font-size: 24px">leanote</a>
|
<a href="http://leanote.com" style="font-size: 24px">leanote</a>
|
||||||
</div>
|
</div>
|
||||||
<div style="float:left; height:40px; line-height:16px;">
|
<div style="float:left; height:40px; line-height:40px;">
|
||||||
| <span style="font-size:24px">$title</span>
|
| <span style="font-size:14px">$title</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="clear:both"></div>
|
<div style="clear:both"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -50,7 +50,7 @@ var bodyTpl = `
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<a href="http://leanote.com">leanote</a>, your own cloud note
|
<a href="http://leanote.com">leanote</a>, your own cloud note!
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
@@ -78,6 +78,7 @@ func SendEmail(to, subject, title, body string) bool {
|
|||||||
err := smtp.SendMail(host+":"+port, auth, username, send_to, msg)
|
err := smtp.SendMail(host+":"+port, auth, username, send_to, msg)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Log(err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -30,6 +30,16 @@ func GetFilename(path string) string {
|
|||||||
return filepath.Base(path)
|
return filepath.Base(path)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// file size
|
||||||
|
// length in bytes
|
||||||
|
func GetFilesize(path string) int64 {
|
||||||
|
fileinfo, err := os.Stat(path)
|
||||||
|
if err == nil {
|
||||||
|
return fileinfo.Size()
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// 清空dir下所有的文件和文件夹
|
// 清空dir下所有的文件和文件夹
|
||||||
// RemoveAll会清空本文件夹, 所以还要创建之
|
// RemoveAll会清空本文件夹, 所以还要创建之
|
||||||
func ClearDir(dir string) bool {
|
func ClearDir(dir string) bool {
|
||||||
@@ -42,4 +52,14 @@ func ClearDir(dir string) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// list dir's all file, return filenames
|
||||||
|
func ListDir(dir string) []string {
|
||||||
|
f, err := os.Open(dir)
|
||||||
|
if err != nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
names, _ := f.Readdirnames(0)
|
||||||
|
return names
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"io"
|
"io"
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
"time"
|
"time"
|
||||||
math_rand "math/rand"
|
math_rand "math/rand"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package service
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/leanote/leanote/app/info"
|
||||||
|
// . "github.com/leanote/leanote/app/lea"
|
||||||
|
"github.com/leanote/leanote/app/db"
|
||||||
|
"gopkg.in/mgo.v2/bson"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
const IMAGE_TYPE = 0
|
||||||
|
|
||||||
|
type AlbumService struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
// add album
|
||||||
|
func (this *AlbumService) AddAlbum(album info.Album) bool {
|
||||||
|
album.CreatedTime = time.Now()
|
||||||
|
album.Type = IMAGE_TYPE
|
||||||
|
return db.Insert(db.Albums, album)
|
||||||
|
}
|
||||||
|
|
||||||
|
// get albums
|
||||||
|
func (this *AlbumService) GetAlbums(userId string) []info.Album {
|
||||||
|
albums := []info.Album{}
|
||||||
|
db.ListByQ(db.Albums, bson.M{"UserId": bson.ObjectIdHex(userId)}, &albums)
|
||||||
|
return albums
|
||||||
|
}
|
||||||
|
|
||||||
|
// delete album
|
||||||
|
// presupposition: has no images under this ablum
|
||||||
|
func (this *AlbumService) DeleteAlbum(userId, albumId string) (bool, string) {
|
||||||
|
if db.Count(db.Files, bson.M{"AlbumId": bson.ObjectIdHex(albumId),
|
||||||
|
"UserId": bson.ObjectIdHex(userId),
|
||||||
|
}) == 0 {
|
||||||
|
return db.DeleteByIdAndUserId(db.Albums, albumId, userId), ""
|
||||||
|
}
|
||||||
|
return false, "has images"
|
||||||
|
}
|
||||||
|
|
||||||
|
// update album name
|
||||||
|
func (this *AlbumService) UpdateAlbum(albumId, userId, name string) bool {
|
||||||
|
return db.UpdateByIdAndUserIdField(db.Albums, albumId, userId, "Name", name)
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
// "github.com/leanote/leanote/app/db"
|
// "github.com/leanote/leanote/app/db"
|
||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
"github.com/revel/revel"
|
"github.com/revel/revel"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
"github.com/leanote/leanote/app/db"
|
"github.com/leanote/leanote/app/db"
|
||||||
// . "github.com/leanote/leanote/app/lea"
|
// . "github.com/leanote/leanote/app/lea"
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
// "time"
|
// "time"
|
||||||
// "sort"
|
// "sort"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
package service
|
||||||
|
|
||||||
|
import (
|
||||||
|
// . "github.com/leanote/leanote/app/lea"
|
||||||
|
"github.com/revel/revel"
|
||||||
|
"github.com/leanote/leanote/app/info"
|
||||||
|
"github.com/leanote/leanote/app/db"
|
||||||
|
"gopkg.in/mgo.v2/bson"
|
||||||
|
"time"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
|
const DEFAULT_ALBUM_ID = "52d3e8ac99c37b7f0d000001"
|
||||||
|
|
||||||
|
type FileService struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
// add Image
|
||||||
|
func (this *FileService) AddImage(image info.File, albumId, userId string) bool {
|
||||||
|
image.CreatedTime = time.Now()
|
||||||
|
if albumId != "" {
|
||||||
|
image.AlbumId = bson.ObjectIdHex(albumId)
|
||||||
|
} else {
|
||||||
|
image.AlbumId = bson.ObjectIdHex(DEFAULT_ALBUM_ID)
|
||||||
|
image.IsDefaultAlbum = true
|
||||||
|
}
|
||||||
|
image.UserId = bson.ObjectIdHex(userId)
|
||||||
|
|
||||||
|
return db.Insert(db.Files, image)
|
||||||
|
}
|
||||||
|
|
||||||
|
// list images
|
||||||
|
// if albumId == "" get default album images
|
||||||
|
func (this *FileService) ListImagesWithPage(userId, albumId, key string, pageNumber, pageSize int) info.Page {
|
||||||
|
skipNum, sortFieldR := parsePageAndSort(pageNumber, pageSize, "CreatedTime", false)
|
||||||
|
files := []info.File{}
|
||||||
|
|
||||||
|
q := bson.M{"UserId": bson.ObjectIdHex(userId)}
|
||||||
|
if albumId != "" {
|
||||||
|
q["AlbumId"] = bson.ObjectIdHex(albumId);
|
||||||
|
} else {
|
||||||
|
q["IsDefaultAlbum"] = true
|
||||||
|
}
|
||||||
|
if key != "" {
|
||||||
|
q["Title"] = bson.M{"$regex": bson.RegEx{".*?" + key + ".*", "i"}}
|
||||||
|
}
|
||||||
|
|
||||||
|
// LogJ(q)
|
||||||
|
|
||||||
|
count := db.Count(db.Files, q);
|
||||||
|
|
||||||
|
db.Files.
|
||||||
|
Find(q).
|
||||||
|
Sort(sortFieldR).
|
||||||
|
Skip(skipNum).
|
||||||
|
Limit(pageSize).
|
||||||
|
All(&files)
|
||||||
|
|
||||||
|
return info.Page{Count: count, List: files}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *FileService) UpdateImageTitle(userId, fileId, title string) bool {
|
||||||
|
return db.UpdateByIdAndUserIdField(db.Files, fileId, userId, "Title", title)
|
||||||
|
}
|
||||||
|
|
||||||
|
// get all images names
|
||||||
|
// for upgrade
|
||||||
|
func (this *FileService) GetAllImageNamesMap(userId string) (m map[string]bool) {
|
||||||
|
q := bson.M{"UserId": bson.ObjectIdHex(userId)}
|
||||||
|
files := []info.File{}
|
||||||
|
db.ListByQWithFields(db.Files, q, []string{"Name"}, &files)
|
||||||
|
|
||||||
|
m = make(map[string]bool)
|
||||||
|
if len(files) == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, file := range files {
|
||||||
|
m[file.Name] = true
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// delete image
|
||||||
|
func (this *FileService) DeleteImage(userId, fileId string) (bool, string) {
|
||||||
|
file := info.File{}
|
||||||
|
db.GetByIdAndUserId(db.Files, fileId, userId, &file)
|
||||||
|
|
||||||
|
if(file.FileId != "") {
|
||||||
|
if db.DeleteByIdAndUserId(db.Files, fileId, userId) {
|
||||||
|
// delete image
|
||||||
|
err := os.Remove(revel.BasePath + "/public/" + file.Path)
|
||||||
|
if err == nil {
|
||||||
|
return true, ""
|
||||||
|
}
|
||||||
|
return false, "delete file error!"
|
||||||
|
}
|
||||||
|
return false, "db error"
|
||||||
|
}
|
||||||
|
return false, "no such item"
|
||||||
|
}
|
||||||
|
|
||||||
|
// update image title
|
||||||
|
func (this *FileService) UpdateImage(userId, fileId, title string) bool {
|
||||||
|
return db.UpdateByIdAndUserIdField(db.Files, fileId, userId, "Title", title)
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
"github.com/leanote/leanote/app/db"
|
"github.com/leanote/leanote/app/db"
|
||||||
// . "github.com/leanote/leanote/app/lea"
|
// . "github.com/leanote/leanote/app/lea"
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
// "time"
|
// "time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
"github.com/leanote/leanote/app/db"
|
"github.com/leanote/leanote/app/db"
|
||||||
. "github.com/leanote/leanote/app/lea"
|
. "github.com/leanote/leanote/app/lea"
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package service
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
// "fmt"
|
// "fmt"
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
"github.com/leanote/leanote/app/db"
|
"github.com/leanote/leanote/app/db"
|
||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
// . "github.com/leanote/leanote/app/lea"
|
// . "github.com/leanote/leanote/app/lea"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
"github.com/leanote/leanote/app/db"
|
"github.com/leanote/leanote/app/db"
|
||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
. "github.com/leanote/leanote/app/lea"
|
. "github.com/leanote/leanote/app/lea"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
"github.com/leanote/leanote/app/db"
|
"github.com/leanote/leanote/app/db"
|
||||||
// . "github.com/leanote/leanote/app/lea"
|
// . "github.com/leanote/leanote/app/lea"
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
"time"
|
"time"
|
||||||
"sort"
|
"sort"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
"github.com/leanote/leanote/app/db"
|
"github.com/leanote/leanote/app/db"
|
||||||
// . "github.com/leanote/leanote/app/lea"
|
// . "github.com/leanote/leanote/app/lea"
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
// "time"
|
// "time"
|
||||||
// "sort"
|
// "sort"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
"github.com/leanote/leanote/app/db"
|
"github.com/leanote/leanote/app/db"
|
||||||
. "github.com/leanote/leanote/app/lea"
|
. "github.com/leanote/leanote/app/lea"
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
// "time"
|
// "time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
"github.com/leanote/leanote/app/db"
|
"github.com/leanote/leanote/app/db"
|
||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
. "github.com/leanote/leanote/app/lea"
|
. "github.com/leanote/leanote/app/lea"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
"github.com/leanote/leanote/app/db"
|
"github.com/leanote/leanote/app/db"
|
||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"github.com/leanote/leanote/app/info"
|
"github.com/leanote/leanote/app/info"
|
||||||
"github.com/leanote/leanote/app/db"
|
"github.com/leanote/leanote/app/db"
|
||||||
. "github.com/leanote/leanote/app/lea"
|
. "github.com/leanote/leanote/app/lea"
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
"time"
|
"time"
|
||||||
"strings"
|
"strings"
|
||||||
"fmt"
|
"fmt"
|
||||||
@@ -208,11 +208,11 @@ func (this *UserService) UpdateEmailSendActiveEmail(userId, email string) (ok bo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 发送邮件
|
// 发送邮件
|
||||||
url := "http://115.28.133.226/user/updateEmail?token=" + token
|
url := "http://leanote.com/user/updateEmail?token=" + token
|
||||||
body := "邮箱验证后您的登录邮箱为: <b>" + email + "</b><br />";
|
body := "邮箱验证后您的登录邮箱为: <b>" + email + "</b><br />";
|
||||||
body += fmt.Sprintf("请点击链接验证邮箱: <a href='%v'>%v</a>. %v小时后过期.", url, url, tokenService.GetOverHours(info.TokenUpdateEmail));
|
body += fmt.Sprintf("请点击链接验证邮箱: <a href='%v'>%v</a>. %v小时后过期.", url, url, tokenService.GetOverHours(info.TokenUpdateEmail));
|
||||||
if !SendEmail(email, "leanote-验证邮箱", "验证邮箱", body) {
|
if !SendEmail(email, "leanote-验证邮箱", "验证邮箱", body) {
|
||||||
msg = "发送失败"
|
msg = "发送失败, 该邮箱存在?"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ok = true
|
ok = true
|
||||||
@@ -291,4 +291,4 @@ func (this *UserService)UpdateColumnWidth(userId string, notebookWidth, noteList
|
|||||||
// 左侧是否隐藏
|
// 左侧是否隐藏
|
||||||
func (this *UserService)UpdateLeftIsMin(userId string, leftIsMin bool) bool {
|
func (this *UserService)UpdateLeftIsMin(userId string, leftIsMin bool) bool {
|
||||||
return db.UpdateByQMap(db.Users, bson.M{"_id": bson.ObjectIdHex(userId)}, bson.M{"LeftIsMin": leftIsMin})
|
return db.UpdateByQMap(db.Users, bson.M{"_id": bson.ObjectIdHex(userId)}, bson.M{"LeftIsMin": leftIsMin})
|
||||||
}
|
}
|
||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
"github.com/leanote/leanote/app/lea/html2image"
|
"github.com/leanote/leanote/app/lea/html2image"
|
||||||
"time"
|
"time"
|
||||||
"fmt"
|
"fmt"
|
||||||
"labix.org/v2/mgo/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
// "labix.org/v2/mgo"
|
// "gopkg.in/mgo.v2"
|
||||||
// "encoding/json"
|
// "encoding/json"
|
||||||
// "strings"
|
// "strings"
|
||||||
)
|
)
|
||||||
@@ -181,8 +181,15 @@ make<br>make --- install</pre>
|
|||||||
`, "/Users/life/Desktop/a.png")
|
`, "/Users/life/Desktop/a.png")
|
||||||
fmt.Printf("time cost %v\n", time.Now().Sub(start))
|
fmt.Printf("time cost %v\n", time.Now().Sub(start))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func testLea() {
|
||||||
|
names := ListDir("/Users/life/Documents/Go/package/src/leanote")
|
||||||
|
fmt.Println(names);
|
||||||
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
revel.BasePath = "/Users/life/Documents/Go/package/src/leanote"
|
revel.BasePath = "/Users/life/Documents/Go/package/src/leanote"
|
||||||
|
testLea();
|
||||||
// a, b := SplitFilename("http://ab/c/a.gif#??")
|
// a, b := SplitFilename("http://ab/c/a.gif#??")
|
||||||
// println(a)
|
// println(a)
|
||||||
// println(b)
|
// println(b)
|
||||||
@@ -199,7 +206,7 @@ func main() {
|
|||||||
//_, err := mgo.Dial("mongodb://leanote:nKFAkxKnWkEQy8Vv2LlM@115.28.133.226:27017/leanote")
|
//_, err := mgo.Dial("mongodb://leanote:nKFAkxKnWkEQy8Vv2LlM@115.28.133.226:27017/leanote")
|
||||||
|
|
||||||
// testNotebookService();
|
// testNotebookService();
|
||||||
testNoteService();
|
// testNoteService();
|
||||||
// testShareService()
|
// testShareService()
|
||||||
// testAuthService()
|
// testAuthService()
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ function log(o) {
|
|||||||
<li class="{{if .index}}active{{end}}"><a href="/blog/{{$username}}">{{msg . "home"}}</a></li>
|
<li class="{{if .index}}active{{end}}"><a href="/blog/{{$username}}">{{msg . "home"}}</a></li>
|
||||||
{{range .notebooks}}
|
{{range .notebooks}}
|
||||||
{{$notebookId := .NotebookId.Hex}}
|
{{$notebookId := .NotebookId.Hex}}
|
||||||
<li class="{{if eq $navNotebookId $notebookId}}active{{else}}{{end}}">
|
<li class="{{if $navNotebookId}}{{if eq $navNotebookId $notebookId}}active{{else}}{{end}}{{end}}">
|
||||||
<a href="/blog/{{$username}}/{{$notebookId}}"
|
<a href="/blog/{{$username}}/{{$notebookId}}"
|
||||||
>{{.Title}}</a>
|
>{{.Title}}</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -166,19 +166,17 @@
|
|||||||
$(function() {
|
$(function() {
|
||||||
tinymce.init({
|
tinymce.init({
|
||||||
selector : "#AboutMe",
|
selector : "#AboutMe",
|
||||||
content_css : [ "/css/bootstrap.css", "/css/editor.css" ],
|
content_css : [ "/css/bootstrap.css", "/css/editor/editor.css" ],
|
||||||
skin : "custom",
|
skin : "custom",
|
||||||
language : "zh_CN",
|
language : "{{.locale}}",
|
||||||
height : 300,
|
height : 300,
|
||||||
width : "100%",
|
width : "100%",
|
||||||
|
skin : "custom",
|
||||||
plugins : [
|
plugins : [
|
||||||
"advlist autolink link image lists charmap hr ",
|
"advlist autolink link leanote_image lists charmap hr ",
|
||||||
"searchreplace visualblocks visualchars code tabfocus",
|
"searchreplace visualblocks visualchars leanote_code tabfocus",
|
||||||
"table contextmenu directionality textcolor paste fullpage textcolor" ],
|
"table contextmenu directionality textcolor paste fullpage textcolor"],
|
||||||
|
toolbar1 : "formatselect |fontselect fontsizeselect| forecolor backcolor | bold italic underline strikethrough | bullist numlist |",
|
||||||
toolbar1 : "formatselect fontselect fontsizeselect | forecolor backcolor | bold italic underline strikethrough | image | bullist numlist | alignleft aligncenter alignright alignjustify",
|
|
||||||
toolbar2 : "outdent indent blockquote | link unlink | table | hr removeformat | subscript superscript | visualchars visualblocks | searchreplace | code",
|
|
||||||
|
|
||||||
menubar : false,
|
menubar : false,
|
||||||
toolbar_items_size : 'small',
|
toolbar_items_size : 'small',
|
||||||
statusbar : false,
|
statusbar : false,
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ function log(o) {
|
|||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<h1>
|
<h1>
|
||||||
<a href="/index">
|
<a href="/index">
|
||||||
<img src="/images/logo.png" id="" style="height: 40px" title="leanote, Your own cloud note!"/>
|
<img src="/images/logo/leanote_black.png" id="" style="height: 50px" title="leanote, Your own cloud note!"/>
|
||||||
</a>
|
</a>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
@@ -48,7 +48,9 @@ function log(o) {
|
|||||||
<ul id="blogNav" class="pull-right">
|
<ul id="blogNav" class="pull-right">
|
||||||
<li><a href="/index#" target="body" class="smooth-scroll">{{msg . "home"}}</a></li>
|
<li><a href="/index#" target="body" class="smooth-scroll">{{msg . "home"}}</a></li>
|
||||||
<li><a href="/index#aboutLeanote" target="#aboutLeanote" class="smooth-scroll">{{msg . "aboutLeanote"}}</a> </li>
|
<li><a href="/index#aboutLeanote" target="#aboutLeanote" class="smooth-scroll">{{msg . "aboutLeanote"}}</a> </li>
|
||||||
|
<li><a href="/index#download" target="#download" class="smooth-scroll">{{msg . "download"}}</a> </li>
|
||||||
<li><a id="leanoteBlog" href="http://leanote.com/blog/leanote" target="_blank" class="">{{msg . "leanoteBlog"}}</a></li>
|
<li><a id="leanoteBlog" href="http://leanote.com/blog/leanote" target="_blank" class="">{{msg . "leanoteBlog"}}</a></li>
|
||||||
|
<li><a href="https://groups.google.com/forum/?fromgroups#!forum/leanote" target="_blank" class="">{{msg . "discussion"}}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,18 +4,19 @@
|
|||||||
</style>
|
</style>
|
||||||
<section>
|
<section>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h2>leanote, your own cloud note!</h2>
|
<h2>leanote, {{msg . "moto"}}</h2>
|
||||||
<p>Knowledge, Sharing, Cooperation, Blog... all just in leanote</p>
|
<p>{{msg . "moto3"}}</p>
|
||||||
|
<p>{{msg . "moto2"}}</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<a class="btn btn-primary" href="https://github.com/leanote/leanote">Fork leanote on Github</a>
|
<a class="btn btn-primary" href="https://github.com/leanote/leanote">{{msg . "fork github"}}</a>
|
||||||
|
|
||||||
|
|
||||||
<a class="btn btn-default" href="/demo">Try it</a>
|
<a class="btn btn-default" href="/demo">{{msg . "try"}}</a>
|
||||||
{{if .openRegister}}
|
{{if .openRegister}}
|
||||||
|
|
||||||
|
|
||||||
OR
|
OR
|
||||||
|
|
||||||
|
|
||||||
<a class="btn btn-default" href="/register">{{msg . "register"}}</a>
|
<a class="btn btn-default" href="/register">{{msg . "register"}}</a>
|
||||||
@@ -61,6 +62,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="container" id="download">
|
||||||
|
<h2 style="margin: 20px 0;text-align: center;">{{msg . "download"}}</h2>
|
||||||
|
<div class="row">
|
||||||
|
<div style="width:300px; margin:auto; padding: 10px;">
|
||||||
|
Linux: <a href="https://github.com/leanote/leanote/releases/download/0.3/leanote-linux-v0.3.bin.tar.gz">leanote-linux-v0.3.bin.tar.gz</a> <br />
|
||||||
|
MacOS X: <a href="https://github.com/leanote/leanote/releases/download/0.3/leanote-mac-v0.3.bin.tar.gz">leanote-mac-v0.3.bin.tar.gz</a> <br />
|
||||||
|
<br />
|
||||||
|
<a href="https://github.com/leanote/leanote#3-how-to-install-leanote">{{msg . "howToInstallLeanote"}}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{template "home/footer.html"}}
|
{{template "home/footer.html"}}
|
||||||
|
|
||||||
<script src="/js/jquery-1.9.0.min.js"></script>
|
<script src="/js/jquery-1.9.0.min.js"></script>
|
||||||
|
|||||||
@@ -41,17 +41,17 @@ function log(o) {
|
|||||||
<!-- <div id="headerContainer"> -->
|
<!-- <div id="headerContainer"> -->
|
||||||
<div id="header">
|
<div id="header">
|
||||||
|
|
||||||
<!-- <div id="headerLeft" class="pull-left">
|
<!--
|
||||||
</div>
|
<div id="headerLeft" class="pull-left">
|
||||||
|
</div>
|
||||||
-->
|
-->
|
||||||
<div id="logo" class="pull-left">
|
<div id="logo" class="pull-left">
|
||||||
<span>lea</span>note
|
<!--<span>lea</span>note -->
|
||||||
<!-- <img style="height: 45px;" src="/images/logo.png" title="leanote, 不一样的笔记" alt="leanote">
|
<!--<img style="height: 45px;" src="/images/logo/leanote_white.png" title="leanote, 不一样的笔记" alt="leanote">-->
|
||||||
-->
|
|
||||||
</div>
|
</div>
|
||||||
<div id="switcher" class="pull-left">
|
<div id="switcher" class="pull-left">
|
||||||
<i class="fa fa-align-justify" id="leftSwitcher" title="{{msg . "leftHidden"}}"></i>
|
<i class="fa fa-align-justify" id="leftSwitcher" title="{{msg . "leftHidden"}}"></i>
|
||||||
<span id="leftSwitcher2" title="{{msg . "leftShow"}}">lea</span>
|
<span id="leftSwitcher2" title="{{msg . "leftShow"}}"></span>
|
||||||
</div>
|
</div>
|
||||||
<!-- search -->
|
<!-- search -->
|
||||||
<div class="pull-left" id="searchWrap">
|
<div class="pull-left" id="searchWrap">
|
||||||
@@ -450,8 +450,9 @@ function log(o) {
|
|||||||
<li role="presentation"><span class="label label-green">{{msg . "green"}}</span></li>
|
<li role="presentation"><span class="label label-green">{{msg . "green"}}</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ul class="pull-right" id="editorTool">
|
<ul class="pull-right" id="editorTool">
|
||||||
<li><a class="ios7-a " id="saveBtn" title="ctrl+s"
|
<li><a class="ios7-a " id="saveBtn" title="ctrl+s"
|
||||||
@@ -487,6 +488,17 @@ function log(o) {
|
|||||||
<div id="leanoteNavContent">
|
<div id="leanoteNavContent">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- leaui image -->
|
||||||
|
<form id="upload" method="post" action="/file/uploadImageLeaui" enctype="multipart/form-data" style="margin-top: 5px;">
|
||||||
|
<div id="drop">
|
||||||
|
Drop images to here
|
||||||
|
<input type="file" name="file" multiple style="display: none"/>
|
||||||
|
</div>
|
||||||
|
<ul id="uploadMsg">
|
||||||
|
</ul>
|
||||||
|
</form>
|
||||||
|
|
||||||
<!-- 由此可以算高度 -->
|
<!-- 由此可以算高度 -->
|
||||||
<div id="editorContent" name="editorContent" tabindex="2" />
|
<div id="editorContent" name="editorContent" tabindex="2" />
|
||||||
{{.noteContent}}
|
{{.noteContent}}
|
||||||
@@ -512,8 +524,8 @@ function log(o) {
|
|||||||
</div>
|
</div>
|
||||||
<textarea id="md-section-helper"></textarea>
|
<textarea id="md-section-helper"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- for test -->
|
||||||
|
|
||||||
<!-- mdEditor -->
|
<!-- mdEditor -->
|
||||||
<!-- Hidden Popup Modal -->
|
<!-- Hidden Popup Modal -->
|
||||||
<div class="modal fade bs-modal-sm" id="editorDialog" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
<div class="modal fade bs-modal-sm" id="editorDialog" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
||||||
@@ -834,7 +846,7 @@ function log(o) {
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<button id="pwdBtn" class="btn btn-success" style="width: 100%">{{msg . "submit"}}</button>
|
<button id="pwdBtn" class="btn btn-success">{{msg . "submit"}}</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -928,7 +940,7 @@ LEA.locale = "{{.locale}}";
|
|||||||
<script src="/js/jQuery-slimScroll-1.3.0/jquery.slimscroll.js"></script>
|
<script src="/js/jQuery-slimScroll-1.3.0/jquery.slimscroll.js"></script>
|
||||||
<script src="js/app/page.js"></script>
|
<script src="js/app/page.js"></script>
|
||||||
|
|
||||||
<script src="tinymce/tinymce.min.js"></script>
|
<script src="tinymce/tinymce.js"></script>
|
||||||
<script src="js/jquery-cookie-min.js"></script>
|
<script src="js/jquery-cookie-min.js"></script>
|
||||||
<script src="js/bootstrap-min.js"></script>
|
<script src="js/bootstrap-min.js"></script>
|
||||||
<script src="js/app/note.js"></script>
|
<script src="js/app/note.js"></script>
|
||||||
@@ -950,8 +962,12 @@ Note.setNoteCache(noteContentJson);
|
|||||||
Note.renderNoteContent(noteContentJson)
|
Note.renderNoteContent(noteContentJson)
|
||||||
|
|
||||||
Tag.renderTagNav(tagsJson);
|
Tag.renderTagNav(tagsJson);
|
||||||
|
|
||||||
|
// init notebook后才调用
|
||||||
|
initSlimScroll();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<!-- mdEditor -->
|
<!-- mdEditor -->
|
||||||
<link href="/public/mdeditor/editor/editor.css" rel="stylesheet">
|
<link href="/public/mdeditor/editor/editor.css" rel="stylesheet">
|
||||||
<script src="/public/mdeditor/editor/pagedown/Markdown.Converter-min.js"></script>
|
<script src="/public/mdeditor/editor/pagedown/Markdown.Converter-min.js"></script>
|
||||||
@@ -966,7 +982,7 @@ Tag.renderTagNav(tagsJson);
|
|||||||
MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ["\\(","\\)"]], processEscapes: true }, messageStyle: "none"});
|
MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ["\\(","\\)"]], processEscapes: true }, messageStyle: "none"});
|
||||||
</script>
|
</script>
|
||||||
<script src="/public/mdeditor/editor/mathJax-min.js"></script>
|
<script src="/public/mdeditor/editor/mathJax-min.js"></script>
|
||||||
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
<script src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||||
<script src="/public/mdeditor/editor/jquery.waitforimages-min.js"></script>
|
<script src="/public/mdeditor/editor/jquery.waitforimages-min.js"></script>
|
||||||
<script src="/public/mdeditor/editor/google-code-prettify/prettify.js"></script>
|
<script src="/public/mdeditor/editor/google-code-prettify/prettify.js"></script>
|
||||||
<script src="/public/mdeditor/editor/editor.js"></script>
|
<script src="/public/mdeditor/editor/editor.js"></script>
|
||||||
@@ -975,5 +991,23 @@ Tag.renderTagNav(tagsJson);
|
|||||||
<!-- context-menu -->
|
<!-- context-menu -->
|
||||||
<link rel="stylesheet" href="/js/contextmenu/css/contextmenu.css" type="text/css" />
|
<link rel="stylesheet" href="/js/contextmenu/css/contextmenu.css" type="text/css" />
|
||||||
<script src="/js/contextmenu/jquery.contextmenu.js"></script>
|
<script src="/js/contextmenu/jquery.contextmenu.js"></script>
|
||||||
|
|
||||||
|
<!-- version 2.0 -->
|
||||||
|
<script src="/js/require.js"></script>
|
||||||
|
<script>
|
||||||
|
require.config({
|
||||||
|
baseUrl: '/public',
|
||||||
|
paths: {
|
||||||
|
// 'jquery': 'js/jquery-1.9.0.min',
|
||||||
|
'leaui_image': 'tinymce/plugins/leaui_image/public/js/for_editor',
|
||||||
|
'jquery.ui.widget': 'tinymce/plugins/leaui_image/public/js/jquery.ui.widget',
|
||||||
|
'fileupload': '/tinymce/plugins/leaui_image/public/js/jquery.fileupload'
|
||||||
|
},
|
||||||
|
shim: {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
require(['leaui_image'], function(leaui_image) {
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -41,17 +41,17 @@ function log(o) {
|
|||||||
<!-- <div id="headerContainer"> -->
|
<!-- <div id="headerContainer"> -->
|
||||||
<div id="header">
|
<div id="header">
|
||||||
|
|
||||||
<!-- <div id="headerLeft" class="pull-left">
|
<!--
|
||||||
</div>
|
<div id="headerLeft" class="pull-left">
|
||||||
|
</div>
|
||||||
-->
|
-->
|
||||||
<div id="logo" class="pull-left">
|
<div id="logo" class="pull-left">
|
||||||
<span>lea</span>note
|
<!--<span>lea</span>note -->
|
||||||
<!-- <img style="height: 45px;" src="/images/logo.png" title="leanote, 不一样的笔记" alt="leanote">
|
<!--<img style="height: 45px;" src="/images/logo/leanote_white.png" title="leanote, 不一样的笔记" alt="leanote">-->
|
||||||
-->
|
|
||||||
</div>
|
</div>
|
||||||
<div id="switcher" class="pull-left">
|
<div id="switcher" class="pull-left">
|
||||||
<i class="fa fa-align-justify" id="leftSwitcher" title="{{msg . "leftHidden"}}"></i>
|
<i class="fa fa-align-justify" id="leftSwitcher" title="{{msg . "leftHidden"}}"></i>
|
||||||
<span id="leftSwitcher2" title="{{msg . "leftShow"}}">lea</span>
|
<span id="leftSwitcher2" title="{{msg . "leftShow"}}"></span>
|
||||||
</div>
|
</div>
|
||||||
<!-- search -->
|
<!-- search -->
|
||||||
<div class="pull-left" id="searchWrap">
|
<div class="pull-left" id="searchWrap">
|
||||||
@@ -450,8 +450,9 @@ function log(o) {
|
|||||||
<li role="presentation"><span class="label label-green">{{msg . "green"}}</span></li>
|
<li role="presentation"><span class="label label-green">{{msg . "green"}}</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ul class="pull-right" id="editorTool">
|
<ul class="pull-right" id="editorTool">
|
||||||
<li><a class="ios7-a " id="saveBtn" title="ctrl+s"
|
<li><a class="ios7-a " id="saveBtn" title="ctrl+s"
|
||||||
@@ -487,6 +488,17 @@ function log(o) {
|
|||||||
<div id="leanoteNavContent">
|
<div id="leanoteNavContent">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- leaui image -->
|
||||||
|
<form id="upload" method="post" action="/file/uploadImageLeaui" enctype="multipart/form-data" style="margin-top: 5px;">
|
||||||
|
<div id="drop">
|
||||||
|
Drop images to here
|
||||||
|
<input type="file" name="file" multiple style="display: none"/>
|
||||||
|
</div>
|
||||||
|
<ul id="uploadMsg">
|
||||||
|
</ul>
|
||||||
|
</form>
|
||||||
|
|
||||||
<!-- 由此可以算高度 -->
|
<!-- 由此可以算高度 -->
|
||||||
<div id="editorContent" name="editorContent" tabindex="2" />
|
<div id="editorContent" name="editorContent" tabindex="2" />
|
||||||
{{.noteContent}}
|
{{.noteContent}}
|
||||||
@@ -512,8 +524,8 @@ function log(o) {
|
|||||||
</div>
|
</div>
|
||||||
<textarea id="md-section-helper"></textarea>
|
<textarea id="md-section-helper"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- for test -->
|
||||||
|
|
||||||
<!-- mdEditor -->
|
<!-- mdEditor -->
|
||||||
<!-- Hidden Popup Modal -->
|
<!-- Hidden Popup Modal -->
|
||||||
<div class="modal fade bs-modal-sm" id="editorDialog" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
<div class="modal fade bs-modal-sm" id="editorDialog" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
||||||
@@ -834,7 +846,7 @@ function log(o) {
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<button id="pwdBtn" class="btn btn-success" style="width: 100%">{{msg . "submit"}}</button>
|
<button id="pwdBtn" class="btn btn-success">{{msg . "submit"}}</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -928,7 +940,7 @@ LEA.locale = "{{.locale}}";
|
|||||||
<script src="/js/jQuery-slimScroll-1.3.0/jquery.slimscroll.js"></script>
|
<script src="/js/jQuery-slimScroll-1.3.0/jquery.slimscroll.js"></script>
|
||||||
<script src="js/app/page-min.js"></script>
|
<script src="js/app/page-min.js"></script>
|
||||||
|
|
||||||
<script src="tinymce/tinymce.min.js"></script>
|
<script src="tinymce/tinymce.js"></script>
|
||||||
<script src="js/jquery-cookie-min.js"></script>
|
<script src="js/jquery-cookie-min.js"></script>
|
||||||
<script src="js/bootstrap-min.js"></script>
|
<script src="js/bootstrap-min.js"></script>
|
||||||
<script src="js/app/note-min.js"></script>
|
<script src="js/app/note-min.js"></script>
|
||||||
@@ -950,8 +962,12 @@ Note.setNoteCache(noteContentJson);
|
|||||||
Note.renderNoteContent(noteContentJson)
|
Note.renderNoteContent(noteContentJson)
|
||||||
|
|
||||||
Tag.renderTagNav(tagsJson);
|
Tag.renderTagNav(tagsJson);
|
||||||
|
|
||||||
|
// init notebook后才调用
|
||||||
|
initSlimScroll();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<!-- mdEditor -->
|
<!-- mdEditor -->
|
||||||
<link href="/public/mdeditor/editor/editor.css" rel="stylesheet">
|
<link href="/public/mdeditor/editor/editor.css" rel="stylesheet">
|
||||||
<script src="/public/mdeditor/editor/pagedown/Markdown.Converter-min.js"></script>
|
<script src="/public/mdeditor/editor/pagedown/Markdown.Converter-min.js"></script>
|
||||||
@@ -966,7 +982,7 @@ Tag.renderTagNav(tagsJson);
|
|||||||
MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ["\\(","\\)"]], processEscapes: true }, messageStyle: "none"});
|
MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ["\\(","\\)"]], processEscapes: true }, messageStyle: "none"});
|
||||||
</script>
|
</script>
|
||||||
<script src="/public/mdeditor/editor/mathJax-min.js"></script>
|
<script src="/public/mdeditor/editor/mathJax-min.js"></script>
|
||||||
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
<script src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||||
<script src="/public/mdeditor/editor/jquery.waitforimages-min.js"></script>
|
<script src="/public/mdeditor/editor/jquery.waitforimages-min.js"></script>
|
||||||
<script src="/public/mdeditor/editor/google-code-prettify/prettify.js"></script>
|
<script src="/public/mdeditor/editor/google-code-prettify/prettify.js"></script>
|
||||||
<script src="/public/mdeditor/editor/editor-min.js"></script>
|
<script src="/public/mdeditor/editor/editor-min.js"></script>
|
||||||
@@ -975,5 +991,23 @@ Tag.renderTagNav(tagsJson);
|
|||||||
<!-- context-menu -->
|
<!-- context-menu -->
|
||||||
<link rel="stylesheet" href="/js/contextmenu/css/contextmenu.css" type="text/css" />
|
<link rel="stylesheet" href="/js/contextmenu/css/contextmenu.css" type="text/css" />
|
||||||
<script src="/js/contextmenu/jquery.contextmenu-min.js"></script>
|
<script src="/js/contextmenu/jquery.contextmenu-min.js"></script>
|
||||||
|
|
||||||
|
<!-- version 2.0 -->
|
||||||
|
<script src="/js/require.js"></script>
|
||||||
|
<script>
|
||||||
|
require.config({
|
||||||
|
baseUrl: '/public',
|
||||||
|
paths: {
|
||||||
|
// 'jquery': 'js/jquery-1.9.0.min',
|
||||||
|
'leaui_image': 'tinymce/plugins/leaui_image/public/js/for_editor',
|
||||||
|
'jquery.ui.widget': 'tinymce/plugins/leaui_image/public/js/jquery.ui.widget',
|
||||||
|
'fileupload': '/tinymce/plugins/leaui_image/public/js/jquery.fileupload'
|
||||||
|
},
|
||||||
|
shim: {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
require(['leaui_image'], function(leaui_image) {
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -21,6 +21,13 @@ cp ./bin/run.sh $tmp/leanote/bin/
|
|||||||
|
|
||||||
# views
|
# views
|
||||||
cp -r ./app/views $tmp/leanote/app
|
cp -r ./app/views $tmp/leanote/app
|
||||||
|
# 可不要
|
||||||
|
cp -r ./app/service $tmp/leanote/app/service
|
||||||
|
cp -r ./app/controllers $tmp/leanote/app/controllers
|
||||||
|
cp -r ./app/db $tmp/leanote/app/db
|
||||||
|
cp -r ./app/info $tmp/leanote/app/info
|
||||||
|
cp -r ./app/lea $tmp/leanote/app/lea
|
||||||
|
|
||||||
# conf
|
# conf
|
||||||
cp ./conf/app.conf-default $tmp/leanote/conf/app.conf
|
cp ./conf/app.conf-default $tmp/leanote/conf/app.conf
|
||||||
cp ./conf/routes-default $tmp/leanote/conf/routes
|
cp ./conf/routes-default $tmp/leanote/conf/routes
|
||||||
@@ -30,6 +37,11 @@ cp -r ./messages ./public ./mongodb_backup $tmp/leanote/
|
|||||||
|
|
||||||
# delete some files
|
# delete some files
|
||||||
rm -r $tmp/leanote/public/tinymce/classes
|
rm -r $tmp/leanote/public/tinymce/classes
|
||||||
|
rm -r $tmp/leanote/public/upload
|
||||||
|
mkdir $tmp/leanote/public/upload
|
||||||
|
rm -r $tmp/leanote/public/.codekit-cache
|
||||||
|
rm $tmp/leanote/public/.DS_Store
|
||||||
|
rm $tmp/leanote/public/config.codekit
|
||||||
|
|
||||||
# make link
|
# make link
|
||||||
cd $tmp/leanote/bin
|
cd $tmp/leanote/bin
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
# leanote
|
# leanote
|
||||||
moto=your own cloud note!
|
moto=your own cloud note!
|
||||||
|
moto2=Knowledge, Sharing, Cooperation, Blog... all in leanote
|
||||||
|
moto3=Brief But Not Simple
|
||||||
|
fork github=Fork leanote on Github
|
||||||
|
|
||||||
# 首页
|
# 首页
|
||||||
forgetPassword = Forget password?
|
forgetPassword = Forget password?
|
||||||
@@ -76,6 +79,7 @@ myNotebook=My notebook
|
|||||||
addNotebook=Add notebook
|
addNotebook=Add notebook
|
||||||
all=Newest
|
all=Newest
|
||||||
trash=Trash
|
trash=Trash
|
||||||
|
delete=Delete
|
||||||
unTitled=UnTitled
|
unTitled=UnTitled
|
||||||
defaultShare=Default sharing
|
defaultShare=Default sharing
|
||||||
leftHidden=Hidden slide bar
|
leftHidden=Hidden slide bar
|
||||||
@@ -123,5 +127,10 @@ uploadImage=Upload image
|
|||||||
aboutMe=About me
|
aboutMe=About me
|
||||||
blogSet=Set blog
|
blogSet=Set blog
|
||||||
|
|
||||||
|
# index
|
||||||
|
discussion=Discussion
|
||||||
|
download=Download
|
||||||
|
howToInstallLeanote=How to install leanote
|
||||||
|
|
||||||
# error
|
# error
|
||||||
notFound=This page cann't found.
|
notFound=This page cann't found.
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
# leanote
|
# leanote
|
||||||
moto=不一样的笔记!
|
moto=你的私人云笔记!
|
||||||
|
moto2=知识管理, 博客, 分享, 协作... 尽在leanote
|
||||||
|
moto3=简约而不简单
|
||||||
|
fork github=Github 源码
|
||||||
|
|
||||||
# 首页
|
# 首页
|
||||||
forgetPassword = 忘记密码?
|
forgetPassword = 忘记密码?
|
||||||
@@ -77,6 +80,7 @@ myNotebook=我的笔记本
|
|||||||
addNotebook=添加笔记本
|
addNotebook=添加笔记本
|
||||||
all=最新
|
all=最新
|
||||||
trash=废纸篓
|
trash=废纸篓
|
||||||
|
delete=删除
|
||||||
unTitled=无标题
|
unTitled=无标题
|
||||||
defaultShare=默认共享
|
defaultShare=默认共享
|
||||||
leftHidden=隐藏左侧
|
leftHidden=隐藏左侧
|
||||||
@@ -127,6 +131,10 @@ blogSet=博客设置
|
|||||||
# error
|
# error
|
||||||
notFound=该页面不存在
|
notFound=该页面不存在
|
||||||
|
|
||||||
|
# index
|
||||||
|
discussion=参与讨论
|
||||||
|
download=下载
|
||||||
|
howToInstallLeanote=leanote安装步骤
|
||||||
|
|
||||||
|
|
||||||
# 必须要加这个, 奇怪
|
# 必须要加这个, 奇怪
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public_3.files", "name" : "_id_" } ] }
|
||||||
@@ -1 +1 @@
|
|||||||
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public.has_share_notes", "name" : "_id_" }, { "v" : 1, "key" : { "UserId" : 1, "ToUserId" : 1 }, "unique" : true, "ns" : "leanote_public.has_share_notes", "name" : "UserId_1_ToUserId_1" } ] }
|
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public_3.has_share_notes", "name" : "_id_" }, { "v" : 1, "key" : { "UserId" : 1, "ToUserId" : 1 }, "unique" : true, "ns" : "leanote_public_3.has_share_notes", "name" : "UserId_1_ToUserId_1" } ] }
|
||||||
@@ -1 +1 @@
|
|||||||
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public.note_content_histories", "name" : "_id_" } ] }
|
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public_3.note_content_histories", "name" : "_id_" } ] }
|
||||||
@@ -1 +1 @@
|
|||||||
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public.note_contents", "name" : "_id_" } ] }
|
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public_3.note_contents", "name" : "_id_" } ] }
|
||||||
@@ -1 +1 @@
|
|||||||
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public.notebooks", "name" : "_id_" }, { "v" : 1, "key" : { "UserId" : 1 }, "ns" : "leanote_public.notebooks", "name" : "UserId_1" } ] }
|
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public_3.notebooks", "name" : "_id_" }, { "v" : 1, "key" : { "UserId" : 1 }, "ns" : "leanote_public_3.notebooks", "name" : "UserId_1" } ] }
|
||||||
@@ -1 +1 @@
|
|||||||
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public.notes", "name" : "_id_" }, { "v" : 1, "key" : { "UserId" : 1 }, "ns" : "leanote_public.notes", "name" : "UserId_1" } ] }
|
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public_3.notes", "name" : "_id_" }, { "v" : 1, "key" : { "UserId" : 1 }, "ns" : "leanote_public_3.notes", "name" : "UserId_1" } ] }
|
||||||
@@ -1 +1 @@
|
|||||||
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public.share_notebooks", "name" : "_id_" } ] }
|
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public_3.share_notebooks", "name" : "_id_" } ] }
|
||||||
@@ -1 +1 @@
|
|||||||
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public.share_notes", "name" : "_id_" }, { "v" : 1, "key" : { "UserId" : 1, "ToUserId" : 1, "NoteId" : 1 }, "unique" : true, "ns" : "leanote_public.share_notes", "name" : "UserId_1_ToUserId_1_NoteId_1" } ] }
|
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public_3.share_notes", "name" : "_id_" }, { "v" : 1, "key" : { "UserId" : 1, "ToUserId" : 1, "NoteId" : 1 }, "unique" : true, "ns" : "leanote_public_3.share_notes", "name" : "UserId_1_ToUserId_1_NoteId_1" } ] }
|
||||||
@@ -1 +1 @@
|
|||||||
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public.system.users", "name" : "_id_" }, { "v" : 1, "key" : { "user" : 1, "userSource" : 1 }, "unique" : true, "ns" : "leanote_public.system.users", "name" : "user_1_userSource_1" } ] }
|
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public_3.system.users", "name" : "_id_" }, { "v" : 1, "key" : { "user" : 1, "userSource" : 1 }, "unique" : true, "ns" : "leanote_public_3.system.users", "name" : "user_1_userSource_1" } ] }
|
||||||
@@ -1 +1 @@
|
|||||||
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public.tags", "name" : "_id_" }, { "v" : 1, "key" : { "UserId" : 1 }, "ns" : "leanote_public.tags", "name" : "UserId_1" } ] }
|
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public_3.tags", "name" : "_id_" }, { "v" : 1, "key" : { "UserId" : 1 }, "ns" : "leanote_public_3.tags", "name" : "UserId_1" } ] }
|
||||||
@@ -1 +1 @@
|
|||||||
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public.tokens", "name" : "_id_" } ] }
|
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public_3.tokens", "name" : "_id_" } ] }
|
||||||
@@ -1 +1 @@
|
|||||||
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public.user_blogs", "name" : "_id_" } ] }
|
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public_3.user_blogs", "name" : "_id_" } ] }
|
||||||
@@ -1 +1 @@
|
|||||||
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public.users", "name" : "_id_" } ] }
|
{ "indexes" : [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "leanote_public_3.users", "name" : "_id_" } ] }
|
||||||
@@ -7099,4 +7099,8 @@ td.visible-print {
|
|||||||
/* life */
|
/* life */
|
||||||
.btn {
|
.btn {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
.mce-item-table, .mce-item-table td, .mce-item-table th, .mce-item-table caption {
|
||||||
|
border: 1px solid #9B9898;
|
||||||
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
.aaa {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
@@ -10,3 +10,8 @@ html {
|
|||||||
* {
|
* {
|
||||||
font-family: 'Open Sans', 'Helvetica Neue', Arial, 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
|
font-family: 'Open Sans', 'Helvetica Neue', Arial, 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mce-item-table, .mce-item-table td, .mce-item-table th, .mce-item-table caption {
|
||||||
|
border: 1px solid #9B9898;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
@@ -21,4 +21,9 @@ html {
|
|||||||
}
|
}
|
||||||
* {
|
* {
|
||||||
font-family: @fontFamily;
|
font-family: @fontFamily;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mce-item-table, .mce-item-table td, .mce-item-table th, .mce-item-table caption {
|
||||||
|
border: 1px solid #9B9898;
|
||||||
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
// font
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 300;
|
||||||
|
src: local('Open Sans Light'), local('OpenSans-Light'), url('../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff') format('woff');
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: local('Open Sans'), local('OpenSans'), url('../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff') format('woff');
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
src: local('Open Sans Bold'), local('OpenSans-Bold'), url('../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff') format('woff');
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 400;
|
||||||
|
src: local('Open Sans Italic'), local('OpenSans-Italic'), url('../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff') format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
|
/* leanote */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'leanoteregular';
|
||||||
|
src: url('../../fonts/leanote/leanote-regular-webfont.eot');
|
||||||
|
src: url('../../fonts/leanote/leanote-regular-webfont.eot?#iefix') format('embedded-opentype'),
|
||||||
|
url('../../fonts/leanote/leanote-regular-webfont.woff') format('woff'),
|
||||||
|
url('../../fonts/leanote/leanote-regular-webfont.ttf') format('truetype'),
|
||||||
|
url('../../fonts/leanote/leanote-regular-webfont.svg#leanoteregular') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*"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;*/
|
||||||
|
|
||||||
|
#logo {
|
||||||
|
font-family: "leanoteregular";
|
||||||
|
font-size: 36px;
|
||||||
|
}
|
||||||
|
#logo:before {
|
||||||
|
content: "a";
|
||||||
|
}
|
||||||
|
#switcher span {
|
||||||
|
font-family: "leanoteregular";
|
||||||
|
border-radius: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 18px;
|
||||||
|
height: 34px;
|
||||||
|
line-height: 34px;
|
||||||
|
margin-top: 8px;
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
#switcher span:before {
|
||||||
|
content: "b";
|
||||||
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@import "basic.less";
|
||||||
|
|
||||||
@bgColor: #fff;
|
@bgColor: #fff;
|
||||||
@headerBgColor: #25313e;
|
@headerBgColor: #25313e;
|
||||||
@@ -14,34 +15,6 @@
|
|||||||
@noteListWidth: 250px;
|
@noteListWidth: 250px;
|
||||||
@noteActiveBg: #65bd77;
|
@noteActiveBg: #65bd77;
|
||||||
|
|
||||||
// font
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 300;
|
|
||||||
src: local('Open Sans Light'), local('OpenSans-Light'), url('../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
src: local('Open Sans'), local('OpenSans'), url('../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 700;
|
|
||||||
src: local('Open Sans Bold'), local('OpenSans-Bold'), url('../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 400;
|
|
||||||
src: local('Open Sans Italic'), local('OpenSans-Italic'), url('../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff') format('woff');
|
|
||||||
}
|
|
||||||
|
|
||||||
/*"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;*/
|
|
||||||
|
|
||||||
@selectionBg: @aBlackColor;
|
@selectionBg: @aBlackColor;
|
||||||
@selectionColor: #fff;
|
@selectionColor: #fff;
|
||||||
::selection { background:@selectionBg; color:@selectionColor; }
|
::selection { background:@selectionBg; color:@selectionColor; }
|
||||||
@@ -101,7 +74,6 @@ a.raw:hover {
|
|||||||
|
|
||||||
#logo, #logo span {
|
#logo, #logo span {
|
||||||
line-height: 50px;//@headerHeight;
|
line-height: 50px;//@headerHeight;
|
||||||
font-size: 28px;
|
|
||||||
}
|
}
|
||||||
#logo {
|
#logo {
|
||||||
width: 140px;
|
width: 140px;
|
||||||
@@ -113,7 +85,7 @@ a.raw:hover {
|
|||||||
border-color: rgba(255, 255, 255, 0.1);
|
border-color: rgba(255, 255, 255, 0.1);
|
||||||
//color: #ccc;
|
//color: #ccc;
|
||||||
}
|
}
|
||||||
#logo span , #switcher span {
|
#logo span{
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
//color: #eee;
|
//color: #eee;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
@@ -137,7 +109,7 @@ a.raw:hover {
|
|||||||
}
|
}
|
||||||
span {
|
span {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 8px 4px;
|
background-color: #000;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
&:hover {
|
&:hover {
|
||||||
@@ -640,18 +612,20 @@ a.raw:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#noteItemList .item-thumb {
|
#noteItemList .item-thumb {
|
||||||
padding-left: 10px;
|
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
line-height: 100px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
.item-thumb img {
|
.item-thumb img {
|
||||||
width: 100px;
|
max-width: 100px;
|
||||||
}
|
}
|
||||||
#noteItemList .item-desc {
|
#noteItemList .item-desc {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -1202,10 +1176,42 @@ background-position:-1px -670px
|
|||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
content: url(../../images/loading-a-20.gif);
|
content: url(../../images/loading-a-20.gif);
|
||||||
margin-top:10px;
|
vertical-align: middle;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#toggleEditorMode {
|
#toggleEditorMode {
|
||||||
margin: 0 10px !important;
|
margin: 0 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
// leaui image drop drag
|
||||||
|
#upload {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0px;
|
||||||
|
padding: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#upload #drop {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding-top: 100px;
|
||||||
|
}
|
||||||
|
#drop.in {
|
||||||
|
border: 1px solid #000000;
|
||||||
|
}
|
||||||
|
#drop.hover {
|
||||||
|
border: 2px solid #000000;
|
||||||
|
}
|
||||||
|
#uploadMsg {
|
||||||
|
position: absolute;
|
||||||
|
top: 3px;
|
||||||
|
right: 3px;
|
||||||
|
bottom: 10px;
|
||||||
|
overflow: scroll;
|
||||||
|
list-style: none;
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@import "basic.less";
|
||||||
|
|
||||||
@bgColor: #fff;
|
@bgColor: #fff;
|
||||||
@headerBgColor: #fff;
|
@headerBgColor: #fff;
|
||||||
@@ -13,34 +14,6 @@
|
|||||||
@noteListWidth: 250px;
|
@noteListWidth: 250px;
|
||||||
@noteActiveBg: #65bd77;
|
@noteActiveBg: #65bd77;
|
||||||
|
|
||||||
// font
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 300;
|
|
||||||
src: local('Open Sans Light'), local('OpenSans-Light'), url('../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
src: local('Open Sans'), local('OpenSans'), url('../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 700;
|
|
||||||
src: local('Open Sans Bold'), local('OpenSans-Bold'), url('../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 400;
|
|
||||||
src: local('Open Sans Italic'), local('OpenSans-Italic'), url('../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff') format('woff');
|
|
||||||
}
|
|
||||||
|
|
||||||
/*"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;*/
|
|
||||||
|
|
||||||
@selectionBg: @aBlackColor;
|
@selectionBg: @aBlackColor;
|
||||||
@selectionColor: #fff;
|
@selectionColor: #fff;
|
||||||
::selection { background:@selectionBg; color:@selectionColor; }
|
::selection { background:@selectionBg; color:@selectionColor; }
|
||||||
@@ -94,7 +67,6 @@ a.raw:hover {
|
|||||||
|
|
||||||
#logo, #logo span {
|
#logo, #logo span {
|
||||||
line-height: 50px;// @headerHeight;
|
line-height: 50px;// @headerHeight;
|
||||||
font-size: 28px;
|
|
||||||
}
|
}
|
||||||
#logo {
|
#logo {
|
||||||
width: 140px;
|
width: 140px;
|
||||||
@@ -106,7 +78,7 @@ a.raw:hover {
|
|||||||
border-color: rgba(255, 255, 255, 0.1);
|
border-color: rgba(255, 255, 255, 0.1);
|
||||||
//color: #ccc;
|
//color: #ccc;
|
||||||
}
|
}
|
||||||
#logo span, #switcher span {
|
#logo span {
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
@@ -129,8 +101,9 @@ a.raw:hover {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
span {
|
span {
|
||||||
|
background-color: #000;
|
||||||
|
color: #fff;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 6px 4px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
&:hover {
|
&:hover {
|
||||||
@@ -450,8 +423,6 @@ a.raw:hover {
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
#myNotebooks .folderBody {
|
#myNotebooks .folderBody {
|
||||||
max-height: 600px;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
#addNotebookPlus {
|
#addNotebookPlus {
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
@@ -607,18 +578,20 @@ border: 1px solid @borderColor;
|
|||||||
// font-weight: 800;
|
// font-weight: 800;
|
||||||
}
|
}
|
||||||
}#noteItemList .item-thumb {
|
}#noteItemList .item-thumb {
|
||||||
padding-left: 10px;
|
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
line-height: 100px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
.item-thumb img {
|
.item-thumb img {
|
||||||
width: 100px;
|
max-width: 100px;
|
||||||
}
|
}
|
||||||
#noteItemList .item-desc {
|
#noteItemList .item-desc {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -1163,10 +1136,43 @@ background-position:-1px -670px
|
|||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
content: url(../../images/loading-a-20-black.gif);
|
content: url(../../images/loading-a-20-black.gif);
|
||||||
margin-top:10px;
|
vertical-align: middle;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#toggleEditorMode {
|
#toggleEditorMode {
|
||||||
margin: 0 10px !important;
|
margin: 0 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// leaui image drop drag
|
||||||
|
#upload {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0px;
|
||||||
|
padding: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#upload #drop {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding-top: 100px;
|
||||||
|
}
|
||||||
|
#drop.in {
|
||||||
|
border: 1px solid #000000;
|
||||||
|
}
|
||||||
|
#drop.hover {
|
||||||
|
border: 2px solid #000000;
|
||||||
|
}
|
||||||
|
#uploadMsg {
|
||||||
|
position: absolute;
|
||||||
|
top: 3px;
|
||||||
|
right: 3px;
|
||||||
|
bottom: 10px;
|
||||||
|
overflow: scroll;
|
||||||
|
list-style: none;
|
||||||
}
|
}
|
||||||
@@ -72,13 +72,10 @@ a.raw:hover {
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
border-bottom: 1px solid #ebeff2;
|
border-bottom: 1px solid #ebeff2;
|
||||||
/* for app */
|
/* for app */
|
||||||
|
|
||||||
webkit-user-select: none;
|
webkit-user-select: none;
|
||||||
/* 还不知 */
|
/* 还不知 */
|
||||||
|
|
||||||
-webkit-app-region: drag;
|
-webkit-app-region: drag;
|
||||||
/* -webkit-app-region: no-drag; */
|
/* -webkit-app-region: no-drag; */
|
||||||
|
|
||||||
}
|
}
|
||||||
#header a {
|
#header a {
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
@@ -290,7 +287,6 @@ a.raw:hover {
|
|||||||
}
|
}
|
||||||
.item-title {
|
.item-title {
|
||||||
/*font-weight: 400;*/
|
/*font-weight: 400;*/
|
||||||
|
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
@@ -345,9 +341,7 @@ a.raw:hover {
|
|||||||
border: none;
|
border: none;
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
/*不知道哪里设置了auto*/
|
/*不知道哪里设置了auto*/
|
||||||
|
|
||||||
/*border-radius: 5px;*/
|
/*border-radius: 5px;*/
|
||||||
|
|
||||||
}
|
}
|
||||||
/* 最顶层 */
|
/* 最顶层 */
|
||||||
#editor .mce-tinymce {
|
#editor .mce-tinymce {
|
||||||
@@ -449,7 +443,6 @@ a.raw:hover {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
/*border-left: 1px solid #ccc;*/
|
/*border-left: 1px solid #ccc;*/
|
||||||
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding-left: 3px;
|
padding-left: 3px;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@@ -911,7 +904,6 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
#noteList #notesAndSort {
|
#noteList #notesAndSort {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -963,3 +955,33 @@ body {
|
|||||||
#toggleEditorMode {
|
#toggleEditorMode {
|
||||||
margin: 0 10px !important;
|
margin: 0 10px !important;
|
||||||
}
|
}
|
||||||
|
#upload {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0px;
|
||||||
|
padding: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#upload #drop {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding-top: 100px;
|
||||||
|
}
|
||||||
|
#drop.in {
|
||||||
|
border: 1px solid #000000;
|
||||||
|
}
|
||||||
|
#drop.hover {
|
||||||
|
border: 2px solid #000000;
|
||||||
|
}
|
||||||
|
#uploadMsg {
|
||||||
|
position: absolute;
|
||||||
|
top: 3px;
|
||||||
|
right: 3px;
|
||||||
|
bottom: 10px;
|
||||||
|
overflow: scroll;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
@@ -1059,4 +1059,35 @@ body {
|
|||||||
|
|
||||||
#toggleEditorMode {
|
#toggleEditorMode {
|
||||||
margin: 0 10px !important;
|
margin: 0 10px !important;
|
||||||
|
}
|
||||||
|
// leaui image drop drag
|
||||||
|
#upload {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0px;
|
||||||
|
padding: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#upload #drop {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding-top: 100px;
|
||||||
|
}
|
||||||
|
#drop.in {
|
||||||
|
border: 1px solid #000000;
|
||||||
|
}
|
||||||
|
#drop.hover {
|
||||||
|
border: 2px solid #000000;
|
||||||
|
}
|
||||||
|
#uploadMsg {
|
||||||
|
position: absolute;
|
||||||
|
top: 3px;
|
||||||
|
right: 3px;
|
||||||
|
bottom: 10px;
|
||||||
|
overflow: scroll;
|
||||||
|
list-style: none;
|
||||||
}
|
}
|
||||||
@@ -72,13 +72,10 @@ a.raw:hover {
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
border-bottom: 1px solid #ebeff2;
|
border-bottom: 1px solid #ebeff2;
|
||||||
/* for app */
|
/* for app */
|
||||||
|
|
||||||
webkit-user-select: none;
|
webkit-user-select: none;
|
||||||
/* 还不知 */
|
/* 还不知 */
|
||||||
|
|
||||||
-webkit-app-region: drag;
|
-webkit-app-region: drag;
|
||||||
/* -webkit-app-region: no-drag; */
|
/* -webkit-app-region: no-drag; */
|
||||||
|
|
||||||
}
|
}
|
||||||
#header a {
|
#header a {
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
@@ -290,7 +287,6 @@ a.raw:hover {
|
|||||||
}
|
}
|
||||||
.item-title {
|
.item-title {
|
||||||
/*font-weight: 400;*/
|
/*font-weight: 400;*/
|
||||||
|
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
@@ -345,9 +341,7 @@ a.raw:hover {
|
|||||||
border: none;
|
border: none;
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
/*不知道哪里设置了auto*/
|
/*不知道哪里设置了auto*/
|
||||||
|
|
||||||
/*border-radius: 5px;*/
|
/*border-radius: 5px;*/
|
||||||
|
|
||||||
}
|
}
|
||||||
/* 最顶层 */
|
/* 最顶层 */
|
||||||
#editor .mce-tinymce {
|
#editor .mce-tinymce {
|
||||||
@@ -449,7 +443,6 @@ a.raw:hover {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
/*border-left: 1px solid #ccc;*/
|
/*border-left: 1px solid #ccc;*/
|
||||||
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding-left: 3px;
|
padding-left: 3px;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@@ -741,3 +734,33 @@ background-position:-1px -670px
|
|||||||
background-color: #65bd77;
|
background-color: #65bd77;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
#upload {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0px;
|
||||||
|
padding: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#upload #drop {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding-top: 100px;
|
||||||
|
}
|
||||||
|
#drop.in {
|
||||||
|
border: 1px solid #000000;
|
||||||
|
}
|
||||||
|
#drop.hover {
|
||||||
|
border: 2px solid #000000;
|
||||||
|
}
|
||||||
|
#uploadMsg {
|
||||||
|
position: absolute;
|
||||||
|
top: 3px;
|
||||||
|
right: 3px;
|
||||||
|
bottom: 10px;
|
||||||
|
overflow: scroll;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
@@ -829,4 +829,4 @@ background-position:-1px -670px
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<metadata></metadata>
|
||||||
|
<defs>
|
||||||
|
<font id="leanoteregular" horiz-adv-x="512" >
|
||||||
|
<font-face units-per-em="2048" ascent="2048" descent="0" />
|
||||||
|
<missing-glyph horiz-adv-x="500" />
|
||||||
|
<glyph horiz-adv-x="0" />
|
||||||
|
<glyph unicode="
" />
|
||||||
|
<glyph horiz-adv-x="0" />
|
||||||
|
<glyph horiz-adv-x="0" />
|
||||||
|
<glyph unicode=" " />
|
||||||
|
<glyph unicode=""" horiz-adv-x="2048" />
|
||||||
|
<glyph unicode="a" horiz-adv-x="6750" d="M7 729q11 76 43 139.5t85 104.5t125 41q47 63 77 145q23 63 23 149q0 26 -2 54q-43 6 -95 15t-95 25q-44 17 -68 46q-16 18 -15 44q0 15 5 32q8 25 27.5 33t47.5 9t59.5 -1t62.5 4q27 4 50 15t46 22.5t44.5 19.5t45.5 4q39 -25 55.5 -71t26.5 -99q28 -6 52 -6q15 0 28 2 q35 6 67.5 15.5t65.5 14.5l20 2q25 0 54 -9q18 43 39.5 61.5t54.5 25.5t77 11t105 18q27 6 57.5 18.5t60.5 19.5q16 4 30 4q12 0 24 -3q24 -6 33 -39q7 -21 7 -39q0 -22 -12 -36q-20 -26 -56.5 -43t-77.5 -29t-66 -33q-33 -25 -61.5 -75t-51 -113.5t-37 -136t-16.5 -140.5 v-20q0 -56 9 -106q11 -60 40 -97q51 -12 106.5 -40t104 -67.5t83 -92t46.5 -113.5q8 -39 8 -78q-1 -10 -1 -20q-2 -48 -16.5 -90t-39 -72.5t-57.5 -42.5q-38 -15 -71 -15q-18 0 -34 4q-46 12 -79 45t-56.5 79t-38.5 91q1 -12 1 -23q-1 -66 -31 -128q-36 -72 -94 -115 t-130 -48h-12q-65 0 -127 46q-37 29 -52 74t-26.5 93t-28 94t-53.5 79q-12 1 -23 1q-28 0 -50 -4q-32 -5 -60 -9t-55 -5t-53 9q-66 23 -104 78t-50 125q-6 37 -6 76q0 35 5 71zM313 844q43 -10 56.5 16.5t-2.5 54.5q-33 0 -43.5 -20t-10.5 -51zM492 1245q-4 -15 -4 -27 q0 -16 7 -26q13 -18 36.5 -24.5t51 -1.5t44.5 18q-3 29 -3 54q0 38 7 70q12 52 22 107q-10 6 -27.5 9t-35 1t-30.5 -8t-15 -18q35 0 52 -16.5t19 -41t-7 -51t-26.5 -44t-42 -20.5t-48.5 19zM563 424q20 -35 32.5 -78t30.5 -80q19 -38 49 -62q28 -23 77 -22h8q18 18 25.5 44 t7.5 53.5t-9.5 54t-23.5 45.5q-47 14 -101.5 18t-95.5 27zM672 1245q-2 -6 -2 -11q0 -6 3 -12q5 -8 11 -13t13.5 -10t9.5 -15q28 -8 52 -8q28 0 49 12q38 22 54 62q11 30 11 62q1 12 -1 24q-6 46 -28 78q-20 32 -56 37q-4 1 -8 1q-33 0 -73 -37q29 4 45 -7t26 -28 q5 -18 5 -36q0 -16 -5 -34q-10 -36 -35 -55q-10 -14 -22 -12t-25 7q-12 6 -19 8q-5 2 -5 -7v-6zM885 459q51 -16 79.5 -66.5t53 -106t53.5 -99.5t82 -50q9 -1 17 -1q22 0 40 8q26 10 46 28t32 42t19 48q7 33 7 65q0 45 -14 85q-22 70 -66 125t-103.5 91t-118.5 46 q-4 -25 -12.5 -43t-6.5 -47q41 -10 79 -29.5t66 -49.5q30 -30 46 -66q15 -32 14 -70v-9q-25 37 -62 80q-38 44 -81 68q-35 20 -70 19q-9 0 -18 -1q-45 -6 -82 -67zM1502 836v140.5v139.5q1 139 9 273h162v-1119q-14 -6 -37.5 -8t-48 -2t-47 2t-37.5 8q1 93 1 187v95z M1783 560q-2 34 -1 68q0 36 1 72q3 72 10 135.5t20.5 111.5t29.5 67q23 23 71 39t110 25q62 8 128 10q11 0 22 1q56 -1 106 -7q62 -8 111.5 -23t76.5 -37q42 -36 58 -98q11 -43 11 -89q1 -19 -1 -37q-6 -64 -35 -119.5t-76 -76.5q-49 -23 -99 -25q-13 -1 -26 -1q-37 0 -75 4 q-51 6 -107 10q-16 1 -32 1q-40 0 -83 -7v170q29 3 60 3q15 0 31 -1q48 -2 95 -3h23q34 0 66 2q42 3 75 17q6 18 9 50t-9 48q-29 20 -76 26q-36 5 -76 5h-25q-54 -2 -107.5 -6t-92.5 -6q-12 -41 -16 -96.5t-4 -113.5t4 -116.5t8 -103.5q46 -23 106 -27q48 -3 101 -3h27 q68 1 136 5q27 2 53 2q40 0 77 -4v-170q-56 6 -114 6q-40 0 -82 -3q-100 -7 -189.5 -7t-160.5 19.5t-105 82.5q-14 25 -22.5 78.5t-11.5 121.5zM2630 492q-1 10 -1 20q-1 56 19 110q22 64 72 97q37 25 86 32q43 6 91 6h15q56 -1 120 -4q27 -1 56 -1q38 0 78 2v-170 q-25 -2 -51 -2q-20 0 -42 1q-50 3 -97 4h-16q-38 0 -73 -4q-42 -5 -69 -26q-10 -14 -10 -49t10 -49q27 -18 74 -24.5t99 -6.5t103.5 5t90.5 7q18 37 24 96.5t6 124t-7 125t-15 103.5q-80 10 -173 10q-33 0 -67 -1q-73 -3 -142 -3q-56 0 -110 2q2 20 1 46t-2 50.5t0 46 t10 37.5q48 -4 97 -4q25 0 49 1q74 3 144 5q20 1 41 1q49 0 95 -4q64 -5 114.5 -24.5t85.5 -57.5t45 -105q15 -97 17 -201v-24q0 -90 -16 -170q-18 -90 -61.5 -155t-117.5 -77q-43 -6 -105 -10q-42 -3 -85 -3q-21 0 -43 1q-64 2 -123.5 9t-91.5 22q-59 25 -90 84t-35 127z M3506 262v787q0 23 19 28q61 -9 126 -9q37 0 75 3q106 8 203 10h18q86 1 157 -17q78 -20 119 -87q37 -61 39 -147v-34q0 -70 -6 -146q-8 -96 -15 -196q-2 -31 -2 -60q0 -68 11 -132h-170v608q-29 25 -76 32q-41 6 -88 6h-14q-54 -1 -111 -4q-19 -1 -37 -1q-36 0 -70 4 q-8 -75 -9 -155q0 -40 -0.5 -81t0.5 -82q1 -83 2 -165v-54q0 -54 -1 -108h-170zM4363 639q-2 36 -1.5 70.5t1.5 66.5q3 66 12.5 120t25.5 81q25 43 67.5 61.5t110.5 28.5q61 8 134 12q36 2 71.5 2t69.5 -2q68 -4 123 -19.5t86 -45.5q16 -16 29.5 -62.5t22.5 -108t12 -131.5 q2 -53 2 -104v-34q-1 -66 -8 -120.5t-21 -84.5q-10 -16 -35 -41l-29 -29q-29 -18 -78 -31q-50 -12 -110 -17q-43 -4 -88 -4q-18 0 -36 1q-64 2 -123 11t-105 25.5t-68 41.5q-18 18 -31.5 66t-22 111.5t-11.5 135.5zM4540 664.5q0 -60.5 6.5 -118t16.5 -95.5q33 -10 85 -16.5 t107.5 -6.5t104.5 6t78 25q4 45 8 102t4 116.5t-4 115t-16 96.5q-37 4 -87.5 8t-102.5 4t-99 -5t-78 -17q-12 -39 -17.5 -96.5t-5.5 -118zM5224 907v160q10 10 31 9t41 1v312h160v-304q17 -12 42 -12q10 0 20 2q24 4 46 4q14 0 27 -2v-180h-135v-635h-160v627q-4 8 -14 9 t-21.5 1h-23t-13.5 8zM5674 560q-2 34 -2 68q0 36 2 72q3 72 10 135.5t20.5 111.5t29.5 67q23 23 71 39t109 25q62 8 128 10q11 0 23 1q55 -1 105 -7q62 -8 112 -23t77 -37q43 -36 59 -98q11 -43 11 -89q-1 -19 -3 -37q-6 -64 -34.5 -119.5t-75.5 -76.5q-49 -23 -98 -25 q-13 -1 -26 -1q-38 0 -76 4q-52 6 -108 10q-16 1 -32 1q-40 0 -82 -7v170q29 3 60 3q15 0 31 -1q47 -2 95 -3h24q35 0 66 2q42 3 74 17q6 18 9.5 50t-9.5 48q-29 20 -76 26q-36 5 -76 5h-25q-54 -2 -107.5 -6t-91.5 -6q-12 -41 -16.5 -96.5t-4.5 -113.5t4 -116.5t8 -103.5 q45 -23 105 -27q48 -3 102 -3h26q68 1 137 5q28 2 54 2q39 0 76 -4v-170q-56 6 -114 6q-41 0 -83 -3q-100 -7 -189 -7t-159.5 19.5t-105.5 82.5q-14 25 -22.5 78.5t-11.5 121.5z" />
|
||||||
|
<glyph unicode="b" horiz-adv-x="1771" d="M8 912q14 94 54 172.5t107 130t155 53.5q59 80 97 182q28 76 28 180q0 35 -3 74q-53 8 -117.5 18.5t-118.5 32t-85 57.5q-19 22 -19 52q0 19 7 41q8 31 33.5 41t59.5 11h23q25 0 51 -1h19q30 0 59 4q35 6 64 20.5t56.5 28.5t55 23.5t58.5 5.5q47 -31 68.5 -88.5 t31.5 -122.5q35 -8 66 -8q18 0 34 3q46 7 86 18q40 12 82 18q13 2 25 1q31 0 66 -10q23 53 50 76t67 32t95.5 14t133.5 24q33 6 71.5 22.5t75.5 25.5q20 5 37 5q15 0 29 -4q30 -8 45 -49q9 -27 9 -48q0 -28 -14 -47q-26 -34 -72 -54.5t-98.5 -36t-82.5 -40.5 q-41 -31 -77 -93t-63.5 -142t-46 -170t-20.5 -176v-23q0 -73 11 -136q13 -73 50 -120q66 -16 134.5 -50t128 -84t103.5 -114.5t60 -142.5q9 -46 9 -91q0 -15 -1 -31q-4 -60 -22 -112.5t-49 -91t-72 -55.5q-47 -18 -87 -18q-23 -1 -43 5q-56 16 -99 57.5t-72 99t-45 114.5 q1 -12 1 -23q0 -87 -40 -166q-45 -89 -117 -144q-72 -54 -162 -61q-9 -1 -18 -1q-80 0 -155 59q-45 37 -64.5 92.5t-35 116t-36 117.5t-65.5 98q-12 1 -24 1q-35 0 -66 -5q-41 -6 -76 -11q-34 -5 -68 -6h-6q-31 0 -63 11q-82 29 -128 99q-47 69 -63 157q-9 47 -8 96 q-1 43 6 87zM391 1055q14 -3 26 -3q31 0 43 24q8 16 8 32q0 18 -9 37q-41 0 -54.5 -25.5t-13.5 -64.5zM614 1559q-5 -17 -5 -32q1 -21 11 -36q18 -25 46 -32t62 -2t54 22q-3 31 -3 58q1 53 11 97q16 66 27 135q-14 8 -35.5 11.5t-42 1.5t-37 -11.5t-20.5 -23.5h7 q37 1 57 -19q22 -22 25 -52q1 -6 0 -13q0 -25 -9 -51q-12 -33 -34.5 -54.5t-52.5 -24.5h-6q-27 0 -55 26zM705 528q25 -43 40 -96t37 -99t60 -77q35 -29 100 -29h8q23 23 32 55q8 28 8 59v7q-1 35 -11 68t-29 57q-29 8 -61.5 13.5t-65 10.5t-63.5 12t-55 19zM838 1559 q-2 -7 -2 -13q0 -10 4 -16q6 -10 14 -17.5t16.5 -14.5t12.5 -19q36 -10 65 -10q36 -1 62 15q46 28 66 78q14 36 15 77q-1 15 -3 31q-8 58 -34 98t-70 48q-5 1 -11 0q-40 0 -90 -47q37 4 57.5 -8t32.5 -35q6 -21 6 -42q1 -24 -7 -48q-14 -45 -44 -67q-10 -16 -26.5 -13t-31 9 t-24.5 9q-8 2 -8 -10v-5zM1108 573q41 -14 70.5 -47.5t52 -76.5t42 -90.5t42 -87.5t53.5 -67.5t74 -31.5q9 -1 18 0q28 0 52 8q32 12 56.5 36t41 53.5t22.5 58.5q9 42 9 82q1 53 -15 104q-26 88 -82.5 156.5t-131.5 113.5t-148 58q-4 -29 -14.5 -52.5t-8.5 -58.5 q51 -12 99.5 -37.5t84 -62.5t55.5 -83q19 -42 19 -88v-9q-31 45 -79 99t-101 85q-43 25 -88 25q-11 0 -21 -2q-56 -8 -102 -85z" />
|
||||||
|
<glyph unicode=" " />
|
||||||
|
<glyph unicode=" " horiz-adv-x="1024" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="2048" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="1024" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="2048" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="682" />
|
||||||
|
<glyph unicode=" " />
|
||||||
|
<glyph unicode=" " horiz-adv-x="341" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="341" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="256" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="409" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="113" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="409" />
|
||||||
|
<glyph unicode=" " />
|
||||||
|
<glyph unicode="◼" horiz-adv-x="1024" d="M0 0z" />
|
||||||
|
</font>
|
||||||
|
</defs></svg>
|
||||||
|
After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
@@ -0,0 +1 @@
|
|||||||
|
leanote logo is designed by jaguarWang(https://github.com/jaguarWang)
|
||||||
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 6.8 KiB |