Skip to content

Commit db209f2

Browse files
Merge pull request #5196 from layer5io/ritiksaxena124/top-promotional-banner
Playground top promotional banner added
2 parents f93e5fe + d614d2c commit db209f2

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

src/assets/images/top-promotional-banner/rocket.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from "react";
2+
import { TopBannercontainer } from "./style";
3+
import Rocket from "../../assets/images/top-promotional-banner/rocket.svg";
4+
5+
const TopPromotionalBanner = () => {
6+
return (
7+
<>
8+
<TopBannercontainer>
9+
<a href="https://play.meshery.io/" rel="noreferrer" target="_blank"><p className="content"><img src={Rocket} alt="Five on rocket" />Soar to New Heights with Meshery v0.7.0 <span>Try it now &rarr;</span></p></a>
10+
</TopBannercontainer>
11+
</>
12+
);
13+
};
14+
export default TopPromotionalBanner;
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import styled from "styled-components";
2+
3+
export const TopBannercontainer = styled.div`
4+
background: ${props => props.theme.saffronColor};
5+
position: sticky;
6+
.content {
7+
display: flex;
8+
align-items: center;
9+
justify-content: center;
10+
padding: 0 1rem;
11+
font-weight: 500;
12+
line-height: 1.1875rem;
13+
color: ${props => props.theme.body};
14+
padding: 0.75rem 1rem;
15+
16+
& > img {
17+
width: 3rem;
18+
margin-right: 0.5rem;
19+
}
20+
21+
& > span {
22+
font-weight: 700;
23+
margin-left: 0.5rem;
24+
&:hover {
25+
text-decoration: underline;
26+
}
27+
}
28+
}
29+
`;
30+
31+

src/components/layout.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ import PropTypes from "prop-types";
1212
import ScrollToTopBtn from "./Scrolltotop-button";
1313
import Navigation from "../sections/General/Navigation";
1414
import Footer from "../sections/General/Footer";
15+
import TopPromotionalBanner from "./TopPromotionalBanner";
1516
import { GlobalStyle } from "../sections/app.style";
1617

1718
const Layout = ({ children }) => {
1819

1920
return (
2021
<>
2122
<GlobalStyle />
23+
<TopPromotionalBanner />
2224
<Navigation/>
2325
{children}
2426
<ScrollToTopBtn />

0 commit comments

Comments
 (0)