From 4e93ad6de8256178b9c5bb3a374e53d102e4c1d1 Mon Sep 17 00:00:00 2001 From: cauemarcondes Date: Fri, 29 May 2020 13:00:48 +0200 Subject: [PATCH] fixing scroll when resize window --- .../observability/public/pages/home/index.tsx | 241 +++++++++--------- 1 file changed, 127 insertions(+), 114 deletions(-) diff --git a/x-pack/plugins/observability/public/pages/home/index.tsx b/x-pack/plugins/observability/public/pages/home/index.tsx index f3e89fe505edf7d..8f327ea99021b48 100644 --- a/x-pack/plugins/observability/public/pages/home/index.tsx +++ b/x-pack/plugins/observability/public/pages/home/index.tsx @@ -76,7 +76,17 @@ const tryItOutItemsSection: ISection[] = [ const FixedContainer = styled.div` position: fixed; width: 100%; + top: 49px; + bottom: 0; + display: flex; + flex-direction: column; +`; + +const OverflowContainer = styled.div` height: 100%; + overflow-y: auto; + overflow-x: hidden; + background-color: #fff; `; const CentralizedContainer = styled.div` @@ -84,18 +94,15 @@ const CentralizedContainer = styled.div` margin: 0 auto; `; -const TitleContainer = styled(CentralizedContainer)` +const TitleContainer = styled.div` height: 124px; display: flex; align-items: center; + background-color: #fafbfd; `; const BodyContainer = styled.div` - background-color: #fff; - height: 100%; - box-shadow: 0 2px 2px -1px rgba(152, 162, 179, 0.3), - 0 1px 5px -2px rgba(152, 162, 179, 0.3); - border: 1px solid #d3dae6; + border-top: 1px solid #d3dae6; `; interface Props { @@ -119,120 +126,126 @@ export const Home = ({ core }: Props) => { }, [core.chrome]); return ( - - - - - - - -

- {i18n.translate('observability.home.title', { - defaultMessage: 'Observability', - })} -

-
-
-
-
- - - - - {/* title and description */} - - -

- {i18n.translate('observability.home.sectionTitle', { - defaultMessage: 'Observability built on the Elastic Stack', - })} -

-
- - - {i18n.translate('observability.home.sectionsubtitle', { - defaultMessage: - 'Bring your logs, metrics, and APM traces together at scale in a single stack so you can monitor and react to events happening anywhere in your environment.', - })} - -
- - {/* Apps sections */} - - - - - - {appsSection.map((app) => ( -
- ))} - - - - - - - - - {/* Get started button */} - - - - - {i18n.translate('observability.home.getStatedButton', { - defaultMessage: 'Get started', + + + + + + + + + +

+ {i18n.translate('observability.home.title', { + defaultMessage: 'Observability', + })} +

+
+
+
+
+
+ + + + + {/* title and description */} + + +

+ {i18n.translate('observability.home.sectionTitle', { + defaultMessage: + 'Observability built on the Elastic Stack', })} - - - - +

+
+ + + {i18n.translate('observability.home.sectionsubtitle', { + defaultMessage: + 'Bring your logs, metrics, and APM traces together at scale in a single stack so you can monitor and react to events happening anywhere in your environment.', + })} + +
- + {/* Apps sections */} + + + + + + {appsSection.map((app) => ( +
+ ))} + + + + + + + - {/* Try it out */} - - - - -

- {i18n.translate('observability.home.tryItOut', { - defaultMessage: 'Try it out', + {/* Get started button */} + + + + + {i18n.translate('observability.home.getStatedButton', { + defaultMessage: 'Get started', })} -

-
-
-
-
+ + + + - {/* Try it out sections */} - - - {tryItOutItemsSection.map((item) => ( - - -
- + + + {/* Try it out */} + + + + +

+ {i18n.translate('observability.home.tryItOut', { + defaultMessage: 'Try it out', + })} +

+
- ))} -
-
- - - + + + + {/* Try it out sections */} + + + {tryItOutItemsSection.map((item) => ( + + +
+ + + ))} + + + + + + + ); };