index.tsx 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  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 { FaGithub, FaHeart, FaLinkedin, FaTwitter } from "react-icons/fa";
  7. import {
  8. HiCursorClick,
  9. HiLightningBolt,
  10. HiOutlineDownload,
  11. HiOutlineSearchCircle,
  12. } from "react-icons/hi";
  13. import { SiVisualstudiocode } from "react-icons/si";
  14. import { CarbonAds } from "src/components/CarbonAds";
  15. import { Producthunt } from "src/components/Producthunt";
  16. import { Sponsors } from "src/components/Sponsors";
  17. import { SupportButton } from "src/components/SupportButton";
  18. import { defaultJson } from "src/constants/data";
  19. import { GoalsModal } from "src/containers/Modals/GoalsModal";
  20. import pkg from "../../../package.json";
  21. import * as Styles from "./styles";
  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. </Styles.StyledNavbar>
  39. );
  40. const HeroSection = () => {
  41. const [isModalVisible, setModalVisible] = React.useState(false);
  42. return (
  43. <Styles.StyledHeroSection id="main">
  44. <Styles.StyledTitle>
  45. <Styles.StyledGradientText>JSON</Styles.StyledGradientText> CRACK
  46. </Styles.StyledTitle>
  47. <Styles.StyledSubTitle>
  48. Seamlessly visualize your JSON data{" "}
  49. <Styles.StyledHighlightedText>instantly</Styles.StyledHighlightedText> into
  50. graphs.
  51. </Styles.StyledSubTitle>
  52. <Styles.StyledButton rel="prefetch" href="/editor" link>
  53. GO TO EDITOR
  54. <AiOutlineRight strokeWidth="30px" />
  55. </Styles.StyledButton>
  56. <Styles.StyledButtonWrapper>
  57. <Styles.StyledSponsorButton onClick={() => setModalVisible(true)}>
  58. Help JSON Crack&apos;s Goals
  59. <FaHeart />
  60. </Styles.StyledSponsorButton>
  61. <Styles.StyledSponsorButton
  62. href="https://marketplace.visualstudio.com/items?itemName=AykutSarac.jsoncrack-vscode"
  63. link
  64. isBlue
  65. >
  66. GET IT ON VS CODE
  67. <SiVisualstudiocode />
  68. </Styles.StyledSponsorButton>
  69. <GoalsModal visible={isModalVisible} setVisible={setModalVisible} />
  70. </Styles.StyledButtonWrapper>
  71. </Styles.StyledHeroSection>
  72. );
  73. };
  74. const PreviewSection = () => (
  75. <Styles.StyledPreviewSection>
  76. <Styles.StyledImageWrapper>
  77. <Styles.StyledImage
  78. width="1200"
  79. height="863"
  80. src="/assets/jsoncrack-screenshot.webp"
  81. alt="preview"
  82. />
  83. </Styles.StyledImageWrapper>
  84. </Styles.StyledPreviewSection>
  85. );
  86. const FeaturesSection = () => (
  87. <Styles.StyledFeaturesSection id="features">
  88. <Styles.StyledSectionCard>
  89. <Styles.StyledCardIcon>
  90. <HiCursorClick size={50} color="#3BA55D" />
  91. </Styles.StyledCardIcon>
  92. <Styles.StyledCardTitle>EASY-TO-USE</Styles.StyledCardTitle>
  93. <Styles.StyledCardDescription>
  94. We believe that powerful software doesn&apos;t have to be difficult to use.
  95. That&apos;s why we&apos;ve designed our app to be as intuitive and
  96. easy-to-use as possible. You can quickly and easily load your JSON data and
  97. 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
  107. keyword you are looking for into search input and it will take you to each
  108. node with matching result 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
  118. your blogs, website or make it a poster and paste to the wall. Who
  119. wouldn&apos;t want to see a JSON 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
  129. edit your JSON and directly view through the graphs. Also there&apos;s a JSON
  130. validator above of it to make 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
  139. className="twitter-tweet"
  140. data-lang="en"
  141. data-dnt="true"
  142. data-theme="light"
  143. >
  144. <p lang="en" dir="ltr">
  145. Looking to understand or explore some JSON? Just paste or upload to
  146. visualize it as a graph with{" "}
  147. <a href="https://t.co/HlKSrhKryJ">https://t.co/HlKSrhKryJ</a> 😍 <br />
  148. <br />
  149. Thanks to{" "}
  150. <a href="https://twitter.com/aykutsarach?ref_src=twsrc%5Etfw">
  151. @aykutsarach
  152. </a>
  153. ! <a href="https://t.co/0LyPUL8Ezz">pic.twitter.com/0LyPUL8Ezz</a>
  154. </p>
  155. &mdash; GitHub (@github){" "}
  156. <a href="https://twitter.com/github/status/1519363257794015233?ref_src=twsrc%5Etfw">
  157. April 27, 2022
  158. </a>
  159. </blockquote>{" "}
  160. <Script
  161. async
  162. src="https://platform.twitter.com/widgets.js"
  163. charSet="utf-8"
  164. ></Script>
  165. </Styles.StyledTwitterQuote>
  166. <Styles.StyledSectionArea>
  167. <Styles.StyledSubTitle>Open Source Community</Styles.StyledSubTitle>
  168. <Styles.StyledMinorTitle>
  169. At JSON Crack, we believe in the power of open source software and the
  170. communities that support it. That&apos;s why we&apos;re proud to be part of
  171. the open source community and to contribute to the development and growth of
  172. open source tools and technologies.
  173. <br />
  174. <br /> As part of our commitment to the open source community, we&apos;ve
  175. made our app freely available to anyone who wants to use it, and we welcome
  176. contributions from anyone who&apos;s interested in helping to improve it.
  177. Whether you&apos;re a developer, a data scientist, or just someone who&apos;s
  178. passionate about open source, we&apos;d love to have you join our community
  179. and help us make JSON Crack the best it can be.
  180. <br />
  181. <br /> So why not join us and become part of the JSON Crack open source
  182. community today? We can&apos;t wait to see what we can accomplish together!
  183. </Styles.StyledMinorTitle>
  184. <Styles.StyledButton
  185. href="https://github.com/AykutSarac/jsoncrack.com"
  186. status="SECONDARY"
  187. link
  188. >
  189. STAR ON GITHUB
  190. </Styles.StyledButton>
  191. </Styles.StyledSectionArea>
  192. </Styles.StyledSection>
  193. );
  194. const EmbedSection = () => (
  195. <Styles.StyledSection id="embed">
  196. <Styles.StyledSectionArea>
  197. <Styles.StyledSubTitle>Embed Into Your Website</Styles.StyledSubTitle>
  198. <Styles.StyledMinorTitle>
  199. JSON Crack provides users with the necessary code to embed the app into a
  200. website easily using an iframe. This code can be easily copied and pasted
  201. into the desired location on the website, allowing users to quickly and
  202. easily integrate JSON Crack into existing workflows.
  203. <br />
  204. <br /> Once the app is embedded, users can use it to view and analyze JSON
  205. data directly on the website. This can be useful for a variety of purposes,
  206. such as quickly checking the structure of a JSON file or verifying the data
  207. contained within it. JSON Crack&apos;s intuitive interface makes it easy to
  208. navigate and understand even complex JSON data, making it a valuable tool for
  209. anyone working with JSON.
  210. </Styles.StyledMinorTitle>
  211. <Styles.StyledButton
  212. href="https://jsoncrack.com/embed"
  213. status="SECONDARY"
  214. link
  215. >
  216. LEARN TO EMBED
  217. </Styles.StyledButton>
  218. </Styles.StyledSectionArea>
  219. <div>
  220. <Styles.StyledIframge
  221. src="https://jsoncrack.com/widget"
  222. onLoad={e => {
  223. const frame = e.currentTarget.contentWindow;
  224. setTimeout(() => {
  225. frame?.postMessage(
  226. {
  227. json: defaultJson,
  228. options: {
  229. theme: "dark",
  230. direction: "DOWN",
  231. },
  232. },
  233. "*"
  234. );
  235. }, 500);
  236. }}
  237. ></Styles.StyledIframge>
  238. </div>
  239. </Styles.StyledSection>
  240. );
  241. const SupportSection = () => (
  242. <Styles.StyledPaidSection>
  243. <Styles.StyledProducthunt>
  244. <Styles.StyledSubTitle>
  245. Support JSON Crack at
  246. <br />
  247. <Styles.StyledHighlightedText>Product Hunt</Styles.StyledHighlightedText>
  248. </Styles.StyledSubTitle>
  249. <Producthunt />
  250. </Styles.StyledProducthunt>
  251. <Styles.StyledAffiliate>
  252. <Styles.StyledSubTitle>Affiliate</Styles.StyledSubTitle>
  253. <CarbonAds />
  254. </Styles.StyledAffiliate>
  255. </Styles.StyledPaidSection>
  256. );
  257. const SponsorSection = () => (
  258. <Styles.StyledSponsorSection id="sponsor">
  259. <Styles.StyledSubTitle>Sponsors</Styles.StyledSubTitle>
  260. <Styles.StyledMinorTitle>
  261. Your supports make JSON Crack possible to continue and accessible for everyone!
  262. </Styles.StyledMinorTitle>
  263. <Styles.StyledButton
  264. href="https://github.com/sponsors/AykutSarac"
  265. rel="external"
  266. status="SUCCESS"
  267. link
  268. >
  269. Become A Sponsor!
  270. </Styles.StyledButton>
  271. <Sponsors />
  272. </Styles.StyledSponsorSection>
  273. );
  274. const Footer = () => (
  275. <Styles.StyledFooter>
  276. <Styles.StyledFooterText>
  277. © <img width="100" src="assets/icon.png" alt="icon" loading="lazy" />
  278. {new Date().getFullYear()} - {pkg.version}
  279. </Styles.StyledFooterText>
  280. <Styles.StyledIconLinks>
  281. <Styles.StyledNavLink
  282. href="https://github.com/AykutSarac/jsoncrack.com"
  283. rel="external"
  284. target="_blank"
  285. aria-label="github"
  286. >
  287. <FaGithub size={26} />
  288. </Styles.StyledNavLink>
  289. <Styles.StyledNavLink
  290. href="https://www.linkedin.com/in/aykutsarac/"
  291. rel="me"
  292. target="_blank"
  293. aria-label="linkedin"
  294. >
  295. <FaLinkedin size={26} />
  296. </Styles.StyledNavLink>
  297. <Styles.StyledNavLink
  298. href="https://twitter.com/jsoncrack"
  299. rel="me"
  300. target="_blank"
  301. aria-label="twitter"
  302. >
  303. <FaTwitter size={26} />
  304. </Styles.StyledNavLink>
  305. </Styles.StyledIconLinks>
  306. </Styles.StyledFooter>
  307. );
  308. const Home: React.FC = () => {
  309. return (
  310. <Styles.StyledHome>
  311. <Head>
  312. <title>JSON Crack - Crack your data into pieces</title>
  313. </Head>
  314. <Navbar />
  315. <HeroSection />
  316. <PreviewSection />
  317. <FeaturesSection />
  318. <GitHubSection />
  319. <EmbedSection />
  320. <SupportSection />
  321. <SponsorSection />
  322. <SupportButton />
  323. <Footer />
  324. </Styles.StyledHome>
  325. );
  326. };
  327. export default Home;