index.tsx 12 KB

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