Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing page header #190

Merged
merged 1 commit into from
Jul 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}