Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Savio629/layer5 into hand…
Browse files Browse the repository at this point in the history
…book
  • Loading branch information
Savio629 committed Jun 25, 2023
2 parents c9bd219 + 84e30a3 commit 3d16968
Show file tree
Hide file tree
Showing 15 changed files with 383 additions and 56 deletions.
2 changes: 1 addition & 1 deletion src/collections/members/ayush-sharma/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ twitter: ayushthe5
linkedin: ayushthe1
location: Bengaluru, India
bio: A curious learner who loves to collaborate.
status: Active
status: Inactive
published: true
---
12 changes: 12 additions & 0 deletions src/collections/members/randy-chilau/index.mdx
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.
241 changes: 241 additions & 0 deletions src/components/Case-study-banner/index.js
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;
23 changes: 22 additions & 1 deletion src/pages/blog/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useState, useEffect } from "react";
import useDataList from "../../utils/usedataList";
import SEO from "../../components/seo";
import BlogGrid from "../../sections/Blog/Blog-grid";
import { graphql } from "gatsby";
Expand Down Expand Up @@ -46,6 +47,19 @@ export const query = graphql`

const Blog = (props) => {
const [isListView, setIsListView] = useState(false);
const [searchQuery, setSearchQuery] = useState("");
const { queryResults, searchData } = useDataList(
props.data.allMdx.nodes,
setSearchQuery,
searchQuery,
["frontmatter", "title"],
"id"
);
const [currentPage, setCurrentPage] = useState(1);
const [postsPerPage] = useState(10);
const indexOfLastPost = currentPage * postsPerPage;
const indexOfFirstPost = indexOfLastPost - postsPerPage;
const searchedPosts = queryResults.slice(indexOfFirstPost, indexOfLastPost);
const setListView = () => {
setIsListView(true);
};
Expand All @@ -68,7 +82,14 @@ const Blog = (props) => {
setListView={setListView}
setGridView={setGridView}
pageContext={props.pageContext}
data={props.data}
searchedPosts={searchedPosts}
setCurrentPage={setCurrentPage}
postsPerPage={postsPerPage}
searchData={searchData}
searchQuery={searchQuery}
setSearchQuery={setSearchQuery}
currentPage={currentPage}
queryResults={queryResults}
/>

</>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import CornerPopup from "../components/Corner-popup";
const CloudNativeManagement = loadable(() => import("../sections/Home/CloudNativeManagement"));
const SubscribeSection = loadable(() => import("../sections/subscribe/subscribe"));
const ServiceMeshFocussed = loadable(() => import("../sections/Home/Service-mesh-focussed"));
import CaseStudyBanner from "../components/Case-study-banner";


const SoSpecial = loadable(() => import("../sections/Home/So-Special-Section"));
Expand All @@ -23,6 +24,7 @@ const IndexPage = () => {
<Banner />
<Integrations />
<Partners />
<CaseStudyBanner/>
<CornerPopup/>
{/* <Features /> */}
{/* <ServiceMeshManagement /> */}
Expand Down
24 changes: 8 additions & 16 deletions src/sections/Blog/Blog-grid/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React from "react";
import { Container, Row, Col } from "../../../reusecore/Layout";
import PageHeader from "../../../reusecore/PageHeader";
import Sidebar from "../Blog-sidebar";
Expand All @@ -8,28 +8,20 @@ import Card from "../../../components/Card";
import BlogViewToolTip from "../../../components/blog-view-tooltip";
import SearchBox from "../../../reusecore/Search";
import Pagination from "../../Resources/Resources-grid/paginate";
import useDataList from "../../../utils/usedataList";

const BlogGrid = ({
isListView,
setListView,
setGridView,
pageContext,
data,
searchData,
searchQuery,
setCurrentPage,
currentPage,
searchedPosts,
queryResults,
postsPerPage,
}) => {
const [currentPage, setCurrentPage] = useState(1);
const [postsPerPage] = useState(10);
const indexOfLastPost = currentPage * postsPerPage;
const indexOfFirstPost = indexOfLastPost - postsPerPage;
const [searchQuery, setSearchQuery] = useState("");
const { queryResults, searchData } = useDataList(
data.allMdx.nodes,
setSearchQuery,
searchQuery,
["frontmatter", "title"],
"id"
);
const searchedPosts = queryResults.slice(indexOfFirstPost, indexOfLastPost);
// Change page
const paginate = (pageNumber) => {
setCurrentPage(pageNumber);
Expand Down
Loading

0 comments on commit 3d16968

Please sign in to comment.