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

initial draft of a kebab pattern and a card pattern #26

Merged
merged 5 commits into from
Nov 7, 2016
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 source/_data/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"tagClass" : "tag-default",
"dropdownText" : "Dropdown",
"dropdownAriaLabelledby": "Dropdown",
"cardTitleSize": "h4",
"cardTitle": "Title",
"cardContents": "Lorem ipsum dolor sit amet <a href> More Information</a>.",
"dropdownList": ["Action", "Another action", "Something else here"],
"breadcrumbList": ["Back to Top Level", "Second Level", "Third Level"],
"img": {
Expand Down
4 changes: 2 additions & 2 deletions source/_patterns/basics/dropdowns/00-dropdown.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="dropdown {{ dropdownState }}" aria-labelledby="{{ dropdownAriaLabelledby }}">
<div class="dropdown {{ dropdownState }} {{#if pullright}}pull-right{{/if}}" aria-labelledby="{{ dropdownAriaLabelledby }}">
<button type="button" class="btn {{ btnClass }} dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ dropdownText }}
</button>
<div class="dropdown-menu">
<div class="dropdown-menu {{#if pullright}}dropdown-menu-right{{/if}}">
{{#each dropdownList}}
<a class="dropdown-item" href="#">{{this}}</a>
{{/each}}
Expand Down
1 change: 1 addition & 0 deletions source/_patterns/basics/dropdowns/02-dropdown-styles.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{> basics-dropdown dropdownText= "On Right" btnClass="btn-primary" pullright=true }}
{{> basics-dropdown dropdownText= "Primary" btnClass="btn-primary" }}
{{> basics-dropdown dropdownText= "Secondary" btnClass="btn-secondary" }}
{{> basics-dropdown dropdownText= "Success" btnClass="btn-success" }}
Expand Down
35 changes: 35 additions & 0 deletions source/_patterns/components/03-cards/00-card.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

<div class="card pf-card {{#if textCenter}}text-xs-center{{/if}} {{#if cardAccent}}pf-card--accented{{/if}}">
{{#if cardHeader}}
<div class="card-header">
{{#if cardHeaderDropdown}}
{{> basics-dropdown dropdownText="Dropdown" pullright=true }}
{{/if}}
<{{cardTitleSize}} class="card-title">{{{cardTitle}}}</{{cardTitleSize}}>
</div>
<div class="card-block">
{{else}}
<div class="card-block">
{{#if cardTitleIconLarge}}
{{> basics-icon iconFamily="pficon" iconName="pficon-middleware" iconModifier="pf-icon--circle pf-icon--lg mb-pf-lg" }}
{{/if}}
{{#if cardTitleIconMedium}}
{{> basics-icon iconFamily="pficon" iconName="pficon-middleware" iconModifier="pf-icon--circle pf-icon--md mb-pf-md" }}
{{/if}}
<{{cardTitleSize}} class="card-title">{{{cardTitle}}}</{{cardTitleSize}}>
{{/if}}
{{#if @partial-block}}
{{> @partial-block}}
{{else}}
<p class="card-text">{{{cardContents}}}</p>
{{/if}}
</div>
{{#if cardFooter}}
<div class="card-footer text-muted">
{{#if cardFooterDropdown}}
{{> basics-dropdown dropdownText="Dropdown" pullright=true }}
{{/if}}
{{{cardFooterContents}}}
</div>
{{/if}}
</div>
14 changes: 14 additions & 0 deletions source/_patterns/components/03-cards/00-card.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Card
---
## Overview

This is a Bootstrap component, [see complete documentation here](http://v4-alpha.getbootstrap.com/components/card/)

## Usage

| Class | Usage |
| -- | -- |
| `.pf-card--accented` **Applied to:** `.card` | **Outcome:** Displays a top border with an accent color **Required:** No |
| `.pf-card--multiselect` **Applied to:** `.card` | **Outcome:** Alters the card layout to accommodate a checkbox **Required:** If displaying a checkbox in the card |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a .pf-card-multiselect in the scss?

| `.pf-card__checkbox` **Applied to:** parent `div` of `<input type="checkbox">` | **Outcome:** Alters the card layout to accommodate a checkbox **Required:** No **Remarks:** Include class mentioned in previous row |
1 change: 1 addition & 0 deletions source/_patterns/components/03-cards/01-card-accent.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{> components-card cardTitleSize="h3" cardTitle="Card with Accent" cardContents="This card has an accent" cardAccent=true }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{> components-card cardTitleSize="h4" cardTitle="Card Footer with Dropdown" cardContents="This card has a Footer and a dropdown menu in the footer." cardFooter=true cardFooterContents="Card Footer" cardFooterDropdown=true }}
1 change: 1 addition & 0 deletions source/_patterns/components/03-cards/01-card-footer.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{> components-card cardTitleSize="h4" cardTitle="Card with Footer" cardContents="This card has a Footer." textCenter=true cardFooter=true cardFooterContents="Card Footer"}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{> components-card cardTitleSize="h4" cardTitle="Card Header with Dropdown" cardContents="This card has a header and a dropdown menu in the header." cardHeader=true cardHeaderDropdown=true }}
1 change: 1 addition & 0 deletions source/_patterns/components/03-cards/01-card-header.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{> components-card cardTitleSize="h4" cardTitle="Card with Header" cardContents="This card has a header." textCenter=true cardHeader=true }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{> components-card cardTitleSize="h2" cardTitle="Card with Large Icon" cardContents="This card has a large title and a large icon, with centered text." textCenter=true cardTitleIconLarge=true }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{> components-card cardTitleSize="h3" cardTitle="Card with Medium Icon" cardContents="This card has a medium size title and medium icon, with centered text" textCenter=true cardTitleIconMedium=true }}
5 changes: 4 additions & 1 deletion source/scss/_pf-component-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// bootstrap defaults.
//

.card{
.pf-card {
border: none;

.card-header{
Expand All @@ -24,3 +24,6 @@
border-top-color: $pf-card-border-color
}
}
.pf-card--accented {
border-top: 2px solid $color-pf-blue-300;
}