phoenix: update style
This commit is contained in:
parent
979f089eda
commit
5bb56dc3bc
|
@ -1,34 +1,3 @@
|
||||||
.push-button {
|
.push-button {
|
||||||
display: inline-block;
|
@extend %push-button;
|
||||||
text-decoration: none;
|
|
||||||
padding: 8px 16px;
|
|
||||||
border-radius: 3px;
|
|
||||||
|
|
||||||
&,
|
|
||||||
&:visited {
|
|
||||||
background-color: $base-a;
|
|
||||||
background: $base-a-gradient;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus {
|
|
||||||
background: darken($base-a, 16%);
|
|
||||||
box-shadow: none;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.push-button.-dark {
|
|
||||||
&,
|
|
||||||
&:visited {
|
|
||||||
background: darken($base-a, 16%);
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus {
|
|
||||||
background: darken($base-a, 24%);
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,8 @@
|
||||||
|
|
||||||
.MarkdownBody pre.-setup,
|
.MarkdownBody pre.-setup,
|
||||||
.MarkdownBody p.-setup,
|
.MarkdownBody p.-setup,
|
||||||
.MarkdownBody ul.-setup {
|
.MarkdownBody ul.-setup,
|
||||||
|
.MarkdownBody p.-crosslink {
|
||||||
background: $gray-bg;
|
background: $gray-bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
/*
|
||||||
|
* Crosslink (eg, phoenix.md)
|
||||||
|
*/
|
||||||
|
|
||||||
|
.MarkdownBody p.-crosslink {
|
||||||
|
& > a {
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
|
color: $base-a;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > a:visited {
|
||||||
|
color: $base-a;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > a::before {
|
||||||
|
@include ion-icon('md-arrow-forward');
|
||||||
|
margin-right: 16px;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
line-height: 24px;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > a,
|
||||||
|
& > a:visited {
|
||||||
|
&::before {
|
||||||
|
background: $base-a;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& > a:hover,
|
||||||
|
& > a:focus {
|
||||||
|
& {
|
||||||
|
color: $base-a7;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
background: $base-a7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
%push-button {
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 8px 16px;
|
||||||
|
border-radius: 3px;
|
||||||
|
|
||||||
|
&,
|
||||||
|
&:visited {
|
||||||
|
background-color: $base-a;
|
||||||
|
background: $base-a-gradient;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
background: darken($base-a, 16%);
|
||||||
|
box-shadow: none;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
%push-button.-dark {
|
||||||
|
&,
|
||||||
|
&:visited {
|
||||||
|
background: darken($base-a, 16%);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
background: darken($base-a, 24%);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,10 +8,12 @@
|
||||||
@import './utils/heading-style';
|
@import './utils/heading-style';
|
||||||
@import './utils/section-gutter';
|
@import './utils/section-gutter';
|
||||||
@import './utils/section-with-container';
|
@import './utils/section-with-container';
|
||||||
|
@import './placeholders/push-button';
|
||||||
@include ion-font;
|
@include ion-font;
|
||||||
@import './base/base';
|
@import './base/base';
|
||||||
@import './markdown/code';
|
@import './markdown/code';
|
||||||
@import './markdown/headings';
|
@import './markdown/headings';
|
||||||
|
@import './markdown/p';
|
||||||
@import './markdown/table';
|
@import './markdown/table';
|
||||||
@import './markdown/ul';
|
@import './markdown/ul';
|
||||||
@import './components/attribute-peg';
|
@import './components/attribute-peg';
|
||||||
|
|
17
phoenix.md
17
phoenix.md
|
@ -54,8 +54,8 @@ See: [Adding pages](https://hexdocs.pm/phoenix/adding_pages.html) _(hexdocs.pm)_
|
||||||
|
|
||||||
### Migrations
|
### Migrations
|
||||||
|
|
||||||
See [Ecto migrations cheatsheet](./phoenix-migrations).
|
[Ecto migrations cheatsheet](./phoenix-migrations)
|
||||||
{: .-setup}
|
{: .-crosslink}
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ mix ecto.gen.migration update_posts_table
|
$ mix ecto.gen.migration update_posts_table
|
||||||
|
@ -76,8 +76,8 @@ end
|
||||||
|
|
||||||
### Routing
|
### Routing
|
||||||
|
|
||||||
See [Phoenix routing cheatsheet](./phoenix-routing).
|
[Phoenix routing cheatsheet](./phoenix-routing)
|
||||||
{: .-setup}
|
{: .-crosslink}
|
||||||
|
|
||||||
```elixir
|
```elixir
|
||||||
get "/", PageController, :index
|
get "/", PageController, :index
|
||||||
|
@ -94,8 +94,8 @@ user_post_path(:show, 17, 12) #=> /users/17/posts/12
|
||||||
|
|
||||||
### Conn
|
### Conn
|
||||||
|
|
||||||
See [Phoenix conn cheatsheet](./phoenix-conn).
|
[Phoenix conn cheatsheet](./phoenix-conn)
|
||||||
{: .-setup}
|
{: .-crosslink}
|
||||||
|
|
||||||
```elixir
|
```elixir
|
||||||
conn.host #=> "example.com"
|
conn.host #=> "example.com"
|
||||||
|
@ -118,9 +118,8 @@ conn
|
||||||
|
|
||||||
### Ecto
|
### Ecto
|
||||||
|
|
||||||
|
[Ecto cheatsheet](./phoenix-ecto)
|
||||||
See [Ecto cheatsheet](./phoenix-ecto).
|
{: .-crosslink}
|
||||||
{: .-setup}
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ mix phx.gen.html \
|
$ mix phx.gen.html \
|
||||||
|
|
Loading…
Reference in New Issue