feat: update styling

This commit is contained in:
AykutSarac 2024-05-17 17:34:28 +03:00
parent d1fe5c4c9d
commit 29e4b45198
No known key found for this signature in database
7 changed files with 64 additions and 45 deletions

View File

@ -14,7 +14,8 @@ import {
List, List,
Anchor, Anchor,
} from "@mantine/core"; } from "@mantine/core";
import { IoIosCheckmarkCircle, IoMdArrowForward } from "react-icons/io"; import { IoMdArrowForward } from "react-icons/io";
import { MdCheck } from "react-icons/md";
import { gaEvent } from "src/lib/utils/gaEvent"; import { gaEvent } from "src/lib/utils/gaEvent";
import { PRICING } from "src/pages/pricing"; import { PRICING } from "src/pages/pricing";
import useUser from "src/store/useUser"; import useUser from "src/store/useUser";
@ -71,7 +72,14 @@ export const UpgradeModal = ({ opened, onClose }: ModalProps) => {
improve your workflow. improve your workflow.
</Text> </Text>
<Radio.Group value={plan} onChange={setPlan} mt="md" label="Select your plan" size="md"> <Radio.Group
color="indigo"
value={plan}
onChange={setPlan}
mt="md"
label="Select your plan"
size="md"
>
<Flex gap="xs" mt="sm" align="center" justify="space-between"> <Flex gap="xs" mt="sm" align="center" justify="space-between">
<Paper <Paper
flex="1" flex="1"
@ -100,7 +108,7 @@ export const UpgradeModal = ({ opened, onClose }: ModalProps) => {
> >
<Flex justify="space-between"> <Flex justify="space-between">
<Radio value="annual" label="Annual" size="xs" /> <Radio value="annual" label="Annual" size="xs" />
<Badge variant="light" color="blue" size="xs" radius="sm"> <Badge variant="light" color="indigo" size="xs" radius="sm">
Save 16% Save 16%
</Badge> </Badge>
</Flex> </Flex>
@ -114,9 +122,7 @@ export const UpgradeModal = ({ opened, onClose }: ModalProps) => {
<List <List
fz="sm" fz="sm"
lts={0.2} lts={0.2}
icon={ icon={<MdCheck color="#5199FF" size={20} style={{ verticalAlign: "middle" }} />}
<IoIosCheckmarkCircle color="#008736" size={20} style={{ verticalAlign: "middle" }} />
}
> >
<List.Item>Compact Graph Visualization (50% less nodes)</List.Item> <List.Item>Compact Graph Visualization (50% less nodes)</List.Item>
<List.Item>Improved Performance 4X Faster</List.Item> <List.Item>Improved Performance 4X Faster</List.Item>
@ -142,8 +148,8 @@ export const UpgradeModal = ({ opened, onClose }: ModalProps) => {
/mo (billed {plan === "monthly" ? "monthly" : "annually"}) /mo (billed {plan === "monthly" ? "monthly" : "annually"})
</Text> </Text>
</Flex> </Flex>
<Button onClick={handleSelect} color="blue" rightSection={<IoMdArrowForward />}> <Button onClick={handleSelect} color="indigo" rightSection={<IoMdArrowForward />}>
Upgrade to Pro Upgrade
</Button> </Button>
</Flex> </Flex>
</Modal> </Modal>

View File

@ -1,6 +1,5 @@
import React from "react"; import React from "react";
import { Button, Flex, Group, Indicator, Select, Text } from "@mantine/core"; import { Button, Flex, Group, Select } from "@mantine/core";
import { useSessionStorage } from "@mantine/hooks";
import toast from "react-hot-toast"; import toast from "react-hot-toast";
import { AiOutlineFullscreen } from "react-icons/ai"; import { AiOutlineFullscreen } from "react-icons/ai";
import { AiFillGift } from "react-icons/ai"; import { AiFillGift } from "react-icons/ai";
@ -38,10 +37,6 @@ export const Toolbar = ({ isWidget = false }: ToolbarProps) => {
const setVisible = useModal(state => state.setVisible); const setVisible = useModal(state => state.setVisible);
const setFormat = useFile(state => state.setFormat); const setFormat = useFile(state => state.setFormat);
const format = useFile(state => state.format); const format = useFile(state => state.format);
const [seenPremium, setSeenPremium] = useSessionStorage({
key: "seenPremium",
defaultValue: false,
});
return ( return (
<Styles.StyledTools> <Styles.StyledTools>
@ -86,7 +81,6 @@ export const Toolbar = ({ isWidget = false }: ToolbarProps) => {
variant="gradient" variant="gradient"
leftSection={<AiFillGift />} leftSection={<AiFillGift />}
onClick={() => { onClick={() => {
setSeenPremium(true);
setVisible("upgrade")(true); setVisible("upgrade")(true);
gaEvent("Toolbar", "click upgrade premium"); gaEvent("Toolbar", "click upgrade premium");
}} }}

View File

@ -20,14 +20,14 @@ export const Footer = () => {
return ( return (
<Container mt={150}> <Container mt={150}>
<Stack align="center"> <Stack align="center">
<Title c="black" order={3}> <Title fz={26} c="gray.7" lts={-1} order={3} ta="center">
Get Started with JSON Crack Designed for everyone
<br />
Save time understanding your data.
</Title> </Title>
<Text fz="lg" c="dimmed" ta="center">
Designed for everyone, save time understanding your data.
</Text>
<Button <Button
color="dark" variant="gradient"
component={Link} component={Link}
prefetch={false} prefetch={false}
href="/pricing" href="/pricing"
@ -37,7 +37,7 @@ export const Footer = () => {
Get Started Get Started
</Button> </Button>
</Stack> </Stack>
<Divider my={60} /> <Divider my={60} color="gray.3" />
<Flex justify="space-between"> <Flex justify="space-between">
<Stack gap={4} visibleFrom="sm"> <Stack gap={4} visibleFrom="sm">
<JSONCrackLogo /> <JSONCrackLogo />

View File

@ -39,7 +39,7 @@ const Docs = () => {
<Layout> <Layout>
<Head> <Head>
<title>Embed - JSON Crack</title> <title>Embed - JSON Crack</title>
<meta name="description" content="Embedding JSON Crack tutorial into your websites." /> <meta name="description" content="Integrate JSON Crack widgets into your website." />
</Head> </Head>
<Stack mx="auto" maw="90%"> <Stack mx="auto" maw="90%">
<Group mb="lg" mt={40}> <Group mb="lg" mt={40}>

View File

@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import { useMantineColorScheme } from "@mantine/core"; import { useMantineColorScheme } from "@mantine/core";
import styled, { ThemeProvider } from "styled-components"; import styled, { ThemeProvider } from "styled-components";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { metaDescription } from "src/constants/landing";
import { darkTheme, lightTheme } from "src/constants/theme"; import { darkTheme, lightTheme } from "src/constants/theme";
import { Editor } from "src/containers/Editor"; import { Editor } from "src/containers/Editor";
import { BottomBar } from "src/containers/Editor/BottomBar"; import { BottomBar } from "src/containers/Editor/BottomBar";
@ -57,6 +58,9 @@ const EditorPage = () => {
<> <>
<Head> <Head>
<title>Editor | JSON Crack</title> <title>Editor | JSON Crack</title>
<meta name="description" content={metaDescription} key="description" />
<meta property="og:description" content={metaDescription} key="ogdescription" />
<meta name="twitter:description" content={metaDescription} key="twdescription" />{" "}
<link rel="canonical" href="https://jsoncrack.com/editor" /> <link rel="canonical" href="https://jsoncrack.com/editor" />
</Head> </Head>
<ThemeProvider theme={darkmodeEnabled ? darkTheme : lightTheme}> <ThemeProvider theme={darkmodeEnabled ? darkTheme : lightTheme}>

View File

@ -388,12 +388,12 @@ export const HomePage = () => {
pos="relative" pos="relative"
ref={card1 as React.RefObject<HTMLDivElement>} ref={card1 as React.RefObject<HTMLDivElement>}
p={30} p={30}
withBorder
shadow="xs" shadow="xs"
radius="md" radius="md"
w="100%" w="100%"
h={{ sm: 300, md: 370 }} h={{ sm: 300, md: 370 }}
style={{ style={{
border: "1px solid #ffc1c1",
overflow: "hidden", overflow: "hidden",
background: bg1, background: bg1,
}} }}
@ -433,12 +433,12 @@ export const HomePage = () => {
<Paper <Paper
ref={card2 as React.RefObject<HTMLDivElement>} ref={card2 as React.RefObject<HTMLDivElement>}
p={30} p={30}
withBorder
shadow="xs" shadow="xs"
radius="md" radius="md"
w="100%" w="100%"
h={{ sm: 300, md: 370 }} h={{ sm: 300, md: 370 }}
style={{ style={{
border: "1px solid #bfffb5",
overflow: "hidden", overflow: "hidden",
background: bg2, background: bg2,
}} }}
@ -478,12 +478,12 @@ export const HomePage = () => {
<Paper <Paper
ref={card3 as React.RefObject<HTMLDivElement>} ref={card3 as React.RefObject<HTMLDivElement>}
p={30} p={30}
withBorder
shadow="xs" shadow="xs"
radius="md" radius="md"
w="100%" w="100%"
h={{ sm: 300, md: 370 }} h={{ sm: 300, md: 370 }}
style={{ style={{
border: "1px solid #dbb5ff",
overflow: "hidden", overflow: "hidden",
background: bg3, background: bg3,
}} }}
@ -524,12 +524,12 @@ export const HomePage = () => {
<Paper <Paper
ref={card4 as React.RefObject<HTMLDivElement>} ref={card4 as React.RefObject<HTMLDivElement>}
p={30} p={30}
withBorder
shadow="xs" shadow="xs"
radius="md" radius="md"
w="100%" w="100%"
h={{ sm: 300, md: 370 }} h={{ sm: 300, md: 370 }}
style={{ style={{
border: "1px solid #b5f0ff",
overflow: "hidden", overflow: "hidden",
background: bg4, background: bg4,
}} }}

View File

@ -15,6 +15,7 @@ import {
} from "@mantine/core"; } from "@mantine/core";
import styled from "styled-components"; import styled from "styled-components";
import { AiOutlineInfoCircle } from "react-icons/ai"; import { AiOutlineInfoCircle } from "react-icons/ai";
import { MdCheck } from "react-icons/md";
import { VscArrowRight } from "react-icons/vsc"; import { VscArrowRight } from "react-icons/vsc";
import Layout from "src/layout/Layout"; import Layout from "src/layout/Layout";
import { gaEvent } from "src/lib/utils/gaEvent"; import { gaEvent } from "src/lib/utils/gaEvent";
@ -110,13 +111,25 @@ export const PricingCards = () => {
Designed for individuals who works with data regularly. Designed for individuals who works with data regularly.
</Text> </Text>
<Flex direction="column" justify="space-between"> <Flex direction="column" justify="space-between">
<List spacing="xs" size="sm" mt="xs" c="black" center icon="✦"> <List
spacing="md"
size="sm"
mt="xs"
c="black"
center
icon={<MdCheck color="blue" size="18" />}
>
<List.Item> <List.Item>
<Text c="gray.7" fw={500} fz="sm"> <Text c="gray.7" fw={500} fz="sm">
Large data support Large data support
</Text> </Text>
<Text c="dimmed" fz="xs"> <Text c="dimmed" fz="xs">
(Up to ~4 MB) (~4 MB)
</Text>
</List.Item>
<List.Item>
<Text c="gray.7" fw={500} fz="sm">
Store 200 documents
</Text> </Text>
</List.Item> </List.Item>
<List.Item> <List.Item>
@ -124,6 +137,16 @@ export const PricingCards = () => {
Compact graph visualizations & fast rendering Compact graph visualizations & fast rendering
</Text> </Text>
</List.Item> </List.Item>
<List.Item>
<Text c="gray.7" fw={500} fz="sm">
Edit directly on visualizations reflecting on data
</Text>
</List.Item>
<List.Item>
<Text c="gray.7" fw={500} fz="sm">
Built-in tabs for multiple documents
</Text>
</List.Item>
<List.Item> <List.Item>
<Text c="gray.7" fw={500} fz="sm"> <Text c="gray.7" fw={500} fz="sm">
Compare data differences Compare data differences
@ -134,21 +157,6 @@ export const PricingCards = () => {
AI powered data filter AI powered data filter
</Text> </Text>
</List.Item> </List.Item>
<List.Item>
<Text c="gray.7" fw={500} fz="sm">
Edit data directly on visualizations
</Text>
</List.Item>
<List.Item>
<Text c="gray.7" fw={500} fz="sm">
Built-in tabs for multiple documents
</Text>
</List.Item>
<List.Item>
<Text c="gray.7" fw={500} fz="sm">
Store 200 documents
</Text>
</List.Item>
</List> </List>
</Flex> </Flex>
</StyledPaper> </StyledPaper>
@ -183,7 +191,14 @@ export const PricingCards = () => {
Get Started Get Started
</Button> </Button>
<Flex direction="column" justify="space-between"> <Flex direction="column" justify="space-between">
<List spacing="xs" size="sm" mt="lg" c="black" center icon="✦"> <List
spacing="md"
size="sm"
mt="lg"
c="black"
center
icon={<MdCheck size="18" color="blue" />}
>
<List.Item> <List.Item>
<Text c="gray.7" fw={500} fz="sm"> <Text c="gray.7" fw={500} fz="sm">
Basic data support Basic data support