linting & lighthouse score improvements

This commit is contained in:
AykutSarac 2022-04-15 15:35:34 +03:00
parent c298b408d6
commit 06c42dfaea
15 changed files with 25 additions and 177 deletions

View File

@ -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

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

BIN
public/preview.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

BIN
public/preview_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

View File

@ -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;

View File

@ -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"};

View File

@ -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>

View File

@ -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`

View File

@ -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>

View File

@ -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>

View File

@ -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" />

View File

@ -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 />

View File

@ -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>