awesome-redux: style

This commit is contained in:
Rico Sta. Cruz 2017-09-04 14:19:43 +08:00
parent 67f6632e07
commit d01c10a1fe
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
5 changed files with 51 additions and 26 deletions

View File

@ -0,0 +1,10 @@
/*
* For links with sources, eg,
* [Foo](foo.com) _(foo.com)_
*/
.MarkdownBody.MarkdownBody {
a + em {
opacity: 0.5;
}
}

View File

@ -2,11 +2,15 @@
* Crosslink (eg, phoenix.md) * Crosslink (eg, phoenix.md)
*/ */
.MarkdownBody p.-crosslink { .MarkdownBody.MarkdownBody p.-crosslink {
& > a { & > a {
display: block; display: block;
text-decoration: none; text-decoration: none;
color: $base-a; color: $base-a;
border-bottom: 0;
box-shadow: none;
margin: -16px;
padding: 16px;
} }
& > a:visited { & > a:visited {
@ -15,10 +19,11 @@
& > a::before { & > a::before {
@include ion-icon('md-arrow-forward'); @include ion-icon('md-arrow-forward');
font-size: 24px;
margin-right: 16px; margin-right: 16px;
width: 24px; width: 32px;
height: 24px; height: 32px;
line-height: 24px; line-height: 32px;
text-align: center; text-align: center;
border-radius: 50%; border-radius: 50%;
} }

View File

@ -11,6 +11,7 @@
@import './placeholders/push-button'; @import './placeholders/push-button';
@include ion-font; @include ion-font;
@import './base/base'; @import './base/base';
@import './markdown/a-em';
@import './markdown/code'; @import './markdown/code';
@import './markdown/headings'; @import './markdown/headings';
@import './markdown/p'; @import './markdown/p';

View File

@ -25,7 +25,8 @@ err = new Error()
increment(err) === { type: 'INCREMENT', payload: err, error: true } 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 ### 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 } { 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 ### 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 ### reduce-reducers
Combines reducers (like *combineReducers()*), but without namespacing magic. Combines reducers (like *combineReducers()*), but without namespacing magic.
@ -66,7 +69,8 @@ re = reduceReducers(
re(10, { number: 2 }) //=> 14 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 ### redux-logger
@ -77,7 +81,8 @@ Logs actions to your console.
// Nothing to see here // Nothing to see here
``` ```
See: [redux-logger](https://github.com/evgenyrodionov/redux-logger) [redux-logger](https://github.com/evgenyrodionov/redux-logger)
{: .-crosslink}
Async Async
----- -----
@ -92,7 +97,8 @@ increment = createAction('INCREMENT') // redux-actions
increment(Promise.resolve(42)) increment(Promise.resolve(42))
``` ```
See: [redux-promise](https://github.com/acdlite/redux-promise) [redux-promise](https://github.com/acdlite/redux-promise)
{: .-crosslink}
### redux-promises ### redux-promises
@ -115,7 +121,8 @@ store.dispatch(fetchData('/posts'))
fetchData('/posts')(store.dispatch) 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 ### 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 ### 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}

View File

@ -19,7 +19,7 @@ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_
mix phx.new hello 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)_ See: [Installation](https://hexdocs.pm/phoenix/installation.html) _(hexdocs.pm)_
### Directory structure ### Directory structure
@ -54,9 +54,6 @@ See: [Adding pages](https://hexdocs.pm/phoenix/adding_pages.html) _(hexdocs.pm)_
### Migrations ### Migrations
[Ecto migrations cheatsheet](./phoenix-migrations)
{: .-crosslink}
```bash ```bash
$ mix ecto.gen.migration update_posts_table $ mix ecto.gen.migration update_posts_table
creating priv/repo/migrations/20160602085927_update_posts_table.exs creating priv/repo/migrations/20160602085927_update_posts_table.exs
@ -74,11 +71,11 @@ create table(:documents) do
end end
``` ```
### Routing [Ecto migrations cheatsheet](./phoenix-migrations)
[Phoenix routing cheatsheet](./phoenix-routing)
{: .-crosslink} {: .-crosslink}
### Routing
```elixir ```elixir
get "/", PageController, :index 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 user_post_path(:show, 17, 12) # → /users/17/posts/12
``` ```
### Conn [Phoenix routing cheatsheet](./phoenix-routing)
[Phoenix conn cheatsheet](./phoenix-conn)
{: .-crosslink} {: .-crosslink}
### Conn
```elixir ```elixir
conn.host # → "example.com" conn.host # → "example.com"
conn.method # → "GET" conn.method # → "GET"
@ -116,11 +113,11 @@ conn
|> render(MyApp.ErrorView, "404.html") |> render(MyApp.ErrorView, "404.html")
``` ```
### Ecto [Phoenix conn cheatsheet](./phoenix-conn)
[Ecto cheatsheet](./phoenix-ecto)
{: .-crosslink} {: .-crosslink}
### Ecto
```bash ```bash
$ mix phx.gen.html \ $ mix phx.gen.html \
Accounts \ # domain Accounts \ # domain
@ -130,6 +127,9 @@ $ mix phx.gen.html \
age:integer age:integer
``` ```
[Ecto cheatsheet](./phoenix-ecto)
{: .-crosslink}
### Also see ### Also see
- [Phoenix framework site](http://phoenixframework.org/) _(phoenixframework.org)_ - [Phoenix framework site](http://phoenixframework.org/) _(phoenixframework.org)_