|
| 1 | +// @flow |
| 2 | + |
| 3 | +import React from "react" |
| 4 | +import Button from "@material-ui/core/Button" |
| 5 | +import { styled } from "@material-ui/core/styles" |
| 6 | +import * as colors from "@material-ui/core/colors" |
| 7 | +import Grid from "@material-ui/core/Grid" |
| 8 | +import Markdown from "react-markdown" |
| 9 | +import GitHubButton from "react-github-btn" |
| 10 | + |
| 11 | +const RootContainer = styled("div")({ |
| 12 | + display: "flex", |
| 13 | + flexDirection: "column", |
| 14 | + alignItems: "center" |
| 15 | +}) |
| 16 | +const ContentContainer = styled("div")({ |
| 17 | + width: "100%", |
| 18 | + boxSizing: "border-box", |
| 19 | + display: "flex", |
| 20 | + flexDirection: "column", |
| 21 | + maxWidth: 1200 |
| 22 | +}) |
| 23 | +const Header = styled("div")({ |
| 24 | + width: "100%", |
| 25 | + display: "flex", |
| 26 | + justifyContent: "center", |
| 27 | + backgroundColor: colors.blue[600], |
| 28 | + padding: 8, |
| 29 | + boxSizing: "border-box" |
| 30 | +}) |
| 31 | +const HeaderButton = styled(Button)({ |
| 32 | + color: "white", |
| 33 | + margin: 8, |
| 34 | + padding: 16, |
| 35 | + paddingLeft: 24, |
| 36 | + paddingRight: 24 |
| 37 | +}) |
| 38 | +const Hero = styled("div")({ |
| 39 | + display: "flex", |
| 40 | + justifyContent: "center", |
| 41 | + width: "100%", |
| 42 | + backgroundColor: colors.blue[500], |
| 43 | + padding: 16, |
| 44 | + color: "white", |
| 45 | + boxSizing: "border-box" |
| 46 | +}) |
| 47 | +const HeroMain = styled("div")({ |
| 48 | + fontSize: 48, |
| 49 | + fontWeight: "bold", |
| 50 | + paddingTop: 64, |
| 51 | + textShadow: "0px 1px 5px rgba(0,0,0,0.3)" |
| 52 | +}) |
| 53 | +const HeroSub = styled("div")({ |
| 54 | + paddingTop: 32, |
| 55 | + lineHeight: 1.5, |
| 56 | + fontSize: 24, |
| 57 | + textShadow: "0px 1px 3px rgba(0,0,0,0.2)" |
| 58 | +}) |
| 59 | +const HeroButtons = styled("div")({ |
| 60 | + paddingTop: 32, |
| 61 | + paddingBottom: 48 |
| 62 | +}) |
| 63 | +const Section = styled("div")({ |
| 64 | + display: "flex", |
| 65 | + padding: 16 |
| 66 | +}) |
| 67 | +const SectionHeader = styled("div")({ |
| 68 | + display: "flex", |
| 69 | + fontSize: 32, |
| 70 | + color: colors.grey[800] |
| 71 | +}) |
| 72 | + |
| 73 | +const LandingPage = () => { |
| 74 | + return ( |
| 75 | + <RootContainer> |
| 76 | + <Header id="about"> |
| 77 | + <ContentContainer style={{ flexDirection: "row", flexGrow: 1 }}> |
| 78 | + <HeaderButton href="#">About</HeaderButton> |
| 79 | + <HeaderButton href="basic-usage">Basic Usage</HeaderButton> |
| 80 | + <HeaderButton href="props">Props</HeaderButton> |
| 81 | + <HeaderButton href="./demo">Demo Playground</HeaderButton> |
| 82 | + </ContentContainer> |
| 83 | + </Header> |
| 84 | + <Hero> |
| 85 | + <ContentContainer> |
| 86 | + <HeroMain>React Image Annotate</HeroMain> |
| 87 | + <HeroSub> |
| 88 | + Powerful React component for image annotations with bounding boxes, |
| 89 | + tagging, classification, multiple images and polygon segmentation. |
| 90 | + </HeroSub> |
| 91 | + <HeroButtons> |
| 92 | + <GitHubButton |
| 93 | + href="https://github.com/waoai/react-image-annotate" |
| 94 | + data-size="large" |
| 95 | + data-show-count="true" |
| 96 | + aria-label="Star waoai/react-image-annotate on GitHub" |
| 97 | + > |
| 98 | + Star |
| 99 | + </GitHubButton> |
| 100 | + </HeroButtons> |
| 101 | + </ContentContainer> |
| 102 | + </Hero> |
| 103 | + <ContentContainer> |
| 104 | + <Section id="basic-usage"> |
| 105 | + <SectionHeader>Basic Usage</SectionHeader> |
| 106 | + </Section> |
| 107 | + <Section id="props"> |
| 108 | + <SectionHeader>Props</SectionHeader> |
| 109 | + </Section> |
| 110 | + </ContentContainer> |
| 111 | + </RootContainer> |
| 112 | + ) |
| 113 | +} |
| 114 | + |
| 115 | +export default LandingPage |
0 commit comments