feat: Add all Call to Action banners in 1 go, CSS grid media query

Signed-off-by: Carlos Esteban Lopez <lcarlosesteb@vmware.com>
This commit is contained in:
Carlos Esteban Lopez
2023-02-07 21:13:35 -05:00
committed by Carlos Lopez
parent 2c21d5f6c5
commit ed297eead2
4 changed files with 105 additions and 12 deletions
@@ -26,4 +26,10 @@
rgba(155, 240, 225, 0.67) 137.34%
);
}
&:global(.greenCallToActionGradientBackground) {
background: linear-gradient(87.29deg, #9bf0e1 17.71%, #36baa2 80.85%);
color: var(--ifm-color-gray-900);
}
}
@@ -7,6 +7,7 @@ export type IBannerSectionProps = PropsWithChildren<{
greyBackground?: boolean;
greenGradientBackground?: boolean;
greenBottomGradientBackground?: boolean;
greenCallToActionGradientBackground?: boolean;
}>;
export const BannerSection = ({
@@ -14,14 +15,16 @@ export const BannerSection = ({
greyBackground = false,
greenGradientBackground = false,
greenBottomGradientBackground = false,
greenCallToActionGradientBackground = false,
}: IBannerSectionProps) => (
<section
className={clsx(bannerStyles.bannerSection, {
greyBackground,
greenGradientBackground,
greenBottomGradientBackground,
greenCallToActionGradientBackground,
})}
>
<div className="container">{children}</div>
<div className="container padding-vert--lg">{children}</div>
</section>
);
+79 -4
View File
@@ -130,10 +130,7 @@ export function Home() {
makes it possible for your company to manage thousands of them
</ContentBlock>
<ContentBlock
title="Backstage makes it easy for one team to manage 10 services — and makes it possible for your company to manage thousands of them"
hasBulletLine
>
<ContentBlock title="A uniform overview" hasBulletLine>
Every team can see all the services they own and related resources
(deployments, data pipelines, pull request status, etc.)
</ContentBlock>
@@ -158,6 +155,84 @@ export function Home() {
</ContentBlock>
</div>
</BannerSection>
<BannerSection greenCallToActionGradientBackground>
<div className="padding--lg text--center">
<h1>Learn more about the software catalog</h1>
<Link
to="https://backstage.io/docs/features/software-catalog/software-catalog-overview"
className="button button--secondary"
>
READ
</Link>
</div>
</BannerSection>
<BannerSection greenCallToActionGradientBackground>
<div className="padding--lg text--center">
<h1>Build your own software templates</h1>
<Link
to="https://backstage.io/docs/features/software-templates"
className="button button--secondary"
>
CONTRIBUTE
</Link>
</div>
</BannerSection>
<BannerSection greenCallToActionGradientBackground>
<div className="padding--lg text--center">
<h1>Learn more about TechDocs</h1>
<Link
to="https://backstage.io/docs/features/techdocs/techdocs-overview"
className="button button--secondary"
>
DOCS
</Link>
</div>
</BannerSection>
<BannerSection greenCallToActionGradientBackground>
<div className="padding--lg text--center">
<h1>Learn more about Backstage Search</h1>
<Link
to="https://backstage.io/docs/features/search/search-overview"
className="button button--secondary"
>
READ
</Link>
</div>
</BannerSection>
<BannerSection greenCallToActionGradientBackground>
<div className="padding--lg text--center">
<h1>Learn more about the K8s plugin</h1>
<Link
to="https://backstage.io/blog/2021/01/12/new-backstage-feature-kubernetes-for-service-owners"
className="button button--secondary"
>
READ
</Link>
</div>
</BannerSection>
<BannerSection greenCallToActionGradientBackground>
<div className="padding--lg text--center">
<h1>Build a plugin</h1>
<Link
to="/docs/plugins/create-a-plugin"
className="button button--secondary"
>
CONTRIBUTE
</Link>
</div>
</BannerSection>
</div>
</Layout>
);
+16 -7
View File
@@ -1,3 +1,5 @@
$desktopUpBreakpoint: 997px;
.homePage {
font-size: 1.25rem;
@@ -46,21 +48,28 @@
display: grid;
align-items: center;
grid-template-columns: repeat(4, 1fr);
picture {
display: block;
grid-row: 1/3;
grid-column: 3/-1;
text-align: center;
}
:global(.catalogTitle) {
grid-column: 1/3;
img {
max-width: 190px;
max-height: 190px;
}
}
@media (min-width: $desktopUpBreakpoint) {
grid-template-columns: repeat(4, 1fr);
picture {
grid-row: 1/3;
grid-column: 3/-1;
}
:global(.catalogTitle) {
grid-column: 1/3;
}
}
}