|
| 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 | +``` |
0 commit comments