index.tsx 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. import React from "react";
  2. import Head from "next/head";
  3. import Link from "next/link";
  4. import Script from "next/script";
  5. import { AiOutlineRight } from "react-icons/ai";
  6. import {
  7. HiCursorClick,
  8. HiLightningBolt,
  9. HiOutlineDownload,
  10. HiOutlineSearchCircle,
  11. } from "react-icons/hi";
  12. import { IoRocketSharp } from "react-icons/io5";
  13. import { SiVisualstudiocode } from "react-icons/si";
  14. import { CarbonAds } from "src/components/CarbonAds";
  15. import { Footer } from "src/components/Footer";
  16. import { Producthunt } from "src/components/Producthunt";
  17. import { Sponsors } from "src/components/Sponsors";
  18. import { SupportButton } from "src/components/SupportButton";
  19. import { baseURL } from "src/constants/data";
  20. import * as Styles from "./styles";
  21. import { PricingCards } from "../PricingCards";
  22. const Navbar = () => (
  23. <Styles.StyledNavbar>
  24. <Styles.StyledNavLink href="/editor">Editor</Styles.StyledNavLink>
  25. <Link href="#features" passHref>
  26. <Styles.StyledNavLink>Features</Styles.StyledNavLink>
  27. </Link>
  28. <Link href="#sponsor" passHref>
  29. <Styles.StyledNavLink>Sponsor</Styles.StyledNavLink>
  30. </Link>
  31. <Styles.StyledNavLink
  32. href="https://github.com/AykutSarac/jsoncrack.com"
  33. target="_blank"
  34. rel="external"
  35. >
  36. GitHub
  37. </Styles.StyledNavLink>
  38. <Link href="docs" passHref>
  39. <Styles.StyledNavLink>Documentation</Styles.StyledNavLink>
  40. </Link>
  41. </Styles.StyledNavbar>
  42. );
  43. const HeroSection = () => {
  44. const [isModalVisible, setModalVisible] = React.useState(false);
  45. return (
  46. <Styles.StyledHeroSection id="main">
  47. <Styles.StyledTitle>
  48. <Styles.StyledGradientText>JSON</Styles.StyledGradientText> CRACK
  49. </Styles.StyledTitle>
  50. <Styles.StyledSubTitle>
  51. Seamlessly visualize your JSON data{" "}
  52. <Styles.StyledHighlightedText>instantly</Styles.StyledHighlightedText> into graphs.
  53. </Styles.StyledSubTitle>
  54. <Styles.StyledButton href="/editor" link>
  55. GO TO EDITOR
  56. <AiOutlineRight strokeWidth="80" />
  57. </Styles.StyledButton>
  58. <Styles.StyledButtonWrapper>
  59. <Styles.StyledSponsorButton href="/pricing" link>
  60. GET PREMIUM
  61. <IoRocketSharp />
  62. </Styles.StyledSponsorButton>
  63. <Styles.StyledSponsorButton
  64. href="https://marketplace.visualstudio.com/items?itemName=AykutSarac.jsoncrack-vscode"
  65. link
  66. isBlue
  67. >
  68. GET IT ON VS CODE
  69. <SiVisualstudiocode />
  70. </Styles.StyledSponsorButton>
  71. </Styles.StyledButtonWrapper>
  72. </Styles.StyledHeroSection>
  73. );
  74. };
  75. const PreviewSection = () => (
  76. <Styles.StyledPreviewSection>
  77. <Styles.StyledImageWrapper>
  78. <Styles.StyledImage
  79. width="1200"
  80. height="863"
  81. src="/assets/jsoncrack-screenshot.webp"
  82. alt="preview"
  83. />
  84. </Styles.StyledImageWrapper>
  85. </Styles.StyledPreviewSection>
  86. );
  87. const FeaturesSection = () => (
  88. <Styles.StyledFeaturesSection id="features">
  89. <Styles.StyledSectionCard>
  90. <Styles.StyledCardIcon>
  91. <HiCursorClick size={50} color="#3BA55D" />
  92. </Styles.StyledCardIcon>
  93. <Styles.StyledCardTitle>EASY-TO-USE</Styles.StyledCardTitle>
  94. <Styles.StyledCardDescription>
  95. We believe that powerful software doesn&apos;t have to be difficult to use. That&apos;s why
  96. we&apos;ve designed our app to be as intuitive and easy-to-use as possible. You can quickly
  97. and easily load your JSON data and start exploring and analyzing it right away!
  98. </Styles.StyledCardDescription>
  99. </Styles.StyledSectionCard>
  100. <Styles.StyledSectionCard>
  101. <Styles.StyledCardIcon>
  102. <HiOutlineSearchCircle size={50} color="#5865F2" />
  103. </Styles.StyledCardIcon>
  104. <Styles.StyledCardTitle>SEARCH</Styles.StyledCardTitle>
  105. <Styles.StyledCardDescription>
  106. Have a huge file of values, keys or arrays? Worry no more, type in the keyword you are
  107. looking for into search input and it will take you to each node with matching result
  108. highlighting the line to understand better!
  109. </Styles.StyledCardDescription>
  110. </Styles.StyledSectionCard>
  111. <Styles.StyledSectionCard>
  112. <Styles.StyledCardIcon>
  113. <HiOutlineDownload size={50} color="#DA2877" />
  114. </Styles.StyledCardIcon>
  115. <Styles.StyledCardTitle>DOWNLOAD</Styles.StyledCardTitle>
  116. <Styles.StyledCardDescription>
  117. Download the graph to your local machine and use it wherever you want, to your blogs,
  118. website or make it a poster and paste to the wall. Who wouldn&apos;t want to see a JSON
  119. Crack graph onto their wall, eh?
  120. </Styles.StyledCardDescription>
  121. </Styles.StyledSectionCard>
  122. <Styles.StyledSectionCard>
  123. <Styles.StyledCardIcon>
  124. <HiLightningBolt size={50} color="#F5E027" />
  125. </Styles.StyledCardIcon>
  126. <Styles.StyledCardTitle>LIVE</Styles.StyledCardTitle>
  127. <Styles.StyledCardDescription>
  128. With Microsoft&apos;s Monaco Editor which is also used by VS Code, easily edit your JSON and
  129. directly view through the graphs. Also there&apos;s a JSON validator above of it to make
  130. sure there is no type error.
  131. </Styles.StyledCardDescription>
  132. </Styles.StyledSectionCard>
  133. </Styles.StyledFeaturesSection>
  134. );
  135. const GitHubSection = () => (
  136. <Styles.StyledSection id="github" reverse>
  137. <Styles.StyledTwitterQuote>
  138. <blockquote className="twitter-tweet" data-lang="en" data-dnt="true" data-theme="light">
  139. <p lang="en" dir="ltr">
  140. Looking to understand or explore some JSON? Just paste or upload to visualize it as a
  141. graph with <a href="https://t.co/HlKSrhKryJ">https://t.co/HlKSrhKryJ</a> 😍 <br />
  142. <br />
  143. Thanks to <a href="https://twitter.com/aykutsarach?ref_src=twsrc%5Etfw">
  144. @aykutsarach
  145. </a>! <a href="https://t.co/0LyPUL8Ezz">pic.twitter.com/0LyPUL8Ezz</a>
  146. </p>
  147. &mdash; GitHub (@github){" "}
  148. <a href="https://twitter.com/github/status/1519363257794015233?ref_src=twsrc%5Etfw">
  149. April 27, 2022
  150. </a>
  151. </blockquote>{" "}
  152. <Script async src="https://platform.twitter.com/widgets.js" charSet="utf-8"></Script>
  153. </Styles.StyledTwitterQuote>
  154. <Styles.StyledSectionArea>
  155. <Styles.StyledSubTitle>Open Source Community</Styles.StyledSubTitle>
  156. <Styles.StyledMinorTitle>
  157. At JSON Crack, we believe in the power of open source software and the communities that
  158. support it. That&apos;s why we&apos;re proud to be part of the open source community and to
  159. contribute to the development and growth of open source tools and technologies.
  160. <br />
  161. <br /> As part of our commitment to the open source community, we&apos;ve made our app
  162. freely available to anyone who wants to use it, and we welcome contributions from anyone
  163. who&apos;s interested in helping to improve it. Whether you&apos;re a developer, a data
  164. scientist, or just someone who&apos;s passionate about open source, we&apos;d love to have
  165. you join our community and help us make JSON Crack the best it can be.
  166. <br />
  167. <br /> So why not join us and become part of the JSON Crack open source community today? We
  168. can&apos;t wait to see what we can accomplish together!
  169. </Styles.StyledMinorTitle>
  170. <Styles.StyledButton
  171. href="https://github.com/AykutSarac/jsoncrack.com"
  172. status="SECONDARY"
  173. link
  174. >
  175. STAR ON GITHUB
  176. </Styles.StyledButton>
  177. </Styles.StyledSectionArea>
  178. </Styles.StyledSection>
  179. );
  180. const EmbedSection = () => (
  181. <Styles.StyledSection id="embed">
  182. <Styles.StyledSectionArea>
  183. <Styles.StyledSubTitle>Embed Into Your Website</Styles.StyledSubTitle>
  184. <Styles.StyledMinorTitle>
  185. JSON Crack provides users with the necessary code to embed the app into a website easily
  186. using an iframe. This code can be easily copied and pasted into the desired location on the
  187. website, allowing users to quickly and easily integrate JSON Crack into existing workflows.
  188. <br />
  189. <br /> Once the app is embedded, users can use it to view and analyze JSON data directly on
  190. the website. This can be useful for a variety of purposes, such as quickly checking the
  191. structure of a JSON file or verifying the data contained within it. JSON Crack&apos;s
  192. intuitive interface makes it easy to navigate and understand even complex JSON data, making
  193. it a valuable tool for anyone working with JSON.
  194. </Styles.StyledMinorTitle>
  195. <Styles.StyledButton href="/docs" status="SECONDARY" link>
  196. LEARN TO EMBED
  197. </Styles.StyledButton>
  198. </Styles.StyledSectionArea>
  199. <div>
  200. <Styles.StyledIframge
  201. src={`${baseURL}/widget`}
  202. onLoad={e => {
  203. const frame = e.currentTarget.contentWindow;
  204. setTimeout(() => {
  205. frame?.postMessage(
  206. {
  207. json: JSON.stringify({
  208. "random images": [
  209. "https://random.imagecdn.app/50/50?.png",
  210. "https://random.imagecdn.app/80/80?.png",
  211. "https://random.imagecdn.app/100/100?.png",
  212. ],
  213. }),
  214. options: {
  215. theme: "dark",
  216. },
  217. },
  218. "*"
  219. );
  220. }, 500);
  221. }}
  222. ></Styles.StyledIframge>
  223. </div>
  224. </Styles.StyledSection>
  225. );
  226. const SupportSection = () => (
  227. <Styles.StyledPaidSection>
  228. <Styles.StyledProducthunt>
  229. <Styles.StyledSubTitle>
  230. Support JSON Crack at
  231. <br />
  232. <Styles.StyledHighlightedText>Product Hunt</Styles.StyledHighlightedText>
  233. </Styles.StyledSubTitle>
  234. <Producthunt />
  235. </Styles.StyledProducthunt>
  236. <Styles.StyledAffiliate>
  237. <Styles.StyledSubTitle>Affiliate</Styles.StyledSubTitle>
  238. <CarbonAds />
  239. </Styles.StyledAffiliate>
  240. </Styles.StyledPaidSection>
  241. );
  242. const SponsorSection = () => (
  243. <Styles.StyledSponsorSection id="sponsor">
  244. <Styles.StyledSubTitle>Sponsors</Styles.StyledSubTitle>
  245. <Styles.StyledMinorTitle>
  246. Your supports make JSON Crack possible to continue and accessible for everyone!
  247. </Styles.StyledMinorTitle>
  248. <Styles.StyledButton
  249. href="https://github.com/sponsors/AykutSarac"
  250. rel="external"
  251. status="SUCCESS"
  252. link
  253. >
  254. Become A Sponsor!
  255. </Styles.StyledButton>
  256. <Sponsors />
  257. </Styles.StyledSponsorSection>
  258. );
  259. const Home: React.FC = () => {
  260. return (
  261. <Styles.StyledHome>
  262. <Head>
  263. <title>JSON Crack - Crack your data into pieces</title>
  264. </Head>
  265. <Navbar />
  266. <HeroSection />
  267. <PreviewSection />
  268. <FeaturesSection />
  269. <GitHubSection />
  270. <EmbedSection />
  271. <PricingCards />
  272. <SupportSection />
  273. <SponsorSection />
  274. <SupportButton />
  275. <Footer />
  276. </Styles.StyledHome>
  277. );
  278. };
  279. export default Home;