You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add dynamic doc listing
* Remove index file from git project
* Initialize band layout
* Add updates to theme for band layout support
* Revert changes from doc listing update branch
* Revert doc changes from dynamic listing branch
* Updating and tidying up structure for band layout
* Update documentation for new sass functions
* Updating values and fixing attribute push
* JS tidy and rhelement cleanup
* Remove deprecated functions
* Tidy up styles for the band layout
* Updating syntax to support aside positioning
* Clean up the storybook template
* Clean up storybook template
* Update band logic to fix error
* Update band layout; fix discrepency in aside alignment
* US162827-band-layout-CSS-fork Added in cp-theme, added some helper text to the demo file to show what layouts are being applied; Adjusted CSS relating to padding and width for the band wrapper, container, & aside regions
* Got the local function working, update band demo file to include more examples, update band sass to accommodate for css var overrides + flexbox
* origin/US162827-band-layout-CSS-fork put back order of band demos; comment out cp theme suggestions - needs discussion
* origin/US162827-band-layout-CSS-fork adjust padding variable naming convention to match BEM
* origin/US162827-band-layout-CSS-fork adjust values of default widths on aside regions, comment out override examples
* origin/US162827-band-layout-CSS-fork put back paragraph styles into CP theme
* origin/US162827-band-layout-CSS-fork remove commented out code from CP theme
* Update cp-theme.scss
clean up spaces
* Rename rh-band to pfe-band
* Fussing with adding schema and building dynamic storybook
* Commit updated compiled assets
* Add dynamic schema rendering
* Clean up storybook implementation for previewing
* Add tooling for storybook to auto-generate components and content; dynamically pull in schema
* Update compile task to work if schema is present or not; update pfe-card to set container type and update ctas too; fix style issues in pfe-band
* Fix prefixing issue
* Recompile and update variable name to pfe-
* Fix issue with storybook not rendering aside
* Fallbacks for Grid
* Commit current test state
* adding pfe-band header to demo page
* Remove unnecessary file edits from this PR
* Update tests for pfe-band
* Add a todo for aside tests
* Update readme
* Update logic and fix layout but in pfe-band
* Compile and add polyfills
* Add a README update to clarify slot names
* Remove inline comments for unused code
* Fix issue with storybook instance
* Reduce complexity in the band styles; simplify and bring together grid styles
* Compile after merging in master
* Fix band layout!!!
* Update rendering for storybook
* Update storybook to honor input fields for content
* Revert files that were edited by IDE
* Add context setting on card layout as well
* Updating functionality for json schema implementation
* Update pfelement to clean up the commented out code; beautify run on pfe-band.story.js
* Update BEM naming in band styles; update the demo page for band; add the context update to card; added a fill-height helper class for layouts to allow a flex-grow approach with grid too; updated the pfe-local function to accept fallbacks
* Push up BEM updates; getting IE to work with demo page
* Commit UMD compiled assets
* Add this.props abstraction for properties in pfelement; update demo page with better comments
* Add variables for horizontal and vertical gutters
* Add viewport in demo template
* Updated demo listing page
* Update pfe-band test for new slot names
* Documentation updates requested in code review
* updating the readme
* Pull out files that are unrelated; note that we need to open a PR to run the build on all assets in the repo to prevent this in future
* Update prerelease versions
* Update test defaults for weird CI failure
* Comment out tests that depend on viewport width
This container element provides a set of slots in which to render banded content.
4
+
5
+
## Slots
6
+
7
+
All slots other than `pfe-band--body` are optional. If the slot is not defined, the container tag for it will not be rendered in the template.
8
+
9
+
-`pfe-band--header`: This slot renders at the top of the container and generally contains the title, headline, and or subheadline content. Other possible candidates include a set of social sharing links or tags that describe the content below. The recommended tag for this slot is the `header` tag with h-level or p tags contained within it.
10
+
-**Default slot**: This is the default slot and contains the bulk of the content in this element. Paragraph text or a grid of cards or images might be rendered in this region. Recommended tag for this slot is the `article` tag. Any content not assigned to a slot will be rendered here.
11
+
-`pfe-band--footer`: This slot is typically used for calls-to-action or footnotes and is pushed to the bottom of the container. Recommended tags include `pfe-cta` or `footer`.
12
+
-`pfe-band--aside`: This slot is for content that should be rendered to the right or left of the default slot on desktop. Asides often contain `pfe-card` or interest forms which provide users a little more information or context for the band.
13
+
14
+
## Attributes
15
+
16
+
<style>
17
+
.color-preview {
18
+
display: inline-block;
19
+
width: 1em;
20
+
height: 1em;
21
+
vertical-align: middle;
22
+
background-color: var(--bg, #ffffff);
23
+
border: 1pxsolid#444444;
24
+
}
25
+
</style>
26
+
27
+
There are several attributes available for customizing the visual treatment of this container.
28
+
29
+
-`pfe-color`: Options include darkest, darker, accent, complement, lighter, lightest. The band has a default value of `#dfdfdf`. Your theme will influence these colors so check there first if you are seeing inconsistencies.
-`pfe-img-src`: Optional background image applied to the entire band container. Alignment of this image can be managed using the `--pfe-band--BackgroundPosition` variable which is set to `center center` by default.
42
+
-`pfe-size`: Optionally adjusts the padding on the container. Accepts: `small`.
43
+
44
+
### Aside settings
45
+
The aside settings have defaults and if no attribute is defined on the element's main tag, these attributes will be injected with their default values automatically.
46
+
47
+
-`pfe-aside-desktop`: This influences where the aside is rendered at the desktop view and are indicated relative to the body content. Options are `right` or `left`. **Right is the default.**
48
+
-`pfe-aside-mobile`: This influences the position of the aside in the mobile view as well as where in the DOM the aside markup is rendered. These names are relative to the body content. Options are `top` or `bottom`. **Bottom is the default.**
49
+
-`pfe-aside-height`: This influences the height of the aside region relative to the body content. Options are `full` or `body`. A `full` height starts at the top of the band and spans the header, body, and footer regions. A `body` height spans the body and footer regions only with the header region sitting above it in the rendered view. **Body is the default.**
50
+
51
+
## Variables
52
+
There are several powerful variables available to hook into and override default styles.
53
+
54
+
- Verical and horizontal padding: `--pfe-band--Padding--vertical` and `--pfe-band--Padding--horizontal` accept size values such as px, em, rem, etc.
55
+
- Background color: Though using the `pfe-color` attribute is strongly recommended when setting the background color for the band, you can also use completely custom colors by updating the `--pfe-band--BackgroundColor` variable. If you update this value manually, you should also update the `--pfe-broadcasted--color--text`, `--pfe-broadcasted--color--ui-link`[--visited, --hover, --focus] at the same time so that the text and links rendered on this background color show up correctly.
56
+
- Background position: This is designed for use with the `pfe-img-src` attribute to allow you to align your background image. Default value is `center center`.
57
+
- Border: This allows the customization of a border around the entire container and is primarily designed to be used to add a top and/or bottom border line. This variable accepts the entire border shorthand and is set to transparent by default.
58
+
- Layout: The band has a rudimentary layout system designed to be used inside the slot regions for the header, body, footer, and aside. It uses the CSS grid spec and creates a stacked layout by default. By updating these values, you will be able to create simple grid layouts. Please note that these do not include fallbacks for older browsers. Possible values include: `1fr 1fr`, `repeat(3, 1fr)`, `repeat(auto-fill, minmax(300px, 1fr))`
59
+
*`--pfe-band--layout`: Applied to `.pfe-band__container`.
60
+
*`--pfe-band_header--layout`: Applied to `.pfe-band__header`.
61
+
*`--pfe-band_body--layout`: Applied to `.pfe-band__body`.
62
+
*`--pfe-band_footer--layout`: Applied to `.pfe-band__footer`.
63
+
*`--pfe-band_aside--layout`: Applied to `.pfe-band__aside`.
64
+
65
+
## Test
66
+
67
+
npm run test
68
+
69
+
## Build
70
+
71
+
npm run build
72
+
73
+
## Demo
74
+
75
+
From the PFElements root directory, run:
76
+
77
+
npm start
78
+
79
+
## Code style
80
+
81
+
Band (and all PatternFly Elements) use [Prettier][prettier] to auto-format JS and JSON. The style rules get applied when you commit a change. If you choose to, you can [integrate your editor][prettier-ed] with Prettier to have the style rules applied on every save.
0 commit comments