forked from web-padawan/aybolit
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cxl-ui): cxl-section - implement header design facelift
- Loading branch information
1 parent
86a159b
commit a245374
Showing
7 changed files
with
235 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* stylelint-disable selector-no-qualifying-type */ | ||
|
||
cxl-section#view-hero { | ||
.column-1 { | ||
max-width: 40%; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
packages/storybook/cxl-ui/cxl-section/cxl-section.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
import { html } from 'lit'; | ||
import '@conversionxl/cxl-lumo-styles'; | ||
import '@conversionxl/cxl-ui'; | ||
import '@vaadin/button'; | ||
|
||
export default { | ||
title: 'CXL UI/cxl-section', | ||
}; | ||
|
||
export const CXLSectionHeader = (args) => html` | ||
<style> | ||
@media only screen and (min-width: 1440px) { | ||
#view-hero .cxl-hero-titles { bottom: -10px; gap: 0; margin: 0; position: absolute; width: 50%; } | ||
} | ||
@media only screen and (min-width: 1280px) and (max-width: 1440px) { | ||
#view-hero .cxl-hero-titles { bottom: 0; gap: 0; margin: 0; position: absolute; width: 55%; } | ||
} | ||
@media only screen and (min-width: 782px) and (max-width: 1280px) { | ||
#view-hero .cxl-hero-titles { gap: 0; margin: 0; position: absolute; top: 24em; width: 50%; } | ||
} | ||
.wp-block-columns { | ||
align-items: normal !important; | ||
box-sizing: border-box; | ||
display: flex; | ||
flex-wrap: wrap !important; | ||
margin-bottom: 1.import { column } from '@wordpress/icons' 75em; | ||
} | ||
.wp-clock-column { | ||
flex-grow: 1; | ||
min-width: 0; | ||
overflow-wrap: break-word; | ||
word-break: break-word; | ||
} | ||
.first { | ||
flex-basis: 45%; | ||
} | ||
cxl-section { | ||
background: url(https://cxl.com/institute/wp-content/uploads/2020/07/ben-labay_team_headshot-1x1-bw-min-1024x1024.png) no-repeat bottom right; | ||
background-size: auto 100%; | ||
background-position: bottom right 30%; | ||
} | ||
cxl-section.wide { | ||
--cxl-content-max-width: var(--cxl-content-max-width-wide); | ||
} | ||
</style> | ||
<cxl-section theme="cxl-header" class="${args.class} wide"> | ||
<div class="wp-block-columns"> | ||
<div class="wp-block-column first"> | ||
<h1><strong>Top 1% marketers</strong> teach you what they know.</h1> | ||
<h3> | ||
Master the most in-demand marketing skills with our online courses created by marketers | ||
with a proven record of driving real growth. | ||
</h3> | ||
<vaadin-button | ||
id="cxl-onboarding" | ||
class="cxl-homepage-button" | ||
role="button" | ||
theme="primary x-large" | ||
> | ||
Sign up now | ||
</vaadin-button> | ||
</div> | ||
<div | ||
class="column column-2 column-span-1 column-push-0 pure-u-lg-1-2 pure-hidden-xs pure-hidden-sm pure-hidden-md column-last pure-u-1" | ||
style="position: absolute; right: 0em; top: 10.5em;text-align:right; color: white" | ||
> | ||
<div class="wrap"> | ||
<div> | ||
<strong style="display: block;">Ben Labay</strong> | ||
<small style="display: block;">Managing Director @ Speero</small> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</cxl-section> | ||
`; | ||
|
||
CXLSectionHeader.args = { | ||
class: '', | ||
}; | ||
|
||
CXLSectionHeader.argTypes = { | ||
class: { | ||
name: 'Class', | ||
control: 'select', | ||
options: [ | ||
'wide-background-red', | ||
'wide-background-blue', | ||
'wide-background-light-blue', | ||
'wide-background-green', | ||
'wide-background-black', | ||
], | ||
}, | ||
}; |