Skip to content

Commit

Permalink
Merge pull request #190 from ember-learn/fixing-page-header
Browse files Browse the repository at this point in the history
Fixing page header
  • Loading branch information
mansona authored Jul 5, 2019
2 parents bc70bdd + 0d8f30f commit 266a165
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 2 deletions.
3 changes: 3 additions & 0 deletions addon/styles/components/es-page-header.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.es-page-header {
padding-top: 4.5rem;
padding-bottom: 4.5rem;
background-image: url('/images/pattern-1.svg');
background-repeat: no-repeat;
background-position: bottom right;
}

.es-page-header__title {
Expand Down
4 changes: 4 additions & 0 deletions addon/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ h6 {
.dark {
background-color: var(--color-dark);
color: var(--color-light);

& a {
color: var(--color-light);
}
}

.bg-muted {
Expand Down
4 changes: 4 additions & 0 deletions addon/styles/helpers.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
.margin-bottom-small {
margin-bottom: 2rem;
}

.margin-left-small {
margin-left: 2rem;
}
4 changes: 2 additions & 2 deletions addon/templates/components/es-page-header.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="es-page-header" ...attributes>
<div class="container">
<h1 class="xlarge">{{@headline}}</h1>
<h1 class="large">{{@headline}}</h1>

<p>{{@detail}}</p>
<p class="{{if hasBlock 'margin-bottom-small'}}">{{@detail}}</p>

{{yield}}
</div>
Expand Down
18 changes: 18 additions & 0 deletions docs/css/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,21 @@ if you would like a section or a div to use the dark style then you need to add
hello there
</div>
```

## margins

If you would like to add a bit of margin to the bottom or left of something (for example in a vertical or horizontal list) there are two simple helpers to add a small amount of margin: `margin-bottom-small` and `margin-left-small`.

```html
<ul>
<li class="margin-bottom-small">One</li>
<li>Two</li>
<li>Three</li>
</ul>
```

```html
<button>One</button>
<button class="margin-left-small">Two</button>
<button>Three</button>
```
20 changes: 20 additions & 0 deletions public/images/pattern-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions tests/dummy/app/styles/app.css
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
@import "color-pallet";

.self-executing-code-block {
margin-bottom: 2rem;
}

0 comments on commit 266a165

Please sign in to comment.