From d01c10a1fe360ac3261afb9b4e69388acbcf0b9f Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Mon, 4 Sep 2017 14:19:43 +0800 Subject: [PATCH] awesome-redux: style --- _sass/2017/markdown/a-em.scss | 10 ++++++++++ _sass/2017/markdown/p.scss | 13 +++++++++---- _sass/2017/style.scss | 1 + awesome-redux.md | 27 ++++++++++++++++++--------- phoenix.md | 26 +++++++++++++------------- 5 files changed, 51 insertions(+), 26 deletions(-) create mode 100644 _sass/2017/markdown/a-em.scss diff --git a/_sass/2017/markdown/a-em.scss b/_sass/2017/markdown/a-em.scss new file mode 100644 index 000000000..0c68aa7c0 --- /dev/null +++ b/_sass/2017/markdown/a-em.scss @@ -0,0 +1,10 @@ +/* + * For links with sources, eg, + * [Foo](foo.com) _(foo.com)_ + */ + +.MarkdownBody.MarkdownBody { + a + em { + opacity: 0.5; + } +} diff --git a/_sass/2017/markdown/p.scss b/_sass/2017/markdown/p.scss index 35022ed4d..756689557 100644 --- a/_sass/2017/markdown/p.scss +++ b/_sass/2017/markdown/p.scss @@ -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%; } diff --git a/_sass/2017/style.scss b/_sass/2017/style.scss index 98080754d..d166cb02f 100644 --- a/_sass/2017/style.scss +++ b/_sass/2017/style.scss @@ -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'; diff --git a/awesome-redux.md b/awesome-redux.md index 676de1427..cb7964369 100644 --- a/awesome-redux.md +++ b/awesome-redux.md @@ -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} diff --git a/phoenix.md b/phoenix.md index badea6059..2c3bc6278 100644 --- a/phoenix.md +++ b/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)_