diff --git a/microsite/docusaurus.config.js b/microsite/docusaurus.config.js index b7d8453e21..2e5c6f6251 100644 --- a/microsite/docusaurus.config.js +++ b/microsite/docusaurus.config.js @@ -55,7 +55,7 @@ module.exports = { path: 'blog', }, theme: { - customCss: 'src/css/customTheme.css', + customCss: 'src/theme/customTheme.scss', }, gtag: { trackingID: 'G-KSEVGGNCJW', diff --git a/microsite/src/components/bannerSection/bannerSection.module.scss b/microsite/src/components/bannerSection/bannerSection.module.scss index 2beabf9738..64f4967d11 100644 --- a/microsite/src/components/bannerSection/bannerSection.module.scss +++ b/microsite/src/components/bannerSection/bannerSection.module.scss @@ -1,5 +1,41 @@ +@use 'src/theme/variables'; + .bannerSection { + --diagonalBorderHeight: 40px; + display: block; + background: var(--ifm-background-color); + + @media (min-width: variables.$desktopUpBreakpoint) { + --diagonalBorderHeight: 80px; + } + + &:global(:is(.diagonalBorder, .diagonalBottomBorder)) { + padding-bottom: var(--diagonalBorderHeight); + + & + section { + margin-top: calc(var(--diagonalBorderHeight) * -1); + padding-top: var(--diagonalBorderHeight); + } + } + + &:global(.diagonalBorder) { + clip-path: polygon( + 0 var(--diagonalBorderHeight), + 100% 0, + 100% calc(100% - var(--diagonalBorderHeight)), + 0 100% + ); + } + + &:global(.diagonalBottomBorder) { + clip-path: polygon( + 0 0, + 100% 0, + 100% calc(100% - var(--diagonalBorderHeight)), + 0 100% + ); + } &:global(.greyBackground) { background: linear-gradient(90.49deg, #121212 15.36%, #282828 70.44%); diff --git a/microsite/src/components/bannerSection/bannerSection.tsx b/microsite/src/components/bannerSection/bannerSection.tsx index 64c8d246c8..5dc99eecf0 100644 --- a/microsite/src/components/bannerSection/bannerSection.tsx +++ b/microsite/src/components/bannerSection/bannerSection.tsx @@ -6,6 +6,8 @@ import bannerStyles from './bannerSection.module.scss'; export type IBannerSectionProps = PropsWithChildren<{ className?: string; greyBackground?: boolean; + diagonalBorder?: boolean; + diagonalBottomBorder?: boolean; greenGradientBackground?: boolean; greenBottomGradientBackground?: boolean; greenCallToActionGradientBackground?: boolean; @@ -15,6 +17,8 @@ export const BannerSection = ({ children, className, greyBackground = false, + diagonalBorder = false, + diagonalBottomBorder = false, greenGradientBackground = false, greenBottomGradientBackground = false, greenCallToActionGradientBackground = false, @@ -22,6 +26,8 @@ export const BannerSection = ({
{ return (
- + { - + @@ -199,7 +199,7 @@ const Community = () => { - + Community initiatives} > @@ -223,7 +223,7 @@ const Community = () => { - + Trainings and Certifications diff --git a/microsite/src/pages/demos/index.tsx b/microsite/src/pages/demos/index.tsx index 2ca77e5c89..1221c38a63 100644 --- a/microsite/src/pages/demos/index.tsx +++ b/microsite/src/pages/demos/index.tsx @@ -167,6 +167,8 @@ const Demos = () => { {demoItems.map((demoItem, index) => ( 0 && index < demoItems.length - 1} greyBackground={index % 2 === 0} className={demosStyles.banner} > diff --git a/microsite/src/pages/home/_home.tsx b/microsite/src/pages/home/_home.tsx index ea22062d28..deb0d4cd6f 100644 --- a/microsite/src/pages/home/_home.tsx +++ b/microsite/src/pages/home/_home.tsx @@ -28,7 +28,7 @@ const HomePage = () => { return (
- + { - + { - +
{
- +

Learn more about the software catalog

@@ -196,7 +196,7 @@ const HomePage = () => {
- +
{
- +

Build your own software templates

@@ -260,7 +260,7 @@ const HomePage = () => {
- +
{
- +

Learn more about TechDocs

@@ -320,7 +320,7 @@ const HomePage = () => {
- +
{
- +

Learn more about Backstage Search

@@ -381,7 +381,7 @@ const HomePage = () => {
- + { - +

Learn more about the K8s plugin

@@ -437,7 +437,7 @@ const HomePage = () => {
- +
{
- +

Build a plugin

diff --git a/microsite/src/pages/home/home.module.scss b/microsite/src/pages/home/home.module.scss index 57f2b9acde..5877f7b5f5 100644 --- a/microsite/src/pages/home/home.module.scss +++ b/microsite/src/pages/home/home.module.scss @@ -1,4 +1,4 @@ -$desktopUpBreakpoint: 997px; +@use '../../theme/variables.scss'; .homePage { font-size: 1.25rem; @@ -70,7 +70,7 @@ $desktopUpBreakpoint: 997px; } .catalogContainer { - @media (min-width: $desktopUpBreakpoint) { + @media (min-width: variables.$desktopUpBreakpoint) { grid-template-columns: repeat(4, 1fr); picture { @@ -85,7 +85,7 @@ $desktopUpBreakpoint: 997px; } .softwareTemplatesContainer { - @media (min-width: $desktopUpBreakpoint) { + @media (min-width: variables.$desktopUpBreakpoint) { grid: repeat(2, auto) / repeat(4, 1fr); picture { diff --git a/microsite/src/css/customTheme.css b/microsite/src/theme/customTheme.scss similarity index 100% rename from microsite/src/css/customTheme.css rename to microsite/src/theme/customTheme.scss diff --git a/microsite/src/theme/variables.scss b/microsite/src/theme/variables.scss new file mode 100644 index 0000000000..3d74e59c9c --- /dev/null +++ b/microsite/src/theme/variables.scss @@ -0,0 +1,2 @@ +$xlUpBreakpoint: 1441px; +$desktopUpBreakpoint: 997px;