Skip to content

Commit b92b9b2

Browse files
committed
implementing basic background shapes
1 parent 805971f commit b92b9b2

File tree

12 files changed

+130
-24
lines changed

12 files changed

+130
-24
lines changed

addon/styles/addon.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
@import "helpers.css";
77
@import "layout.css";
88
@import "icon.css";
9+
@import "background-shapes.css";
910

1011
@import "components/es-navbar.css";
1112
@import "components/es-header.css";

addon/styles/background-shapes.css

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.bg-shape-boxes {
2+
background-image: url('/images/boxes-top.svg');
3+
background-repeat: no-repeat;
4+
background-position: top right;
5+
}
6+
7+
.bg-shape-boxes-bottom {
8+
background-image: url('/images/boxes-bottom-light.svg');
9+
background-repeat: no-repeat;
10+
background-position: bottom right;
11+
}
12+
13+
.dark .bg-shape-boxes-bottom {
14+
background-image: url('/images/boxes-bottom.svg');
15+
}
16+
17+
.bg-shape-boxes-bottom + * {
18+
background-image: url('/images/boxes-bottom-continued.svg');
19+
background-repeat: no-repeat;
20+
background-position: top right;
21+
}
22+
23+
.bg-shape-swipe-top {
24+
background: url(/images/swipe-top.svg) no-repeat top center;
25+
background-size: contain;
26+
}
27+
28+
.bg-shape-swipe-bottom {
29+
background-image: url('/images/swipe-bottom.svg');
30+
background-repeat: no-repeat;
31+
background-position: bottom left;
32+
}

addon/styles/components/es-page-header.css

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
.es-page-header {
22
padding-top: 4.5rem;
33
padding-bottom: 4.5rem;
4-
background-image: url('/images/pattern-1.svg');
5-
background-repeat: no-repeat;
6-
background-position: bottom right;
74
}
85

96
.es-page-header__title {

addon/templates/components/es-page-header.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="es-page-header" ...attributes>
1+
<div class="es-page-header bg-shape-boxes-bottom" ...attributes>
22
<div class="container">
33
<h1 class="large">{{@headline}}</h1>
44

docs/concepts/background-shapes.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Background Shapes
2+
3+
In the new design we have a number of background shapes that can be used to spruce up the design of sections of the website if necessary.
4+
5+
## Background boxes
6+
7+
To use the "background boxes" shape then you need to use the `bg-shape-boxes` css helper as follows
8+
9+
```html
10+
<div class="layout-grid bg-shape-boxes dark padding-vertical-large">
11+
<div class="col-4-large offset-1-large text-center">
12+
<h2>Build with the teams that never stop shipping.</h2>
13+
<p>Some of the best development teams in the world have been iterating on their products for years with Ember. With scalable UI architecture baked-in from the start, you’ll be working with the same patterns these organizations use every step of the way.</p>
14+
</div>
15+
<div class="col-4-large offset-1-large text-center">
16+
<h2>More stuff to show location of boxes</h2>
17+
</div>
18+
</div>
19+
```
20+
21+
There is an alternative "background boxes" shape that you can use with `bg-shape-boxes-bottom` that will automatically continue into the following dom node (e.g. the next div)
22+
23+
```html
24+
<div class="layout-grid bg-shape-boxes-bottom dark padding-vertical-large">
25+
<div class="col-4-large offset-1-large text-center">
26+
<h2>Build with the teams that never stop shipping.</h2>
27+
<p>Some of the best development teams in the world have been iterating on their products for years with Ember. With scalable UI architecture baked-in from the start, you’ll be working with the same patterns these organizations use every step of the way.</p>
28+
</div>
29+
</div>
30+
<div class="layout-grid padding-vertical-medium">
31+
<div class="col-4-large offset-1-large text-center">
32+
<h2>More content to show off the shapes</h2>
33+
<p>Some of the best development teams in the world have been iterating on their products for years with Ember. With scalable UI architecture baked-in from the start, you’ll be working with the same patterns these organizations use every step of the way.</p>
34+
</div>
35+
</div>
36+
```
37+
38+
If you are using the [PageHeader component](/components/page-header/) then you will automatically have `bg-shape-boxes-bottom` set and it will automatically continue into the next dom node:
39+
40+
```html
41+
<EsPageHeader
42+
@headline="Demo for background shapes"
43+
@detail="This section is using boxes-bottom and continues in the the next section"
44+
class="dark"
45+
>
46+
<EsButton>Go</EsButton>
47+
</EsPageHeader>
48+
<div class="layout-grid">
49+
<div class="col-4-large offset-1-large text-center">
50+
<h2>Build with the teams that never stop shipping.</h2>
51+
<p>Some of the best development teams in the world have been iterating on their products for years with Ember. With scalable UI architecture baked-in from the start, you’ll be working with the same patterns these organizations use every step of the way.</p>
52+
</div>
53+
</div>
54+
```
55+
56+
## Swipes
57+
58+
The other type of background shape is a "swipe" that can either be a swipe across the top of the section using `bg-shape-swipe-top` or a rectangle from the bottom of the section using `bg-shape-swipe-bottom`.
59+
60+
```html
61+
<div class="layout-grid bg-shape-swipe-top">
62+
<div class="col-4-large offset-1-large text-center margin-vertical-large">
63+
<h2>Build with the teams that never stop shipping.</h2>
64+
<p>Some of the best development teams in the world have been iterating on their products for years with Ember. With scalable UI architecture baked-in from the start, you’ll be working with the same patterns these organizations use every step of the way.</p>
65+
</div>
66+
<div class="col-4-large offset-1-large text-center margin-vertical-large">
67+
<h2>More stuff to show location of swipe</h2>
68+
</div>
69+
<div class="col-4-large offset-1-large text-center margin-vertical-large">
70+
<h2>yes this needs quite a large section</h2>
71+
</div>
72+
</div>
73+
```
74+
75+
and then using the `bg-shape-swipe-bottom` we can get a shape for the bottom of a section:
76+
77+
```html
78+
<div class="layout-grid dark bg-shape-swipe-bottom">
79+
<div class="col-4-large offset-1-large text-center margin-vertical-large">
80+
<h2>Build with the teams that never stop shipping.</h2>
81+
<p>Some of the best development teams in the world have been iterating on their products for years with Ember. With scalable UI architecture baked-in from the start, you’ll be working with the same patterns these organizations use every step of the way.</p>
82+
</div>
83+
<div class="col-4-large offset-1-large text-center margin-vertical-large">
84+
<h2>More stuff to show location of swipe</h2>
85+
</div>
86+
<div class="col-4-large offset-1-large text-center margin-vertical-large">
87+
<h2>yes this needs quite a large section</h2>
88+
</div>
89+
</div>
90+
```
Lines changed: 1 addition & 0 deletions
Loading

public/images/boxes-bottom-light.svg

Lines changed: 1 addition & 0 deletions
Loading

public/images/boxes-bottom.svg

Lines changed: 1 addition & 0 deletions
Loading

public/images/boxes-top.svg

Lines changed: 1 addition & 0 deletions
Loading

public/images/pattern-1.svg

Lines changed: 0 additions & 20 deletions
This file was deleted.

public/images/swipe-bottom.svg

Lines changed: 1 addition & 0 deletions
Loading

public/images/swipe-top.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)