diff --git a/src/components.d.ts b/src/components.d.ts index b0bcc32f5542f29c43d840ed8569fecbc165c7c1..64d26f19c26cb4154fae425ef2611ce50fdd71d3 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -457,6 +457,7 @@ export namespace Components { variant: ProcessFlowBoxVariants; } interface HyProminentImage { + headerstyle: string; imageUrl?: string; textTitle?: string; } @@ -1320,6 +1321,7 @@ declare namespace LocalJSX { variant?: ProcessFlowBoxVariants; } interface HyProminentImage { + headerstyle?: string; imageUrl?: string; textTitle?: string; } diff --git a/src/components/hy-banner/hy-banner.scss b/src/components/hy-banner/hy-banner.scss index 2798de351298512770a8c0d50739627cda30a30b..d6571f8be39c039e69f20d50d175d0404506ac0e 100644 --- a/src/components/hy-banner/hy-banner.scss +++ b/src/components/hy-banner/hy-banner.scss @@ -85,31 +85,29 @@ .hy-banner.large { @include breakpoint($extrawide) { padding: 64px 0 48px 0; + } - &__info-container { - &__title { + .hy-banner__info-container { + &__title { + @include breakpoint($extrawide) { @include font-size(36px, 36px); letter-spacing: -1.2px; max-width: 83%; } - &__description { + @include breakpoint($overwide) { + @include font-size(40px, 40px); + letter-spacing: -1.33px; + margin-bottom: 32px; + } + } + &__description { + @include breakpoint($extrawide) { @include font-size(18px, 24px); letter-spacing: -0.09px; margin-bottom: 36px; max-width: 83%; } - } - } - @include breakpoint($overwide) { - padding: 64px 0 48px 0; - &__info-container { - &__title { - @include font-size(40px, 40px); - letter-spacing: -1.33px; - margin-bottom: 32px; - max-width: 83%; //10col - } - &__description { + @include breakpoint($overwide) { margin-bottom: 44px; } } diff --git a/src/components/hy-prominent-image/hy-prominent-image.scss b/src/components/hy-prominent-image/hy-prominent-image.scss index f38955a23baa999af29728c2acb4ce37039eaa9a..f0fd6ce062f9dc2e87082014fea2cc505dba6f33 100644 --- a/src/components/hy-prominent-image/hy-prominent-image.scss +++ b/src/components/hy-prominent-image/hy-prominent-image.scss @@ -45,6 +45,34 @@ @include breakpoint($overwide) { // >= 1441px // font: h3 medium size + //@include font-size(26px, 32px); + //bottom: 28px; + //left: -16px; + //letter-spacing: -0.8px; + //padding: 20px 24px; + //position: absolute; + } + } +} + +// no sidebar +.hy-prominent-image.large { + &__text { + @include breakpoint($overwide) { + // >= 1441px no sidebar + // font: h3 medium size + @include font-size(26px, 32px); + bottom: 28px; + left: -16px; + letter-spacing: -0.8px; + padding: 20px 24px; + position: absolute; + } + } + .hy-prominent-image__text { + @include breakpoint($overwide) { + // >= 1441px no sidebar + // font: h3 medium size @include font-size(26px, 32px); bottom: 28px; left: -16px; diff --git a/src/components/hy-prominent-image/hy-prominent-image.tsx b/src/components/hy-prominent-image/hy-prominent-image.tsx index b0b945917b4bedd5b234c843c67d0fea3a275c5f..9e68adfda9af7b3d1f74e737c72ee4bfce0c4ba9 100644 --- a/src/components/hy-prominent-image/hy-prominent-image.tsx +++ b/src/components/hy-prominent-image/hy-prominent-image.tsx @@ -1,4 +1,4 @@ -import {Component, Host, h, Prop} from '@stencil/core'; +import {Component, Element, Host, h, Prop} from '@stencil/core'; @Component({ tag: 'hy-prominent-image', @@ -8,11 +8,23 @@ import {Component, Host, h, Prop} from '@stencil/core'; export class HyProminentImage { @Prop() textTitle?: string; @Prop() imageUrl?: string; + @Prop() headerstyle: string = 'common'; + @Element() el: HTMLElement; + + componentDidLoad() { + let hyMainDiv = this.el.closest('.hy-main'); + if (hyMainDiv) { + if (!hyMainDiv.classList.contains('with-sidebar')) { + this.headerstyle = 'large'; + } + } + } render() { + const prominentImageClass = ['hy-prominent-image', this.headerstyle].join(' '); return ( <Host> - <div class="hy-prominent-image"> + <div class={prominentImageClass}> <div class="hy-prominent-image__image"> <hy-image image-url={this.imageUrl} aspectRatioWidth={2} aspectRatioHeight={1} /> </div> diff --git a/src/components/hy-prominent-image/readme.md b/src/components/hy-prominent-image/readme.md index 1f050f149e308c359280c72cd0f44b7075a878aa..4cf958a610c5d0308148d8f1b9d732d08ddbc5b2 100644 --- a/src/components/hy-prominent-image/readme.md +++ b/src/components/hy-prominent-image/readme.md @@ -4,10 +4,11 @@ ## Properties -| Property | Attribute | Description | Type | Default | -| ----------- | ------------ | ----------- | -------- | ----------- | -| `imageUrl` | `image-url` | | `string` | `undefined` | -| `textTitle` | `text-title` | | `string` | `undefined` | +| Property | Attribute | Description | Type | Default | +| ------------- | ------------- | ----------- | -------- | ----------- | +| `headerstyle` | `headerstyle` | | `string` | `'common'` | +| `imageUrl` | `image-url` | | `string` | `undefined` | +| `textTitle` | `text-title` | | `string` | `undefined` | ## Dependencies