mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-12 19:02:53 +08:00
linting & lighthouse score improvements
This commit is contained in:
parent
c298b408d6
commit
06c42dfaea
@ -30,8 +30,8 @@ JSON Visio is data visualization tool for your json data which seamlessly illust
|
|||||||
## 🧩 Preview
|
## 🧩 Preview
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img width="800" src="https://github.com/AykutSarac/jsonvisio.com/blob/main/preview/preview_1.png" alt="preview 1" />
|
<img width="800" src="https://github.com/AykutSarac/jsonvisio.com/blob/main/public/preview.png" alt="preview 1" />
|
||||||
<img width="800" src="https://github.com/AykutSarac/jsonvisio.com/blob/main/preview/preview_2.png" alt="preview 1" />
|
<img width="800" src="https://github.com/AykutSarac/jsonvisio.com/blob/main/public/preview_2.png" alt="preview 1" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
1
public/421.svg
Normal file
1
public/421.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 5.4 KiB |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 1023 KiB |
BIN
public/image.png
BIN
public/image.png
Binary file not shown.
Before Width: | Height: | Size: 56 KiB |
BIN
public/preview.png
Normal file
BIN
public/preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 250 KiB |
BIN
public/preview_2.png
Normal file
BIN
public/preview_2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 382 KiB |
@ -21,7 +21,7 @@ function getButtonStatus(status: keyof typeof ButtonType, theme: DefaultTheme) {
|
|||||||
const StyledButton = styled.button<{ status: keyof typeof ButtonType }>`
|
const StyledButton = styled.button<{ status: keyof typeof ButtonType }>`
|
||||||
display: block;
|
display: block;
|
||||||
background: ${({ status, theme }) => getButtonStatus(status, theme)};
|
background: ${({ status, theme }) => getButtonStatus(status, theme)};
|
||||||
color: ${({ theme }) => theme.FULL_WHITE};
|
color: #ffffff;
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
min-width: 60px;
|
min-width: 60px;
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ const StyledContainer = styled.div<{ reverse: boolean }>`
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: 50px;
|
gap: 50px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 75%;
|
width: 80%;
|
||||||
margin: 0 auto 160px;
|
margin: 0 auto 160px;
|
||||||
min-height: calc(100vh - 250px);
|
min-height: calc(100vh - 250px);
|
||||||
flex-direction: ${({ reverse }) => reverse && "row-reverse"};
|
flex-direction: ${({ reverse }) => reverse && "row-reverse"};
|
||||||
|
@ -68,7 +68,7 @@ export const Input = () => {
|
|||||||
onChange={(e) => setValue(e.target.value)}
|
onChange={(e) => setValue(e.target.value)}
|
||||||
placeholder="Search Node"
|
placeholder="Search Node"
|
||||||
/>
|
/>
|
||||||
<StyledSearchButton onClick={handleClick}>
|
<StyledSearchButton aria-label="search" onClick={handleClick}>
|
||||||
{value ? <IoCloseSharp size={18} /> : <AiOutlineSearch size={18} />}
|
{value ? <IoCloseSharp size={18} /> : <AiOutlineSearch size={18} />}
|
||||||
</StyledSearchButton>
|
</StyledSearchButton>
|
||||||
</StyledInputWrapper>
|
</StyledInputWrapper>
|
||||||
|
@ -5,7 +5,7 @@ import styled from "styled-components";
|
|||||||
const StyledNavbar = styled.div`
|
const StyledNavbar = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 75%;
|
width: 80%;
|
||||||
margin: 0 auto 80px;
|
margin: 0 auto 80px;
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
@ -23,7 +23,7 @@ const StyledLogo = styled.div`
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #ffffff;
|
color: ${({ theme }) => theme.FULL_WHITE};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledNav = styled.nav`
|
const StyledNav = styled.nav`
|
||||||
|
@ -210,14 +210,14 @@ export const Sidebar: React.FC = () => {
|
|||||||
<StyledBottomWrapper>
|
<StyledBottomWrapper>
|
||||||
<StyledElement>
|
<StyledElement>
|
||||||
<Link href="https://twitter.com/aykutsarach">
|
<Link href="https://twitter.com/aykutsarach">
|
||||||
<a rel="me" target="_blank">
|
<a aria-label="Twitter" rel="me" target="_blank">
|
||||||
<AiOutlineTwitter />
|
<AiOutlineTwitter />
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
</StyledElement>
|
</StyledElement>
|
||||||
<StyledElement>
|
<StyledElement>
|
||||||
<Link href="https://github.com/AykutSarac/jsonvisio.com">
|
<Link href="https://github.com/AykutSarac/jsonvisio.com">
|
||||||
<a rel="me" target="_blank">
|
<a aria-label="GitHub" rel="me" target="_blank">
|
||||||
<AiFillGithub />
|
<AiFillGithub />
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -55,20 +55,20 @@ export const Tools: React.FC = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledTools>
|
<StyledTools>
|
||||||
<StyledToolElement onClick={toggleEditor}>
|
<StyledToolElement aria-label="fullscreen" onClick={toggleEditor}>
|
||||||
<AiOutlineFullscreen />
|
<AiOutlineFullscreen />
|
||||||
</StyledToolElement>
|
</StyledToolElement>
|
||||||
<Input />
|
<Input />
|
||||||
<StyledToolElement onClick={handleSave}>
|
<StyledToolElement aria-label="save" onClick={handleSave}>
|
||||||
<AiOutlineSave />
|
<AiOutlineSave />
|
||||||
</StyledToolElement>
|
</StyledToolElement>
|
||||||
<StyledToolElement>
|
<StyledToolElement aria-label="center canvas" onClick={centerView}>
|
||||||
<MdCenterFocusWeak onClick={centerView} />
|
<MdCenterFocusWeak />
|
||||||
</StyledToolElement>
|
</StyledToolElement>
|
||||||
<StyledToolElement onClick={zoomOut}>
|
<StyledToolElement aria-label="zoom out" onClick={zoomOut}>
|
||||||
<AiOutlineMinus />
|
<AiOutlineMinus />
|
||||||
</StyledToolElement>
|
</StyledToolElement>
|
||||||
<StyledToolElement onClick={zoomIn}>
|
<StyledToolElement aria-label="zoom in" onClick={zoomIn}>
|
||||||
<AiOutlinePlus />
|
<AiOutlinePlus />
|
||||||
</StyledToolElement>
|
</StyledToolElement>
|
||||||
</StyledTools>
|
</StyledTools>
|
||||||
|
@ -60,8 +60,8 @@ class MyDocument extends Document {
|
|||||||
)}
|
)}
|
||||||
<SeoTags
|
<SeoTags
|
||||||
description="Simple visualization tool for your JSON data. No forced structure, paste your JSON and view it instantly."
|
description="Simple visualization tool for your JSON data. No forced structure, paste your JSON and view it instantly."
|
||||||
title="JSON Visio"
|
title="JSON Visio - Directly into graphs"
|
||||||
image="https://jsonvisio.com/image.png"
|
image="https://jsonvisio.com/preview.png"
|
||||||
/>
|
/>
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
|
@ -8,6 +8,10 @@ const EditorPage: React.FC = () => {
|
|||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>Editor | JSON Visio</title>
|
<title>Editor | JSON Visio</title>
|
||||||
|
<meta
|
||||||
|
name="description"
|
||||||
|
content="View your JSON data in graphs instantly."
|
||||||
|
/>
|
||||||
</Head>
|
</Head>
|
||||||
<WithConfig>
|
<WithConfig>
|
||||||
<Editor />
|
<Editor />
|
||||||
|
@ -32,11 +32,11 @@ const StyledContent = styled.div`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledHeader = styled.h2`
|
const StyledHeader = styled.h2`
|
||||||
font-size: 54px;
|
font-size: 3rem;
|
||||||
color: ${({ theme }) => theme.FULL_WHITE};
|
color: ${({ theme }) => theme.FULL_WHITE};
|
||||||
|
|
||||||
@media only screen and (max-width: 768px) {
|
@media only screen and (max-width: 768px) {
|
||||||
font-size: 36px;
|
font-size: 2.2rem;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ const Home: React.FC = () => {
|
|||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
</StyledContent>
|
</StyledContent>
|
||||||
<Image src="graphs.svg" width={500} height={400} alt="graphs" />
|
<Image src="421.svg" width={500} height={400} alt="graphs" />
|
||||||
</Container>
|
</Container>
|
||||||
|
|
||||||
<Container reverse>
|
<Container reverse>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user