index.tsx 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  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 { baseURL } 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. <Link href="embed" passHref>
  39. <Styles.StyledNavLink>Embed API</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 onClick={() => setModalVisible(true)}>
  60. Help JSON Crack&apos;s Goals
  61. <FaHeart />
  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. <GoalsModal visible={isModalVisible} setVisible={setModalVisible} />
  72. </Styles.StyledButtonWrapper>
  73. </Styles.StyledHeroSection>
  74. );
  75. };
  76. const PreviewSection = () => (
  77. <Styles.StyledPreviewSection>
  78. <Styles.StyledImageWrapper>
  79. <Styles.StyledImage
  80. width="1200"
  81. height="863"
  82. src="/assets/jsoncrack-screenshot.webp"
  83. alt="preview"
  84. />
  85. </Styles.StyledImageWrapper>
  86. </Styles.StyledPreviewSection>
  87. );
  88. const FeaturesSection = () => (
  89. <Styles.StyledFeaturesSection id="features">
  90. <Styles.StyledSectionCard>
  91. <Styles.StyledCardIcon>
  92. <HiCursorClick size={50} color="#3BA55D" />
  93. </Styles.StyledCardIcon>
  94. <Styles.StyledCardTitle>EASY-TO-USE</Styles.StyledCardTitle>
  95. <Styles.StyledCardDescription>
  96. We believe that powerful software doesn&apos;t have to be difficult to use. That&apos;s why
  97. we&apos;ve designed our app to be as intuitive and easy-to-use as possible. You can quickly
  98. and easily load your JSON data and start exploring and analyzing it right away!
  99. </Styles.StyledCardDescription>
  100. </Styles.StyledSectionCard>
  101. <Styles.StyledSectionCard>
  102. <Styles.StyledCardIcon>
  103. <HiOutlineSearchCircle size={50} color="#5865F2" />
  104. </Styles.StyledCardIcon>
  105. <Styles.StyledCardTitle>SEARCH</Styles.StyledCardTitle>
  106. <Styles.StyledCardDescription>
  107. Have a huge file of values, keys or arrays? Worry no more, type in the keyword you are
  108. looking for into search input and it will take you to each node with matching result
  109. highlighting the line to understand better!
  110. </Styles.StyledCardDescription>
  111. </Styles.StyledSectionCard>
  112. <Styles.StyledSectionCard>
  113. <Styles.StyledCardIcon>
  114. <HiOutlineDownload size={50} color="#DA2877" />
  115. </Styles.StyledCardIcon>
  116. <Styles.StyledCardTitle>DOWNLOAD</Styles.StyledCardTitle>
  117. <Styles.StyledCardDescription>
  118. Download the graph to your local machine and use it wherever you want, to your blogs,
  119. website or make it a poster and paste to the wall. Who wouldn&apos;t want to see a JSON
  120. Crack graph onto their wall, eh?
  121. </Styles.StyledCardDescription>
  122. </Styles.StyledSectionCard>
  123. <Styles.StyledSectionCard>
  124. <Styles.StyledCardIcon>
  125. <HiLightningBolt size={50} color="#F5E027" />
  126. </Styles.StyledCardIcon>
  127. <Styles.StyledCardTitle>LIVE</Styles.StyledCardTitle>
  128. <Styles.StyledCardDescription>
  129. With Microsoft&apos;s Monaco Editor which is also used by VS Code, easily edit your JSON and
  130. directly view through the graphs. Also there&apos;s a JSON validator above of it to make
  131. sure there is no type error.
  132. </Styles.StyledCardDescription>
  133. </Styles.StyledSectionCard>
  134. </Styles.StyledFeaturesSection>
  135. );
  136. const GitHubSection = () => (
  137. <Styles.StyledSection id="github" reverse>
  138. <Styles.StyledTwitterQuote>
  139. <blockquote className="twitter-tweet" data-lang="en" data-dnt="true" data-theme="light">
  140. <p lang="en" dir="ltr">
  141. Looking to understand or explore some JSON? Just paste or upload to visualize it as a
  142. graph with <a href="https://t.co/HlKSrhKryJ">https://t.co/HlKSrhKryJ</a> 😍 <br />
  143. <br />
  144. Thanks to <a href="https://twitter.com/aykutsarach?ref_src=twsrc%5Etfw">
  145. @aykutsarach
  146. </a>! <a href="https://t.co/0LyPUL8Ezz">pic.twitter.com/0LyPUL8Ezz</a>
  147. </p>
  148. &mdash; GitHub (@github){" "}
  149. <a href="https://twitter.com/github/status/1519363257794015233?ref_src=twsrc%5Etfw">
  150. April 27, 2022
  151. </a>
  152. </blockquote>{" "}
  153. <Script async src="https://platform.twitter.com/widgets.js" charSet="utf-8"></Script>
  154. </Styles.StyledTwitterQuote>
  155. <Styles.StyledSectionArea>
  156. <Styles.StyledSubTitle>Open Source Community</Styles.StyledSubTitle>
  157. <Styles.StyledMinorTitle>
  158. At JSON Crack, we believe in the power of open source software and the communities that
  159. support it. That&apos;s why we&apos;re proud to be part of the open source community and to
  160. contribute to the development and growth of open source tools and technologies.
  161. <br />
  162. <br /> As part of our commitment to the open source community, we&apos;ve made our app
  163. freely available to anyone who wants to use it, and we welcome contributions from anyone
  164. who&apos;s interested in helping to improve it. Whether you&apos;re a developer, a data
  165. scientist, or just someone who&apos;s passionate about open source, we&apos;d love to have
  166. you join our community and help us make JSON Crack the best it can be.
  167. <br />
  168. <br /> So why not join us and become part of the JSON Crack open source community today? We
  169. can&apos;t wait to see what we can accomplish together!
  170. </Styles.StyledMinorTitle>
  171. <Styles.StyledButton
  172. href="https://github.com/AykutSarac/jsoncrack.com"
  173. status="SECONDARY"
  174. link
  175. >
  176. STAR ON GITHUB
  177. </Styles.StyledButton>
  178. </Styles.StyledSectionArea>
  179. </Styles.StyledSection>
  180. );
  181. const EmbedSection = () => (
  182. <Styles.StyledSection id="embed">
  183. <Styles.StyledSectionArea>
  184. <Styles.StyledSubTitle>Embed Into Your Website</Styles.StyledSubTitle>
  185. <Styles.StyledMinorTitle>
  186. JSON Crack provides users with the necessary code to embed the app into a website easily
  187. using an iframe. This code can be easily copied and pasted into the desired location on the
  188. website, allowing users to quickly and easily integrate JSON Crack into existing workflows.
  189. <br />
  190. <br /> Once the app is embedded, users can use it to view and analyze JSON data directly on
  191. the website. This can be useful for a variety of purposes, such as quickly checking the
  192. structure of a JSON file or verifying the data contained within it. JSON Crack&apos;s
  193. intuitive interface makes it easy to navigate and understand even complex JSON data, making
  194. it a valuable tool for anyone working with JSON.
  195. </Styles.StyledMinorTitle>
  196. <Styles.StyledButton href="https://jsoncrack.com/embed" status="SECONDARY" link>
  197. LEARN TO EMBED
  198. </Styles.StyledButton>
  199. </Styles.StyledSectionArea>
  200. <div>
  201. <Styles.StyledIframge
  202. src={`${baseURL}/widget`}
  203. onLoad={e => {
  204. const frame = e.currentTarget.contentWindow;
  205. setTimeout(() => {
  206. frame?.postMessage(
  207. {
  208. json: JSON.stringify({
  209. "random images": [
  210. "https://random.imagecdn.app/50/50?.png",
  211. "https://random.imagecdn.app/80/80?.png",
  212. "https://random.imagecdn.app/100/100?.png",
  213. ],
  214. }),
  215. options: {
  216. theme: "dark",
  217. },
  218. },
  219. "*"
  220. );
  221. }, 500);
  222. }}
  223. ></Styles.StyledIframge>
  224. </div>
  225. </Styles.StyledSection>
  226. );
  227. const SupportSection = () => (
  228. <Styles.StyledPaidSection>
  229. <Styles.StyledProducthunt>
  230. <Styles.StyledSubTitle>
  231. Support JSON Crack at
  232. <br />
  233. <Styles.StyledHighlightedText>Product Hunt</Styles.StyledHighlightedText>
  234. </Styles.StyledSubTitle>
  235. <Producthunt />
  236. </Styles.StyledProducthunt>
  237. <Styles.StyledAffiliate>
  238. <Styles.StyledSubTitle>Affiliate</Styles.StyledSubTitle>
  239. <CarbonAds />
  240. </Styles.StyledAffiliate>
  241. </Styles.StyledPaidSection>
  242. );
  243. const SponsorSection = () => (
  244. <Styles.StyledSponsorSection id="sponsor">
  245. <Styles.StyledSubTitle>Sponsors</Styles.StyledSubTitle>
  246. <Styles.StyledMinorTitle>
  247. Your supports make JSON Crack possible to continue and accessible for everyone!
  248. </Styles.StyledMinorTitle>
  249. <Styles.StyledButton
  250. href="https://github.com/sponsors/AykutSarac"
  251. rel="external"
  252. status="SUCCESS"
  253. link
  254. >
  255. Become A Sponsor!
  256. </Styles.StyledButton>
  257. <Sponsors />
  258. </Styles.StyledSponsorSection>
  259. );
  260. const Footer = () => (
  261. <Styles.StyledFooter>
  262. <Styles.StyledFooterText>
  263. <img width="120" src="assets/icon.png" alt="icon" loading="lazy" />
  264. <span>
  265. © {new Date().getFullYear()} JSON Crack - {pkg.version}
  266. </span>
  267. </Styles.StyledFooterText>
  268. <Styles.StyledIconLinks>
  269. <Styles.StyledNavLink
  270. href="https://github.com/AykutSarac/jsoncrack.com"
  271. rel="external"
  272. target="_blank"
  273. aria-label="github"
  274. >
  275. <FaGithub size={26} />
  276. </Styles.StyledNavLink>
  277. <Styles.StyledNavLink
  278. href="https://www.linkedin.com/in/aykutsarac/"
  279. rel="me"
  280. target="_blank"
  281. aria-label="linkedin"
  282. >
  283. <FaLinkedin size={26} />
  284. </Styles.StyledNavLink>
  285. <Styles.StyledNavLink
  286. href="https://twitter.com/jsoncrack"
  287. rel="me"
  288. target="_blank"
  289. aria-label="twitter"
  290. >
  291. <FaTwitter size={26} />
  292. </Styles.StyledNavLink>
  293. </Styles.StyledIconLinks>
  294. </Styles.StyledFooter>
  295. );
  296. const Home: React.FC = () => {
  297. return (
  298. <Styles.StyledHome>
  299. <Head>
  300. <title>JSON Crack - Crack your data into pieces</title>
  301. </Head>
  302. <Navbar />
  303. <HeroSection />
  304. <PreviewSection />
  305. <FeaturesSection />
  306. <GitHubSection />
  307. <EmbedSection />
  308. <SupportSection />
  309. <SponsorSection />
  310. <SupportButton />
  311. <Footer />
  312. </Styles.StyledHome>
  313. );
  314. };
  315. export default Home;