awesome-redux: style
This commit is contained in:
parent
67f6632e07
commit
d01c10a1fe
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* For links with sources, eg,
|
||||
* [Foo](foo.com) _(foo.com)_
|
||||
*/
|
||||
|
||||
.MarkdownBody.MarkdownBody {
|
||||
a + em {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
|
@ -2,11 +2,15 @@
|
|||
* Crosslink (eg, phoenix.md)
|
||||
*/
|
||||
|
||||
.MarkdownBody p.-crosslink {
|
||||
.MarkdownBody.MarkdownBody p.-crosslink {
|
||||
& > a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
color: $base-a;
|
||||
border-bottom: 0;
|
||||
box-shadow: none;
|
||||
margin: -16px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
& > a:visited {
|
||||
|
@ -15,10 +19,11 @@
|
|||
|
||||
& > a::before {
|
||||
@include ion-icon('md-arrow-forward');
|
||||
font-size: 24px;
|
||||
margin-right: 16px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
@import './placeholders/push-button';
|
||||
@include ion-font;
|
||||
@import './base/base';
|
||||
@import './markdown/a-em';
|
||||
@import './markdown/code';
|
||||
@import './markdown/headings';
|
||||
@import './markdown/p';
|
||||
|
|
|
@ -25,7 +25,8 @@ err = new Error()
|
|||
increment(err) === { type: 'INCREMENT', payload: err, error: true }
|
||||
```
|
||||
|
||||
See: [redux-actions](https://www.npmjs.com/package/redux-actions)
|
||||
[redux-actions](https://www.npmjs.com/package/redux-actions)
|
||||
{: .-crosslink}
|
||||
|
||||
### flux-standard-ation
|
||||
|
||||
|
@ -37,7 +38,8 @@ A standard for flux action objects. An action may have an `error`, `payload` and
|
|||
{ type: 'ADD_TODO', payload: new Error(), error: true }
|
||||
```
|
||||
|
||||
See: [flux-standard-action](https://github.com/acdlite/flux-standard-action)
|
||||
[flux-standard-action](https://github.com/acdlite/flux-standard-action)
|
||||
{: .-crosslink}
|
||||
|
||||
### redux-multi
|
||||
|
||||
|
@ -51,7 +53,8 @@ store.dispatch([
|
|||
])
|
||||
```
|
||||
|
||||
See: [redux-multi](https://github.com/ashaffer/redux-multi)
|
||||
[redux-multi](https://github.com/ashaffer/redux-multi)
|
||||
{: .-crosslink}
|
||||
|
||||
### reduce-reducers
|
||||
Combines reducers (like *combineReducers()*), but without namespacing magic.
|
||||
|
@ -66,7 +69,8 @@ re = reduceReducers(
|
|||
re(10, { number: 2 }) //=> 14
|
||||
```
|
||||
|
||||
See: [reduce-reducers](https://www.npmjs.com/package/reduce-reducers)
|
||||
[reduce-reducers](https://www.npmjs.com/package/reduce-reducers)
|
||||
{: .-crosslink}
|
||||
|
||||
### redux-logger
|
||||
|
||||
|
@ -77,7 +81,8 @@ Logs actions to your console.
|
|||
// Nothing to see here
|
||||
```
|
||||
|
||||
See: [redux-logger](https://github.com/evgenyrodionov/redux-logger)
|
||||
[redux-logger](https://github.com/evgenyrodionov/redux-logger)
|
||||
{: .-crosslink}
|
||||
|
||||
Async
|
||||
-----
|
||||
|
@ -92,7 +97,8 @@ increment = createAction('INCREMENT') // redux-actions
|
|||
increment(Promise.resolve(42))
|
||||
```
|
||||
|
||||
See: [redux-promise](https://github.com/acdlite/redux-promise)
|
||||
[redux-promise](https://github.com/acdlite/redux-promise)
|
||||
{: .-crosslink}
|
||||
|
||||
### redux-promises
|
||||
|
||||
|
@ -115,7 +121,8 @@ store.dispatch(fetchData('/posts'))
|
|||
fetchData('/posts')(store.dispatch)
|
||||
```
|
||||
|
||||
See: [redux-promises](https://www.npmjs.com/package/redux-promises)
|
||||
[redux-promises](https://www.npmjs.com/package/redux-promises)
|
||||
{: .-crosslink}
|
||||
|
||||
### redux-effects
|
||||
|
||||
|
@ -135,7 +142,8 @@ Pass side effects declaratively to keep your actions pure.
|
|||
}
|
||||
```
|
||||
|
||||
See: [redux-effects](https://www.npmjs.com/package/redux-effects)
|
||||
[redux-effects](https://www.npmjs.com/package/redux-effects)
|
||||
{: .-crosslink}
|
||||
|
||||
### redux-thunk
|
||||
|
||||
|
@ -166,4 +174,5 @@ store.dispatch(fetchPosts()).then(() => {
|
|||
})
|
||||
```
|
||||
|
||||
See: [redux-thunk](https://www.npmjs.com/package/redux-thunk)
|
||||
[redux-thunk](https://www.npmjs.com/package/redux-thunk)
|
||||
{: .-crosslink}
|
||||
|
|
26
phoenix.md
26
phoenix.md
|
@ -19,7 +19,7 @@ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_
|
|||
mix phx.new hello
|
||||
```
|
||||
|
||||
Install Erlang, Elixir, Node.js, Postgresql first.
|
||||
Install Erlang, Elixir, Node.js, PostgreSQL first.
|
||||
See: [Installation](https://hexdocs.pm/phoenix/installation.html) _(hexdocs.pm)_
|
||||
|
||||
### Directory structure
|
||||
|
@ -54,9 +54,6 @@ See: [Adding pages](https://hexdocs.pm/phoenix/adding_pages.html) _(hexdocs.pm)_
|
|||
|
||||
### Migrations
|
||||
|
||||
[Ecto migrations cheatsheet](./phoenix-migrations)
|
||||
{: .-crosslink}
|
||||
|
||||
```bash
|
||||
$ mix ecto.gen.migration update_posts_table
|
||||
creating priv/repo/migrations/20160602085927_update_posts_table.exs
|
||||
|
@ -74,11 +71,11 @@ create table(:documents) do
|
|||
end
|
||||
```
|
||||
|
||||
### Routing
|
||||
|
||||
[Phoenix routing cheatsheet](./phoenix-routing)
|
||||
[Ecto migrations cheatsheet](./phoenix-migrations)
|
||||
{: .-crosslink}
|
||||
|
||||
### Routing
|
||||
|
||||
```elixir
|
||||
get "/", PageController, :index
|
||||
|
||||
|
@ -92,11 +89,11 @@ user_post_path(:index, 17) # → /users/17/posts
|
|||
user_post_path(:show, 17, 12) # → /users/17/posts/12
|
||||
```
|
||||
|
||||
### Conn
|
||||
|
||||
[Phoenix conn cheatsheet](./phoenix-conn)
|
||||
[Phoenix routing cheatsheet](./phoenix-routing)
|
||||
{: .-crosslink}
|
||||
|
||||
### Conn
|
||||
|
||||
```elixir
|
||||
conn.host # → "example.com"
|
||||
conn.method # → "GET"
|
||||
|
@ -116,11 +113,11 @@ conn
|
|||
|> render(MyApp.ErrorView, "404.html")
|
||||
```
|
||||
|
||||
### Ecto
|
||||
|
||||
[Ecto cheatsheet](./phoenix-ecto)
|
||||
[Phoenix conn cheatsheet](./phoenix-conn)
|
||||
{: .-crosslink}
|
||||
|
||||
### Ecto
|
||||
|
||||
```bash
|
||||
$ mix phx.gen.html \
|
||||
Accounts \ # domain
|
||||
|
@ -130,6 +127,9 @@ $ mix phx.gen.html \
|
|||
age:integer
|
||||
```
|
||||
|
||||
[Ecto cheatsheet](./phoenix-ecto)
|
||||
{: .-crosslink}
|
||||
|
||||
### Also see
|
||||
|
||||
- [Phoenix framework site](http://phoenixframework.org/) _(phoenixframework.org)_
|
||||
|
|
Loading…
Reference in New Issue