diff --git a/package.json b/package.json index 6b54d85bf39..706ed79de28 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "react-hot-toast": "^2.2.0", "react-icons": "^4.3.1", "react-render-if-visible": "^2.1.0", + "react-twitter-embed": "^4.0.4", "react-zoom-pan-pinch": "^2.1.3", "reaflow": "^5.0.4", "save-html-as-image": "^1.7.1", diff --git a/public/jsonvisio-screenshot.png b/public/jsonvisio-screenshot.png new file mode 100644 index 00000000000..1670c9f985e Binary files /dev/null and b/public/jsonvisio-screenshot.png differ diff --git a/src/components/Button/index.tsx b/src/components/Button/index.tsx index 8a79472892f..bcd04715c69 100644 --- a/src/components/Button/index.tsx +++ b/src/components/Button/index.tsx @@ -24,6 +24,7 @@ const StyledButton = styled.button<{ status: keyof typeof ButtonType }>` color: #ffffff; padding: 8px 16px; min-width: 60px; + width: fit-content; :disabled { cursor: not-allowed; diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx deleted file mode 100644 index c182da8b973..00000000000 --- a/src/components/Footer/index.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import React from "react"; -import Link from "next/link"; -import styled from "styled-components"; -import { AiFillGithub, AiOutlineTwitter } from "react-icons/ai"; - -import pkg from "../../../package.json"; - -const StyledFooter = styled.footer` - display: flex; - justify-content: center; - align-items: center; - flex-direction: column; - width: 100%; - color: ${({ theme }) => theme.SILVER}; -`; - -const StyledVersion = styled.pre` - margin-top: 0; -`; - -const StyledSocial = styled.div` - display: flex; - gap: 14px; - font-size: 26px; -`; - -export const Footer: React.FC = () => { - return ( - - - - - - - - - - - - - - {pkg.version} - - ); -}; diff --git a/src/components/Producthunt/index.tsx b/src/components/Producthunt/index.tsx index 8463d8c6e6e..6b9239b1894 100644 --- a/src/components/Producthunt/index.tsx +++ b/src/components/Producthunt/index.tsx @@ -1,19 +1,9 @@ import React from "react"; import styled from "styled-components"; -const StyledProducthunt = styled.a` - position: fixed; - bottom: 12px; - right: 12px; - - @media only screen and (max-width: 768px) { - display: none; - } -`; - const StyledImage = styled.img` - width: 250px; - height: 54px; + object-fit: contain; + max-width: 300px; @media only screen and (max-width: 768px) { width: 200px; @@ -23,15 +13,17 @@ const StyledImage = styled.img` export const Producthunt = () => { return ( - - + ); }; diff --git a/src/constants/globalStyle.ts b/src/constants/globalStyle.ts index 3e38c296a1c..8dc65a6e2b4 100644 --- a/src/constants/globalStyle.ts +++ b/src/constants/globalStyle.ts @@ -6,10 +6,15 @@ const GlobalStyle = createGlobalStyle` padding: 0; box-sizing: border-box; color: ${({ theme }) => theme.FULL_WHITE}; - background: ${({ theme }) => theme.BLACK_PRIMARY}; font-family: 'Catamaran', sans-serif; font-weight: 400; font-size: 16px; + scroll-behavior: smooth; + + background-color: #000000; + opacity: 1; + background-image: radial-gradient(#414141 0.5px, #000000 0.5px); + background-size: 10px 10px; } a { diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index 2f41940220d..38acd721c6c 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -52,7 +52,7 @@ class MyDocument extends Document { crossOrigin="anonymous" /> diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 091cf6109b6..0216aeb2534 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,138 +1,506 @@ -import React from "react"; -import { Button } from "src/components/Button"; -import { Container } from "src/components/Container"; -import { Navbar } from "src/components/Navbar"; -import { Image } from "src/components/Image"; -import { AiFillGithub } from "react-icons/ai"; -import { Footer } from "src/components/Footer"; -import Head from "next/head"; -import { Producthunt } from "src/components/Producthunt"; -import { useRouter } from "next/router"; -import styled from "styled-components"; - -const StyledHome = styled.div` - padding: 24px; - - ::-webkit-scrollbar { - width: 8px; - background: #23272a !important; - } - - ::-webkit-scrollbar-thumb { - border-radius: 5px; - background-color: #4d4d4d !important; - } -`; - -const StyledContent = styled.div` - font-size: 20px; - font-weight: 500; - color: ${({ theme }) => theme.SILVER}; - width: 50%; - - @media only screen and (max-width: 768px) { - width: 100%; - text-align: center; - - button { - margin-left: auto; - margin-right: auto; - } - } -`; - -const StyledHeader = styled.h2` - font-size: 3rem; - color: ${({ theme }) => theme.FULL_WHITE}; - - @media only screen and (max-width: 768px) { - font-size: 2.2rem; - } -`; - -const StyledSubContent = styled.div` - margin-bottom: 20px; -`; - -const StyledText = styled.span<{ white?: boolean }>` - color: ${({ theme, white }) => (white ? theme.FULL_WHITE : theme.ORANGE)}; -`; - -const Home: React.FC = () => { - const { push } = useRouter(); - - return ( - - - JSON Visio - Directly onto graphs - - - - - - Visualize your JSON into interactive graphs. - - - Simple visualization tool for your JSON data. No forced structure, - paste your JSON and view it instantly. - - - - graphs - - - - - No Rules - - Be free, you don't have to restructure your json to transform - it onto graphs. We've done it at our side, so you can just - paste your JSON. - - - - preview - - - - - Import File - - Have an existing file for your data? No worries, directly import it - into our editor without having to scroll through all of it! - - - - preview - - - - - Supported by Open Source - - We do our work at open source. Help us improve by contributing to - JSON - Visio at GitHub! - - - - preview - - -