Skip to content

Commit

Permalink
change size large to layout taper
Browse files Browse the repository at this point in the history
  • Loading branch information
clairesunstudio committed Feb 17, 2022
1 parent 849ed46 commit e503370
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Page Banner component that is composed of an H1 page title, with optional icon,

### Variant options
* Layouts:
- ['large'](./?p=organisms-page-banner-as-large) - Slanted solic background, side-by-side image
- ['taper'](./?p=organisms-page-banner-as-large) - Trepezoid solid color background, side-by-side image
- ['overlay'](./?p=organisms-page-banner-as-overlay) - Transparent background color over an image
* Color themes:
- blue (./?p=organisms-page-banner)
Expand All @@ -20,8 +20,8 @@ pageBanner: {
type: string (image path - wide screens) / required
bgNarrow:
type: string (image path - narrow screens) / required
size:
type: string ('', 'large', 'overlay') / optional
layout:
type: string ('', 'taper', 'overlay') / optional
renderImageOnMobile:
type: boolean / optional / 'false' as default.
icon:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set sizeClass = pageBanner.size ? "ma__page-banner--" ~ pageBanner.size : '' %}
{% set layoutClass = pageBanner.layout ? "ma__page-banner--" ~ pageBanner.layout : '' %}
{% set colorClass = pageBanner.color ? "ma__page-banner--" ~ pageBanner.color : '' %}
{% set bgNarrowWrapperClass = pageBanner.bgNarrow ? "ma__page-banner__content-wrapper--bg-narrow" : "" %}
{% set bgWideWrapperClass = pageBanner.bgWide ? "ma__page-banner__content-wrapper--bg-wide" : "" %}
Expand All @@ -9,12 +9,12 @@
{% set iconClass = not pageBanner.icon ? "ma__page-banner--no-icon" : '' %}

{% set wrapperClass = "ma__page-banner__content-wrapper #{bgNarrowWrapperClass} #{bgWideWrapperClass}" %}
{% set sectionClass = "ma__page-banner #{sizeClass} #{colorClass} #{bgNarrowClass} #{bgWideClass} #{imageOnMobileClass} #{noImage} #{iconClass}" %}
{% set sectionClass = "ma__page-banner #{layoutClass} #{colorClass} #{bgNarrowClass} #{bgWideClass} #{imageOnMobileClass} #{noImage} #{iconClass}" %}


<section class="{{ sectionClass }}">
{% set classBgImage =
(pageBanner.size == "large") ? '.ma__page-banner__image' : '.ma__page-banner'
(pageBanner.layout == "taper") ? '.ma__page-banner__image' : '.ma__page-banner'
%}

{# pageBanner.bgWide #}
Expand All @@ -36,7 +36,7 @@
{% endif %}

<div class="ma__page-banner__container">
{% if (pageBanner.size and pageBanner.size == "large") and bgWideWrapperClass %}
{% if (pageBanner.layout and pageBanner.layout == "taper") and bgWideWrapperClass %}
<div class="ma__page-banner__image"></div>
{% endif %}
<div class="ma__page-banner__content" property="mainEntityOfPage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"pageBanner": {
"bgWide": "../../assets/images/placeholder/1600x400.png",
"bgNarrow": "../../assets/images/placeholder/800x400.png",
"size": "overlay",
"layout": "overlay",
"icon": "",
"title": "Unemployment Benefits",
"titleSubText": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"bgWide": "../../assets/images/placeholder/800x400.png",
"bgNarrow": "../../assets/images/placeholder/400x200.png",
"renderImageOnMobile": true,
"size": "large",
"layout": "taper",
"icon": "",
"title": "Office of the Treasurer & Receiver General",
"titleSubText": " (TRE)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"bgWide": "../../assets/images/placeholder/1600x400.png",
"bgNarrow": "../../assets/images/placeholder/400x200.png",
"renderImageOnMobile": false,
"size": "large",
"layout": "taper",
"icon": "lg-picnic-table",
"title": "State Parks & Recreation",
"titleSubText": "",
Expand Down

0 comments on commit e503370

Please sign in to comment.