index.tsx 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. import React from "react";
  2. import Head from "next/head";
  3. import Link from "next/link";
  4. import { useRouter } from "next/router";
  5. import { FaGithub, FaHeart, FaLinkedin, FaTwitter } from "react-icons/fa";
  6. import {
  7. HiCursorClick,
  8. HiLightningBolt,
  9. HiOutlineDownload,
  10. HiOutlineSearchCircle,
  11. } from "react-icons/hi";
  12. import { TwitterTweetEmbed } from "react-twitter-embed";
  13. import { CarbonAds } from "src/components/CarbonAds";
  14. import { Producthunt } from "src/components/Producthunt";
  15. import { Sponsors } from "src/components/Sponsors";
  16. import { GoalsModal } from "src/containers/Modals/GoalsModal";
  17. import pkg from "../../../package.json";
  18. import * as Styles from "./styles";
  19. const Navbar = () => (
  20. <Styles.StyledNavbar>
  21. <Styles.StyledNavLink href="/editor">Editor</Styles.StyledNavLink>
  22. <Link href="#features" passHref>
  23. <Styles.StyledNavLink>Features</Styles.StyledNavLink>
  24. </Link>
  25. <Link href="#sponsor" passHref>
  26. <Styles.StyledNavLink>Sponsor</Styles.StyledNavLink>
  27. </Link>
  28. <Styles.StyledNavLink
  29. href="https://github.com/AykutSarac/jsoncrack.com"
  30. target="_blank"
  31. rel="external"
  32. >
  33. GitHub
  34. </Styles.StyledNavLink>
  35. </Styles.StyledNavbar>
  36. );
  37. const HeroSection = () => {
  38. const [isModalVisible, setModalVisible] = React.useState(false);
  39. return (
  40. <Styles.StyledHeroSection id="main">
  41. <Styles.StyledTitle>
  42. <Styles.StyledGradientText>JSON</Styles.StyledGradientText> Crack
  43. </Styles.StyledTitle>
  44. <Styles.StyledSubTitle>
  45. Seamlessly visualize your JSON data{" "}
  46. <Styles.StyledHighlightedText>instantly</Styles.StyledHighlightedText> into
  47. graphs.
  48. </Styles.StyledSubTitle>
  49. <Styles.StyledMinorTitle>Paste - Import - Fetch!</Styles.StyledMinorTitle>
  50. <Styles.StyledButton rel="prefetch" href="/editor" target="_blank" link>
  51. GO TO EDITOR
  52. </Styles.StyledButton>
  53. <Styles.StyledSponsorButton onClick={() => setModalVisible(true)}>
  54. Help JSON Crack&apos;s Goals
  55. <FaHeart />
  56. </Styles.StyledSponsorButton>
  57. <GoalsModal visible={isModalVisible} setVisible={setModalVisible} />
  58. </Styles.StyledHeroSection>
  59. );
  60. };
  61. const PreviewSection = () => (
  62. <Styles.StyledPreviewSection>
  63. <Styles.StyledImageWrapper>
  64. <Styles.StyledImage
  65. width="1200"
  66. height="863"
  67. src="/jsoncrack-screenshot.webp"
  68. alt="preview"
  69. />
  70. </Styles.StyledImageWrapper>
  71. </Styles.StyledPreviewSection>
  72. );
  73. const FeaturesSection = () => (
  74. <Styles.StyledFeaturesSection id="features">
  75. <Styles.StyledSectionCard>
  76. <Styles.StyledCardIcon>
  77. <HiCursorClick size={50} color="#3BA55D" />
  78. </Styles.StyledCardIcon>
  79. <Styles.StyledCardTitle>EASY-TO-USE</Styles.StyledCardTitle>
  80. <Styles.StyledCardDescription>
  81. Don&apos;t even bother to update your schema to view your JSON into graphs;
  82. directly paste, import or fetch! JSON Crack helps you to visualize without
  83. any additional values and save your time.
  84. </Styles.StyledCardDescription>
  85. </Styles.StyledSectionCard>
  86. <Styles.StyledSectionCard>
  87. <Styles.StyledCardIcon>
  88. <HiOutlineSearchCircle size={50} color="#5865F2" />
  89. </Styles.StyledCardIcon>
  90. <Styles.StyledCardTitle>SEARCH</Styles.StyledCardTitle>
  91. <Styles.StyledCardDescription>
  92. Have a huge file of values, keys or arrays? Worry no more, type in the
  93. keyword you are looking for into search input and it will take you to each
  94. node with matching result highlighting the line to understand better!
  95. </Styles.StyledCardDescription>
  96. </Styles.StyledSectionCard>
  97. <Styles.StyledSectionCard>
  98. <Styles.StyledCardIcon>
  99. <HiOutlineDownload size={50} color="#DA2877" />
  100. </Styles.StyledCardIcon>
  101. <Styles.StyledCardTitle>DOWNLOAD</Styles.StyledCardTitle>
  102. <Styles.StyledCardDescription>
  103. Download the graph to your local machine and use it wherever you want, to
  104. your blogs, website or make it a poster and paste to the wall. Who
  105. wouldn&apos;t want to see a JSON Crack graph onto their wall, eh?
  106. </Styles.StyledCardDescription>
  107. </Styles.StyledSectionCard>
  108. <Styles.StyledSectionCard>
  109. <Styles.StyledCardIcon>
  110. <HiLightningBolt size={50} color="#F5E027" />
  111. </Styles.StyledCardIcon>
  112. <Styles.StyledCardTitle>LIVE</Styles.StyledCardTitle>
  113. <Styles.StyledCardDescription>
  114. With Microsoft&apos;s Monaco Editor which is also used by VS Code, easily
  115. edit your JSON and directly view through the graphs. Also there&apos;s a JSON
  116. validator above of it to make sure there is no type error.
  117. </Styles.StyledCardDescription>
  118. </Styles.StyledSectionCard>
  119. </Styles.StyledFeaturesSection>
  120. );
  121. const GitHubSection = () => (
  122. <Styles.StyledSection id="github" reverse>
  123. <TwitterTweetEmbed
  124. tweetId="1519363257794015233"
  125. options={{
  126. width: "600",
  127. align: "center",
  128. }}
  129. />
  130. <Styles.StyledSectionArea>
  131. <Styles.StyledSubTitle>Open Source Community</Styles.StyledSubTitle>
  132. <Styles.StyledMinorTitle>
  133. Join the Open Source Community by suggesting new ideas, support by
  134. contributing; implementing new features, fixing bugs and doing changes minor
  135. to major!
  136. </Styles.StyledMinorTitle>
  137. <Styles.StyledButton
  138. href="https://github.com/AykutSarac/jsoncrack.com"
  139. status="SECONDARY"
  140. link
  141. >
  142. STAR ON GITHUB
  143. </Styles.StyledButton>
  144. </Styles.StyledSectionArea>
  145. </Styles.StyledSection>
  146. );
  147. const EmbedSection = () => (
  148. <Styles.StyledSection id="embed">
  149. <Styles.StyledSectionArea>
  150. <Styles.StyledSubTitle>Embed Into Your Website</Styles.StyledSubTitle>
  151. <Styles.StyledMinorTitle>
  152. Easily embed the JSON Crack graph into your website to showcase your
  153. visitors, blog readers or anybody else!
  154. </Styles.StyledMinorTitle>
  155. </Styles.StyledSectionArea>
  156. <div>
  157. <Styles.StyledIframge src="https://jsoncrack.com/widget?json=%5B%5B%22squadName%22%2C%22homeTown%22%2C%22formed%22%2C%22secretBase%22%2C%22active%22%2C%22members%22%2C%22a%7C0%7C1%7C2%7C3%7C4%7C5%22%2C%22Super%20hero%20squad%22%2C%22Metro%20City%22%2C%22n%7CWW%22%2C%22Super%20tower%22%2C%22b%7CT%22%2C%22name%22%2C%22age%22%2C%22secretIdentity%22%2C%22powers%22%2C%22a%7CC%7CD%7CE%7CF%22%2C%22Molecule%20Man%22%2C%22n%7CT%22%2C%22Dan%20Jukes%22%2C%22Radiation%20resistance%22%2C%22Turning%20tiny%22%2C%22Radiation%20blast%22%2C%22a%7CK%7CL%7CM%22%2C%22o%7CG%7CH%7CI%7CJ%7CN%22%2C%22Madame%20Uppercut%22%2C%22n%7Cd%22%2C%22Jane%20Wilson%22%2C%22Million%20tonne%20punch%22%2C%22Damage%20resistance%22%2C%22Superhuman%20reflexes%22%2C%22a%7CS%7CT%7CU%22%2C%22o%7CG%7CP%7CQ%7CR%7CV%22%2C%22Eternal%20Flame%22%2C%22n%7C4C92%22%2C%22Unknown%22%2C%22Immortality%22%2C%22Heat%20Immunity%22%2C%22Inferno%22%2C%22Teleportation%22%2C%22Interdimensional%20travel%22%2C%22a%7Ca%7Cb%7Cc%7Cd%7Ce%22%2C%22o%7CG%7CX%7CY%7CZ%7Cf%22%2C%22a%7CO%7CW%7Cg%22%2C%22o%7C6%7C7%7C8%7C9%7CA%7CB%7Ch%22%5D%2C%22i%22%5D"></Styles.StyledIframge>
  158. </div>
  159. </Styles.StyledSection>
  160. );
  161. const SupportSection = () => (
  162. <Styles.StyledPaidSection>
  163. <Styles.StyledProducthunt>
  164. <Styles.StyledSubTitle>
  165. Support JSON Crack at
  166. <br />
  167. <Styles.StyledHighlightedText>Product Hunt</Styles.StyledHighlightedText>
  168. </Styles.StyledSubTitle>
  169. <Producthunt />
  170. </Styles.StyledProducthunt>
  171. <Styles.StyledAffiliate>
  172. <Styles.StyledSubTitle>Affiliate</Styles.StyledSubTitle>
  173. <CarbonAds />
  174. </Styles.StyledAffiliate>
  175. </Styles.StyledPaidSection>
  176. );
  177. const SponsorSection = () => (
  178. <Styles.StyledSponsorSection id="sponsor">
  179. <Styles.StyledSubTitle>Sponsors</Styles.StyledSubTitle>
  180. <Styles.StyledMinorTitle>
  181. Your supports make JSON Crack possible to continue and accessible for everyone!
  182. </Styles.StyledMinorTitle>
  183. <Styles.StyledButton
  184. href="https://github.com/sponsors/AykutSarac"
  185. rel="external"
  186. status="SUCCESS"
  187. link
  188. >
  189. Become A Sponsor!
  190. </Styles.StyledButton>
  191. <Sponsors />
  192. </Styles.StyledSponsorSection>
  193. );
  194. const Footer = () => (
  195. <Styles.StyledFooter>
  196. <Styles.StyledFooterText>
  197. © 2022 JSON Crack - {pkg.version}
  198. </Styles.StyledFooterText>
  199. <Styles.StyledIconLinks>
  200. <Styles.StyledNavLink
  201. href="https://github.com/AykutSarac/jsoncrack.com"
  202. rel="external"
  203. target="_blank"
  204. aria-label="github"
  205. >
  206. <FaGithub size={26} />
  207. </Styles.StyledNavLink>
  208. <Styles.StyledNavLink
  209. href="https://www.linkedin.com/in/aykutsarac/"
  210. rel="me"
  211. target="_blank"
  212. aria-label="linkedin"
  213. >
  214. <FaLinkedin size={26} />
  215. </Styles.StyledNavLink>
  216. <Styles.StyledNavLink
  217. href="https://twitter.com/aykutsarach"
  218. rel="me"
  219. target="_blank"
  220. aria-label="twitter"
  221. >
  222. <FaTwitter size={26} />
  223. </Styles.StyledNavLink>
  224. </Styles.StyledIconLinks>
  225. </Styles.StyledFooter>
  226. );
  227. const Home: React.FC = () => {
  228. return (
  229. <Styles.StyledHome>
  230. <Head>
  231. <title>JSON Crack - Crack your data into pieces</title>
  232. </Head>
  233. <Navbar />
  234. <HeroSection />
  235. <PreviewSection />
  236. <FeaturesSection />
  237. <GitHubSection />
  238. <EmbedSection />
  239. <SupportSection />
  240. <SponsorSection />
  241. <Footer />
  242. </Styles.StyledHome>
  243. );
  244. };
  245. export default Home;