-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Savio629/layer5 into hand…
…book
- Loading branch information
Showing
15 changed files
with
383 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
name: Randy Lau | ||
position: Contributor | ||
image_path: ./randy-chilau.jpeg | ||
github: randychilau | ||
location: San Francisco, California, USA | ||
bio: Randy is an aspiring JavaScript and React programmer. If he could tell someone just starting their coding journey three things, they would be 1) The baseball player with the highest hitting percentage in history did not get a hit 60% of the time. Frustration, feeling lost, and failing during this journey are normal. Take a break or get some sleep, and you can try again later. Smile, as that is a good thing. 2) Become comfortable with feeling uncomfortable and working with the unfamiliar; it will be one of your superpowers. 3) Open source is an amazing, supportive, and welcoming place on the internet that invites all programmers to participate, regardless of where they are in their coding journey. If you have not gone there yet, stop reading this and go there now. | ||
badges: | ||
- docs | ||
status: Active | ||
published: true | ||
--- |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,241 @@ | ||
import React, { useState, useEffect } from "react"; | ||
import styled from "styled-components"; | ||
import MesheryLogo from "../../assets/images/meshery/icon-only/meshery-logo-light.svg"; | ||
import SpireLogo from "../../collections/integrations/spire/icon/color/spire-color.svg"; | ||
import MesheryAndSpire from "../../collections/resources/articles/hpes-adoption-of-meshery-and-meshmap/meshery-and-hpe.svg"; | ||
|
||
|
||
const BannerWrapper = styled.div` | ||
.large-screen { | ||
display: flex; | ||
max-width: 100%; | ||
overflow: hidden; | ||
margin: 5% 0%; | ||
@media screen and (max-width: 600px) { | ||
display: none; | ||
} | ||
} | ||
.left-img { | ||
display: flex; | ||
background: ${props => props.theme.bannerGradientBackgroundToWhite}; | ||
flex: 0 0 20%; | ||
text-align: center; | ||
justify-content: center; | ||
/* border: 1px solid; | ||
border-color: ${props => props.theme.whiteToBlack}; | ||
border-bottom-width: 2px; */ | ||
border: 2px solid transparent; | ||
border-image: ${props => props.theme.borderGradientTransitionBefore}; | ||
border-image-slice: 1 1 1 1; | ||
transition: border 0.4s ease-in-out; | ||
transform-origin: top right; | ||
transform: skewX(-25deg); | ||
padding: 3%; | ||
} | ||
.left-img > * { | ||
transition: transform 0.4s ease; | ||
transform: skewX(25deg); /* Counteract the parent's skew */ | ||
width: 40%; | ||
} | ||
.desc { | ||
display: flex; | ||
background:${props => props.theme.bannerDescriptionGradient}; | ||
flex: 0 0 60%; | ||
text-align: center; | ||
border: 2px solid #00b39f; | ||
/* border-image: ${props => props.theme.borderGradientTransitionBefore} ; | ||
border-image-slice: 1 1 1 1; */ | ||
transition: border 0.4s ease-in-out; | ||
justify-content: center; | ||
align-items: center; | ||
transform: skewX(-25deg); | ||
h2 { | ||
text-align: center; | ||
width: 80%; | ||
color: #fff; | ||
@media screen and (max-width: 800px) { | ||
font-size: 1.25rem; | ||
} | ||
@media screen and (max-width: 600px) { | ||
font-size: 1rem; | ||
} | ||
} | ||
} | ||
.desc > * { | ||
transform: skewX(25deg); /* Counteract the parent's skew */ | ||
} | ||
.right-img { | ||
display: flex; | ||
background: ${props => props.theme.bannerGradientBackground2ToWhite}; | ||
flex: 0 0 20%; | ||
text-align: center; | ||
justify-content: center; | ||
/* border: 1px solid; | ||
border-bottom-width: 2px; | ||
border-color: #00b39f; */ | ||
border: 2px solid transparent; | ||
border-image: ${props => props.theme.borderGradientTransitionBefore}; | ||
border-image-slice: 1 1 1 1; | ||
transition: border 0.4s ease-in-out; | ||
transform-origin: bottom left; | ||
transform: skewX(-25deg); | ||
padding: 3%; | ||
} | ||
.right-img > * { | ||
transition: transform 0.4s ease; | ||
transform: skewX(25deg); /* Counteract the parent's skew */ | ||
width: 40%; | ||
} | ||
.scale-on-hover { | ||
border-image: ${props => props.theme.borderGradientTransitionAfter} ; | ||
border-image-slice: 1 1 1 1; | ||
transition: 0.4s ease-in-out; | ||
> * { | ||
transition: transform 0.4s ease; | ||
transform: skewX(25deg) scale(1.4); | ||
} | ||
} | ||
.desc-hover { | ||
/* border-image: ${props => props.theme.borderGradientTransitionAfter} ; | ||
border-image-slice: 1 1 1 1; | ||
transition: 0.4s ease-in-out; */ | ||
} | ||
.ribbon { | ||
display: flex; | ||
align-items: center; | ||
position: absolute; | ||
right: -3px; | ||
top: -5px; | ||
z-index: 1; | ||
overflow: hidden; | ||
width: 120px; | ||
height: 120px; | ||
text-align: right; | ||
span { | ||
padding-left: 1.75rem; | ||
font-size: 13px; | ||
font-weight: bold; | ||
color: ${props => props.theme.whiteToBlack}; | ||
text-transform: uppercase; | ||
text-align: center; | ||
line-height: 20px; | ||
transform: rotate(45deg); | ||
-webkit-transform: rotate(45deg); | ||
width: 150px; | ||
display: block; | ||
background: #79A70A; | ||
background: ${props => props.theme.yellowEBC0EBToGradient}; | ||
box-shadow: 0 3px 10px -5px #000; | ||
position: absolute; | ||
top: 20px; | ||
right: -19px; | ||
} | ||
span:before { | ||
content: ""; | ||
position: absolute; | ||
left: 0px; | ||
top: 100%; | ||
z-index: -1; | ||
border-left: 3px solid #00B39F; | ||
border-right: 3px solid transparent; | ||
border-bottom: 3px solid transparent; | ||
border-top: 3px solid #00B39F; | ||
} | ||
span:after { | ||
content: ""; | ||
position: absolute; | ||
right: 0px; | ||
top: 100%; | ||
z-index: -1; | ||
border-left: 3px solid transparent; | ||
border-right: 3px solid #00B39F; | ||
border-bottom: 3px solid transparent; | ||
border-top: 3px solid #00B39F; | ||
} | ||
} | ||
.small-screen { | ||
display: none; | ||
text-align: center; | ||
align-items: center; | ||
justify-content: center; | ||
flex-direction: column; | ||
@media screen and (max-width: 600px) { | ||
display: flex; | ||
} | ||
.small-screen-desc { | ||
width: 80%; | ||
} | ||
.meshery-and-spire { | ||
margin-top: 5%; | ||
width: 80%; | ||
border: 1px solid #fff; | ||
} | ||
} | ||
`; | ||
|
||
const CaseStudyBanner = () => { | ||
|
||
const [hover, setHover] = useState(false); | ||
|
||
const handleHover = () => { | ||
setHover(true); | ||
}; | ||
|
||
const handleLeave = () => { | ||
setHover(false); | ||
}; | ||
|
||
return ( | ||
<> | ||
<a href="/resources/cloud-native/hpes-adoption-of-meshery-and-meshmap"> | ||
<BannerWrapper> | ||
<div className="small-screen"> | ||
<div className="small-screen-desc"> | ||
<h2>Discover how HPE uses Meshery to manage SPIRE</h2> | ||
</div> | ||
<div className="meshery-and-spire"> | ||
<img src={MesheryAndSpire} alt="meshery-and-spire" /> | ||
</div> | ||
</div> | ||
<div className="large-screen"> | ||
<div className={`left-img ${hover ? "scale-on-hover" : ""}`} onMouseEnter={handleHover} onMouseLeave={handleLeave}> | ||
<img src={MesheryLogo} alt="meshery-logo" /> | ||
</div> | ||
<div className={`desc ${hover ? "desc-hover" : ""}`} onMouseEnter={handleHover} onMouseLeave={handleLeave}> | ||
<h2>Discover how HPE uses Meshery to manage SPIRE</h2> | ||
<div className="ribbon"> | ||
<span>Case Study</span> | ||
</div> | ||
</div> | ||
<div className={`right-img ${hover ? "scale-on-hover" : ""}`} onMouseEnter={handleHover} onMouseLeave={handleLeave}> | ||
<img src={SpireLogo} alt="spire-logo" /> | ||
</div> | ||
</div> | ||
</BannerWrapper> | ||
</a> | ||
</> | ||
); | ||
}; | ||
|
||
export default CaseStudyBanner; |
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
Oops, something went wrong.