carte-server 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +25 -18
- data/lib/carte/client/views/card.cjsx +8 -5
- data/lib/carte/client/views/content.cjsx +3 -2
- data/lib/carte/client/views/edit.cjsx +1 -1
- data/lib/carte/client/views/list.cjsx +48 -23
- data/lib/carte/server.rb +1 -1
- data/lib/carte/server/models/card.rb +1 -1
- data/lib/carte/server/version.rb +1 -1
- data/package.json +2 -1
- data/screenshot.png +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40e29e4e73482abcd5e6155e32ea8a5765f38247
|
4
|
+
data.tar.gz: a4495c673b963ba553581bf4d9c47c0accb88e30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b77a2714e6a6188549a7c9ea9b6a4da6df1684c54c71a76e9322a2a751a1fc4eecd58593e2108eefbf51c1e7482487a300794e347bc1e4561bad8d7b34412731
|
7
|
+
data.tar.gz: e241efb22b9a7db1f53832c63e6900e47252556ef73aadbebe91c9ecaf48439692f3b39d904dc796e5a787bc597254bc27203e3b74e64e7e043b98546e6ccaf5
|
data/README.md
CHANGED
@@ -1,31 +1,38 @@
|
|
1
1
|
# Carte
|
2
2
|
|
3
|
-
|
3
|
+
[](http://badge.fury.io/js/carte-client)
|
4
|
+
[](http://badge.fury.io/rb/carte-server)
|
4
5
|
|
5
|
-
|
6
|
+
Something like dictionary, wiki, or information card.
|
6
7
|
|
7
|
-
|
8
|
+
## Screenshot
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
10
|
+

|
11
|
+
|
12
|
+
## Features
|
12
13
|
|
13
|
-
|
14
|
+
* Manage your data fragments with cards
|
15
|
+
* Create, edit and search cards quickly
|
16
|
+
* View your card with the cards around it (like paper dictionary)
|
17
|
+
* No user concept, super simple system like wiki
|
14
18
|
|
15
|
-
|
19
|
+
You can try carte on [sandbox](http://carte-sandbox.herokuapp.com/#/).
|
20
|
+
Japanese introduction is [here](http://tily.tumblr.com/post/117678137942/carte).
|
16
21
|
|
17
|
-
|
22
|
+
## Components
|
18
23
|
|
19
|
-
|
24
|
+
* [carte-server](https://rubygems.org/gems/carte-server)
|
25
|
+
* [carte-client](https://www.npmjs.com/package/carte-client)
|
20
26
|
|
21
|
-
##
|
27
|
+
## Deploy
|
22
28
|
|
23
|
-
|
29
|
+
[](https://heroku.com/deploy?template=https://github.com/tily/carte-sandbox)
|
24
30
|
|
25
|
-
|
31
|
+
Deploy your carte with the button above. After deployment, you may want to customize your carte.
|
26
32
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
33
|
+
```
|
34
|
+
## change title and description
|
35
|
+
$ vi config.json
|
36
|
+
## replace brand icon
|
37
|
+
$ cp ~/Desktop/icon.png public/images/icon.png
|
38
|
+
```
|
@@ -2,6 +2,7 @@
|
|
2
2
|
React = require('react')
|
3
3
|
Edit = require('./edit')
|
4
4
|
ModalTrigger = require('react-bootstrap/lib/ModalTrigger')
|
5
|
+
markdownIt = require('markdown-it')(linkify: true)
|
5
6
|
|
6
7
|
module.exports = React.createClass
|
7
8
|
displayName: 'Card'
|
@@ -33,7 +34,7 @@ module.exports = React.createClass
|
|
33
34
|
<div className='col-sm-4' style={padding:'5px'} onMouseOver={@onMouseOver} onMouseLeave={@onMouseLeave}>
|
34
35
|
<div className='list-group' style={margin:'0px',padding:'0px'}>
|
35
36
|
<div className='list-group-item' style={style}>
|
36
|
-
<
|
37
|
+
<div>
|
37
38
|
{
|
38
39
|
if @props.card.get('focused')
|
39
40
|
<i className='glyphicon glyphicon-star' style={marginRight:'5px'} />
|
@@ -53,10 +54,12 @@ module.exports = React.createClass
|
|
53
54
|
<i className='glyphicon glyphicon-link' />
|
54
55
|
</a>
|
55
56
|
</span>
|
56
|
-
</
|
57
|
-
<
|
58
|
-
|
59
|
-
|
57
|
+
</div>
|
58
|
+
<div style={overflow:'scroll',width:'100%',height:'80%',wordWrap:'break-word'}>
|
59
|
+
<p>
|
60
|
+
<div dangerouslySetInnerHTML={__html: markdownIt.render @props.card.get('content')} />
|
61
|
+
</p>
|
62
|
+
</div>
|
60
63
|
</div>
|
61
64
|
</div>
|
62
65
|
</div>
|
@@ -3,6 +3,7 @@ React = require('react')
|
|
3
3
|
List = require('./list')
|
4
4
|
CardCollection = require('../models/cards')
|
5
5
|
CardModel = require('../models/card')
|
6
|
+
config = require('../../shared/config.json')
|
6
7
|
|
7
8
|
module.exports = React.createClass
|
8
9
|
displayName: 'Content'
|
@@ -33,7 +34,7 @@ module.exports = React.createClass
|
|
33
34
|
title.push(k + ': ' + v)
|
34
35
|
title = title.join(', ')
|
35
36
|
title = 'search: ' + cards.query.title + ' (' + title + ')' if cards.query.title
|
36
|
-
title += ' -
|
37
|
+
title += ' - ' + config.title
|
37
38
|
document.title = title
|
38
39
|
<List key='list' cards={cards} showNav=true />
|
39
40
|
when "show"
|
@@ -59,7 +60,7 @@ module.exports = React.createClass
|
|
59
60
|
cards.fetching = false
|
60
61
|
error: (card, response)=>
|
61
62
|
console.log response
|
62
|
-
document.title = card.get('title') + ' -
|
63
|
+
document.title = card.get('title') + ' - ' + config.title
|
63
64
|
<List key='show' cards={cards} showNav=false />
|
64
65
|
else
|
65
66
|
console.log 'else'
|
@@ -39,7 +39,7 @@ module.exports = React.createClass
|
|
39
39
|
@setState updating: false
|
40
40
|
|
41
41
|
render: ->
|
42
|
-
<Modal {...@props} bsStyle='default' title={if @props.card.isNew() then
|
42
|
+
<Modal {...@props} bsStyle='default' title={if @props.card.isNew() then <i className="glyphicon glyphicon-plus" /> else <i className="glyphicon glyphicon-edit" />} animation={false}>
|
43
43
|
<div className='modal-body'>
|
44
44
|
{
|
45
45
|
if @state.errors
|
@@ -76,36 +76,61 @@ module.exports = React.createClass
|
|
76
76
|
if @props.cards.query.order == 'random'
|
77
77
|
<ul className="nav nav-pills pull-right">
|
78
78
|
<li>
|
79
|
-
|
80
|
-
|
81
|
-
|
79
|
+
{
|
80
|
+
if @props.cards.page
|
81
|
+
<a href={"/#/?" + @randomParam()} style={{padding:'6px 12px'}}>
|
82
|
+
<i className="glyphicon glyphicon-refresh" />
|
83
|
+
</a>
|
84
|
+
else
|
85
|
+
<a href="javascript:void(0)" style={{padding:'6px 12px'}}>
|
86
|
+
<i className="glyphicon glyphicon-refresh glyphicon-refresh-animate" />
|
87
|
+
</a>
|
88
|
+
}
|
82
89
|
</li>
|
83
90
|
</ul>
|
84
91
|
else
|
85
|
-
|
86
|
-
<
|
92
|
+
<ul className="nav nav-pills pull-right">
|
93
|
+
<li>
|
87
94
|
{
|
88
|
-
if @props.cards.page
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
{@props.cards.page.current} / {@props.cards.page.total}
|
95
|
+
if @props.cards.page
|
96
|
+
if @props.cards.page.current > 1
|
97
|
+
href = "/#/?" + @pageParam(@props.cards.page.current - 1)
|
98
|
+
else
|
99
|
+
href = "/#/?" + @pageParam(@props.cards.page.total)
|
100
|
+
else
|
101
|
+
href = "javascript:void(0)"
|
102
|
+
<a href={href} aria-label="Previous" style={{padding:'6px 12px'}}>
|
103
|
+
<span aria-hidden="true">«</span>
|
98
104
|
</a>
|
99
|
-
|
105
|
+
}
|
106
|
+
</li>
|
107
|
+
<li style={width:'4.0em',textAlign:'center'}>
|
100
108
|
{
|
101
|
-
if @props.cards.page
|
102
|
-
<
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
109
|
+
if @props.cards.page
|
110
|
+
<a href={"/#/?" + @pageParam(@props.cards.page.current)} style={{padding:'6px 12px'}}>
|
111
|
+
{@props.cards.page.current} / {@props.cards.page.total}
|
112
|
+
</a>
|
113
|
+
else
|
114
|
+
<a href="javascript:void(0)" style={{padding:'6px 12px'}}>
|
115
|
+
<i className="glyphicon glyphicon-refresh glyphicon-refresh-animate" />
|
116
|
+
</a>
|
107
117
|
}
|
108
|
-
</
|
118
|
+
</li>
|
119
|
+
<li>
|
120
|
+
{
|
121
|
+
if @props.cards.page
|
122
|
+
if @props.cards.page.current < @props.cards.page.total
|
123
|
+
href = "/#/?" + @pageParam(@props.cards.page.current + 1)
|
124
|
+
else
|
125
|
+
href = "/#/?" + @pageParam(1)
|
126
|
+
else
|
127
|
+
href = "javascript:void(0)"
|
128
|
+
<a href={href} aria-label="Next" style={{padding:'6px 12px'}}>
|
129
|
+
<span aria-hidden="true">»</span>
|
130
|
+
</a>
|
131
|
+
}
|
132
|
+
</li>
|
133
|
+
</ul>
|
109
134
|
}
|
110
135
|
</div>
|
111
136
|
</div>
|
data/lib/carte/server.rb
CHANGED
data/lib/carte/server/version.rb
CHANGED
data/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "carte-client",
|
3
3
|
"description": "something like dictionary, wiki, or information card",
|
4
|
-
"version": "0.0.
|
4
|
+
"version": "0.0.4",
|
5
5
|
"main": "lib/carte.coffee",
|
6
6
|
"scripts": {
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
@@ -31,6 +31,7 @@
|
|
31
31
|
"gulp-uglify": "^1.2.0",
|
32
32
|
"gulp-util": "^3.0.4",
|
33
33
|
"jquery": "^2.1.3",
|
34
|
+
"markdown-it": "^4.2.0",
|
34
35
|
"react": "^0.13.2",
|
35
36
|
"react-bootstrap": "^0.21.0",
|
36
37
|
"vinyl-source-stream": "^1.1.0",
|
data/screenshot.png
ADDED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carte-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tily
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -219,6 +219,7 @@ files:
|
|
219
219
|
- mongoid.yml
|
220
220
|
- package.json
|
221
221
|
- public/images/icon.png
|
222
|
+
- screenshot.png
|
222
223
|
- spec/server_spec.rb
|
223
224
|
homepage: ''
|
224
225
|
licenses:
|