Skip to content
Snippets Groups Projects
Commit c1768bd6 authored by Ekaterina Kondareva's avatar Ekaterina Kondareva
Browse files

prominent image and banner styles

parent f7c929c3
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
......@@ -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;
}
}
......
......@@ -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;
......
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>
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment