-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(web): landing page style * chore(release): bump versions - [email protected]
- Loading branch information
Showing
9 changed files
with
213 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,17 @@ | |
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [0.5.5](https://github.com/lharti/jsonthing/compare/[email protected]@0.5.5) (2024-11-14) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **web:** landing page style ([eaf8bca](https://github.com/lharti/jsonthing/commit/eaf8bca1705f5451c3647fd728f5890e7013475a)) | ||
|
||
|
||
|
||
|
||
|
||
## [0.5.4](https://github.com/lharti/jsonthing/compare/[email protected]@0.5.4) (2024-11-13) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 20 additions & 3 deletions
23
apps/jsonthing-web/src/components/pages/LandingPage/LandingPage.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,32 @@ | ||
import { LandingPageHero } from '@/components/pages/LandingPage/LandingPageHero' | ||
import { render } from '@testing-library/react' | ||
import React from 'react' | ||
import { LandingPage } from './LandingPage' | ||
import { LandingPage } from '.' | ||
|
||
jest.mock('@/components/CreateNewDocButton') | ||
jest.mock('./LandingPageHero') | ||
|
||
describe('<LandingPage />', () => { | ||
it('should render', () => { | ||
expect.assertions(1) | ||
|
||
jest.mocked(LandingPageHero).mockReturnValueOnce('{LANDING_PAGE_HERO}') | ||
|
||
const { container } = render(<LandingPage />) | ||
|
||
expect(container).toMatchSnapshot('<LandingPage />') | ||
expect(container).toMatchInlineSnapshot(` | ||
<div> | ||
<div | ||
class=" | ||
mx-auto max-w-screen-xl px-6 pt-32 | ||
2xl:px-0 | ||
" | ||
> | ||
<main> | ||
{LANDING_PAGE_HERO} | ||
</main> | ||
</div> | ||
</div> | ||
`) | ||
}) | ||
}) |
67 changes: 10 additions & 57 deletions
67
apps/jsonthing-web/src/components/pages/LandingPage/LandingPage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
apps/jsonthing-web/src/components/pages/LandingPage/LandingPageHero/LandingPageHero.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { CreateNewDocButton } from '@/components/CreateNewDocButton' | ||
import { render } from '@testing-library/react' | ||
import React from 'react' | ||
import { LandingPageHero } from '.' | ||
|
||
jest.mock('@/components/CreateNewDocButton') | ||
|
||
describe('<LandingPageHero />', () => { | ||
it('should render', () => { | ||
expect.assertions(1) | ||
|
||
jest.mocked(CreateNewDocButton).mockReturnValueOnce( | ||
<button>{'Create new JSON doc'}</button>, | ||
) | ||
|
||
const { container } = render(<LandingPageHero />) | ||
|
||
expect(container).toMatchSnapshot('<LandingPageHero />') | ||
}) | ||
}) |
96 changes: 96 additions & 0 deletions
96
apps/jsonthing-web/src/components/pages/LandingPage/LandingPageHero/LandingPageHero.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
import { CreateNewDocButton } from '@/components/CreateNewDocButton' | ||
import { cn } from '@/lib/utils' | ||
import Image from 'next/image' | ||
import Link from 'next/link' | ||
import React from 'react' | ||
|
||
interface PropsWithClassName { | ||
className?: string | ||
} | ||
|
||
const LandingPageLogo: React.FC<PropsWithClassName> = ({ className }) => ( | ||
<Link | ||
href="/" | ||
aria-label="jsonthing logo" | ||
className={cn( | ||
` | ||
inline-block rounded-md bg-gradient-to-r from-green-400 | ||
to-blue-500 px-3 py-1 text-2xl font-semibold text-white shadow-lg | ||
`, | ||
|
||
className, | ||
)} | ||
> | ||
{'jsonthing'} | ||
</Link> | ||
) | ||
|
||
export { LandingPageLogo } | ||
|
||
const LandingPageHeroDetails: React.FC<PropsWithClassName> = ({ | ||
className, | ||
}) => { | ||
return ( | ||
<div className={cn(`space-y-6`, className)}> | ||
<LandingPageLogo /> | ||
|
||
<h1 | ||
aria-label="" | ||
className={` | ||
text-4xl font-bold | ||
md:text-5xl | ||
`} | ||
> | ||
{'JSON storage that speaks API.'} | ||
</h1> | ||
|
||
<p className="text-xl text-gray-600"> | ||
{`Edit, and access your JSON documents with automatically generated API endpoints.`} | ||
</p> | ||
|
||
<CreateNewDocButton className="px-8 py-6 text-base"> | ||
{'Create new JSON doc'} | ||
</CreateNewDocButton> | ||
</div> | ||
) | ||
} | ||
|
||
export const LandingPageHero: React.FC<PropsWithClassName> = ({ | ||
className, | ||
}) => { | ||
return ( | ||
<section | ||
className={cn( | ||
` | ||
flex flex-col items-center gap-8 | ||
lg:flex-row lg:items-start lg:justify-between | ||
`, | ||
|
||
className, | ||
)} | ||
> | ||
<LandingPageHeroDetails | ||
className={` | ||
max-w-96 text-center | ||
lg:text-start | ||
`} | ||
/> | ||
|
||
<Image | ||
unoptimized | ||
src="https://storage.googleapis.com/jsonthing-assets/hero.png" | ||
alt="jsonthing hero" | ||
width={700} | ||
height={600} | ||
className={` | ||
mt-0 | ||
lg:mt-12 | ||
`} | ||
/> | ||
</section> | ||
) | ||
} |
54 changes: 54 additions & 0 deletions
54
.../components/pages/LandingPage/LandingPageHero/__snapshots__/LandingPageHero.spec.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<LandingPageHero /> should render: <LandingPageHero /> 1`] = ` | ||
<div> | ||
<section | ||
class="flex flex-col items-center gap-8 lg:flex-row lg:items-start lg:justify-between" | ||
> | ||
<div | ||
class="space-y-6 max-w-96 text-center lg:text-start" | ||
> | ||
<a | ||
aria-label="jsonthing logo" | ||
class="inline-block rounded-md bg-gradient-to-r from-green-400 to-blue-500 px-3 py-1 text-2xl font-semibold text-white shadow-lg" | ||
href="/" | ||
> | ||
jsonthing | ||
</a> | ||
<h1 | ||
aria-label="" | ||
class=" | ||
text-4xl font-bold | ||
md:text-5xl | ||
" | ||
> | ||
JSON storage that speaks API. | ||
</h1> | ||
<p | ||
class="text-xl text-gray-600" | ||
> | ||
Edit, and access your JSON documents with automatically generated API endpoints. | ||
</p> | ||
<button> | ||
Create new JSON doc | ||
</button> | ||
</div> | ||
<img | ||
alt="jsonthing hero" | ||
class=" | ||
mt-0 | ||
lg:mt-12 | ||
" | ||
data-nimg="1" | ||
decoding="async" | ||
height="600" | ||
loading="lazy" | ||
src="https://storage.googleapis.com/jsonthing-assets/hero.png" | ||
style="color: transparent;" | ||
width="700" | ||
/> | ||
</section> | ||
</div> | ||
`; |
1 change: 1 addition & 0 deletions
1
apps/jsonthing-web/src/components/pages/LandingPage/LandingPageHero/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { LandingPageHero } from './LandingPageHero' |
63 changes: 0 additions & 63 deletions
63
apps/jsonthing-web/src/components/pages/LandingPage/__snapshots__/LandingPage.spec.tsx.snap
This file was deleted.
Oops, something went wrong.