Fixed docs whitespace for mobile / tablet
This commit is contained in:
		
				
					committed by
					
						 fabioberger
						fabioberger
					
				
			
			
				
	
			
			
			
						parent
						
							33320fd758
						
					
				
				
					commit
					ace63fe83a
				
			| @@ -36,6 +36,10 @@ const GetStartedButton = styled(Button)` | |||||||
| `; | `; | ||||||
|  |  | ||||||
| const GetStartedParagraph = styled(Paragraph)` | const GetStartedParagraph = styled(Paragraph)` | ||||||
|  |     &:last-of-type { | ||||||
|  |         margin-bottom: 0; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     @media (max-width: 500px) { |     @media (max-width: 500px) { | ||||||
|         font-size: 14px; |         font-size: 14px; | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -1,8 +1,20 @@ | |||||||
| import styled from 'styled-components'; | import styled from 'styled-components'; | ||||||
|  |  | ||||||
| export const Separator = styled.hr` | interface ISeparatorProps { | ||||||
|  |     margin?: string; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | export const Separator = styled.hr<ISeparatorProps>` | ||||||
|     border-width: 0 0 1px; |     border-width: 0 0 1px; | ||||||
|     border-color: #e4e4e4; |     border-color: #e4e4e4; | ||||||
|     height: 0; |     height: 0; | ||||||
|     margin: 30px 0; |     margin: ${({ margin }) => margin}; | ||||||
|  |  | ||||||
|  |     @media (max-width: 768px) { | ||||||
|  |         margin: 30px 0; | ||||||
|  |     } | ||||||
| `; | `; | ||||||
|  |  | ||||||
|  | Separator.defaultProps = { | ||||||
|  |     margin: '30px 0', | ||||||
|  | }; | ||||||
|   | |||||||
| @@ -20,5 +20,4 @@ export const StepLinks: React.FC<ILinkProps> = ({ links }) => ( | |||||||
| const StepLinksWrapper = styled.div` | const StepLinksWrapper = styled.div` | ||||||
|     background-color: ${colors.backgroundLight}; |     background-color: ${colors.backgroundLight}; | ||||||
|     border: 1px solid #dbdfdd; |     border: 1px solid #dbdfdd; | ||||||
|     margin-bottom: 1.875rem; |  | ||||||
| `; | `; | ||||||
|   | |||||||
| @@ -15,6 +15,8 @@ import { Heading } from 'ts/components/text'; | |||||||
|  |  | ||||||
| import { documentConstants } from 'ts/utils/document_meta_constants'; | import { documentConstants } from 'ts/utils/document_meta_constants'; | ||||||
|  |  | ||||||
|  | const separatorMargin = '60px 0'; | ||||||
|  |  | ||||||
| export const DocsHome: React.FC = () => { | export const DocsHome: React.FC = () => { | ||||||
|     return ( |     return ( | ||||||
|         <SiteWrap theme="light"> |         <SiteWrap theme="light"> | ||||||
| @@ -26,7 +28,7 @@ export const DocsHome: React.FC = () => { | |||||||
|                         <ShortcutLink key={`shortcut-${index}`} {...shortcut} /> |                         <ShortcutLink key={`shortcut-${index}`} {...shortcut} /> | ||||||
|                     ))} |                     ))} | ||||||
|                 </ShortcutsWrapper> |                 </ShortcutsWrapper> | ||||||
|                 <Separator /> |                 <Separator margin={separatorMargin} /> | ||||||
|                 <GetStartedWrapper> |                 <GetStartedWrapper> | ||||||
|                     <div> |                     <div> | ||||||
|                         <Heading size="default">Get Started</Heading> |                         <Heading size="default">Get Started</Heading> | ||||||
| @@ -34,13 +36,12 @@ export const DocsHome: React.FC = () => { | |||||||
|                             <GetStartedLink key={`getStarted-${index}`} {...link} /> |                             <GetStartedLink key={`getStarted-${index}`} {...link} /> | ||||||
|                         ))} |                         ))} | ||||||
|                     </div> |                     </div> | ||||||
|                     <Separator /> |  | ||||||
|                     <div> |                     <div> | ||||||
|                         <Heading size="default">Useful Links</Heading> |                         <Heading size="default">Useful Links</Heading> | ||||||
|                         <StepLinks links={usefulLinks} /> |                         <StepLinks links={usefulLinks} /> | ||||||
|                     </div> |                     </div> | ||||||
|                 </GetStartedWrapper> |                 </GetStartedWrapper> | ||||||
|                 <Separator /> |                 <Separator margin={separatorMargin} /> | ||||||
|                 <CommunityWrapper> |                 <CommunityWrapper> | ||||||
|                     {communityShortcuts.map((shortcut, index) => ( |                     {communityShortcuts.map((shortcut, index) => ( | ||||||
|                         <CommunityLink key={`communityLink-${index}`} {...shortcut} /> |                         <CommunityLink key={`communityLink-${index}`} {...shortcut} /> | ||||||
| @@ -64,12 +65,11 @@ const ShortcutsWrapper = styled.div` | |||||||
|  |  | ||||||
| const GetStartedWrapper = styled.div` | const GetStartedWrapper = styled.div` | ||||||
|     display: grid; |     display: grid; | ||||||
|     grid-template-columns: 1fr 0 1fr; |     grid-template-columns: 1fr 1fr; | ||||||
|     grid-column-gap: 70px; |     grid-column-gap: 70px; | ||||||
|     grid-row-gap: 30px; |     grid-row-gap: 30px; | ||||||
|  |  | ||||||
|     @media (max-width: 900px) { |     @media (max-width: 900px) { | ||||||
|         grid-column-gap: 30px; |  | ||||||
|         grid-template-columns: 1fr; |         grid-template-columns: 1fr; | ||||||
|     } |     } | ||||||
| `; | `; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user