index.tsx 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. import React from "react";
  2. import { Button } from "src/components/Button";
  3. import { Container } from "src/components/Container";
  4. import { Navbar } from "src/components/Navbar";
  5. import { Image } from "src/components/Image";
  6. import styled from "styled-components";
  7. import { AiFillGithub } from "react-icons/ai";
  8. import { Footer } from "src/components/Footer";
  9. import Link from "next/link";
  10. import Head from "next/head";
  11. const StyledHome = styled.div`
  12. padding: 24px;
  13. `;
  14. const StyledContent = styled.div`
  15. font-size: 20px;
  16. font-weight: 500;
  17. color: ${({ theme }) => theme.SILVER};
  18. width: 50%;
  19. @media only screen and (max-width: 768px) {
  20. width: 100%;
  21. text-align: center;
  22. button {
  23. margin-left: auto;
  24. margin-right: auto;
  25. }
  26. }
  27. `;
  28. const StyledHeader = styled.h2`
  29. font-size: 54px;
  30. color: ${({ theme }) => theme.FULL_WHITE};
  31. @media only screen and (max-width: 768px) {
  32. font-size: 36px;
  33. }
  34. `;
  35. const StyledSubContent = styled.div`
  36. margin-bottom: 20px;
  37. `;
  38. const StyledText = styled.span<{ white?: boolean }>`
  39. color: ${({ theme, white }) => (white ? theme.FULL_WHITE : theme.ORANGE)};
  40. `;
  41. const Home: React.FC = () => {
  42. return (
  43. <StyledHome>
  44. <Head>
  45. <title>JSON Visio</title>
  46. </Head>
  47. <Navbar />
  48. <Container>
  49. <StyledContent>
  50. <StyledHeader as="h1">
  51. Visualize your JSON into interactive graphs.
  52. </StyledHeader>
  53. <StyledSubContent>
  54. Simple visualization tool for your JSON data. No forced structure,
  55. paste your JSON data and view it instantly.
  56. </StyledSubContent>
  57. <Link href="/editor" passHref>
  58. <a>
  59. <Button status="SECONDARY">Start Generating</Button>
  60. </a>
  61. </Link>
  62. </StyledContent>
  63. <Image src="graphs.svg" width={500} height={400} alt="graphs" />
  64. </Container>
  65. <Container reverse>
  66. <StyledContent>
  67. <StyledHeader>No Rules</StyledHeader>
  68. <StyledSubContent>
  69. Be free, you don&apos;t have to restructure your json to transform
  70. it into graphs. We&apos;ve done it at our side, so you can just
  71. paste your JSON.
  72. </StyledSubContent>
  73. <Link href="/editor" passHref>
  74. <a>
  75. <Button status="SUCCESS">Paste It!</Button>
  76. </a>
  77. </Link>
  78. </StyledContent>
  79. <Image src="graphs3.svg" width={500} height={400} alt="preview" />
  80. </Container>
  81. <Container>
  82. <StyledContent>
  83. <StyledHeader>Import File</StyledHeader>
  84. <StyledSubContent>
  85. Have an existing file for your data? No worries, directly import it
  86. into our editor without having to scroll through all of it!
  87. </StyledSubContent>
  88. <Link href="/editor" passHref>
  89. <a>
  90. <Button status="SUCCESS">Import JSON</Button>
  91. </a>
  92. </Link>
  93. </StyledContent>
  94. <Image src="graphs4.svg" width={500} height={400} alt="preview" />
  95. </Container>
  96. <Container reverse>
  97. <StyledContent>
  98. <StyledHeader>Supported by Open Source</StyledHeader>
  99. <StyledSubContent>
  100. We do our work at open source. Help us improve by contributing to
  101. <StyledText> JSON</StyledText>
  102. <StyledText white> Visio</StyledText> at GitHub!
  103. </StyledSubContent>
  104. <Link href="https://github.com/AykutSarac/jsonvisio.com" passHref>
  105. <a rel="me" target="_blank">
  106. <Button>
  107. <AiFillGithub size={20} />
  108. Check GitHub
  109. </Button>
  110. </a>
  111. </Link>
  112. </StyledContent>
  113. <Image src="graphs5.svg" width={500} height={400} alt="preview" />
  114. </Container>
  115. <Footer />
  116. </StyledHome>
  117. );
  118. };
  119. export default Home;