Skip to content

Commit

Permalink
final touches.
Browse files Browse the repository at this point in the history
  • Loading branch information
bradgarropy committed May 13, 2020
1 parent 03df268 commit e5b1159
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 27 deletions.
Binary file added content/pages/store/images/jorts.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions content/pages/store/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Nothing Here Yet

We don't have anything for you yet, but we're in the process of creating some great stuff!

Sign up and we'll send you an email once the store is ready to go.
1 change: 1 addition & 0 deletions src/components/About/About.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const Image = styled(Img)`
height: auto;
border-radius: 0.25rem;
grid-area: image;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
`

const Description = styled.div`
Expand Down
1 change: 1 addition & 0 deletions src/hooks/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export {default as useTags} from "./useTags"
export {default as useAbout} from "./useAbout"
export {default as usePosts} from "./usePosts"
export {default as useStore} from "./useStore"
export {default as useEpisode} from "./useEpisode"
export {default as useEpisodes} from "./useEpisodes"
export {default as usePlaylist} from "./usePlaylist"
Expand Down
22 changes: 22 additions & 0 deletions src/hooks/useStore.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import {useStaticQuery, graphql} from "gatsby"

const useStore = () => {
const query = graphql`
{
file(absolutePath: {regex: "/content/pages/store/"}) {
childImageSharp {
fluid(maxWidth: 600) {
...GatsbyImageSharpFluid
}
}
}
}
`

const data = useStaticQuery(query)
const store = data.file.childImageSharp

return store
}

export default useStore
2 changes: 1 addition & 1 deletion src/pages/playlists.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const PlaylistsPage = () => {
const playlists = usePlaylists()

return (
<Container>
<Container centered>
<SEO title="Playlists" />

<StyledPlaylistsPage>
Expand Down
85 changes: 60 additions & 25 deletions src/pages/store.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,43 @@
import Img from "gatsby-image"
import {navigate} from "gatsby"
import React, {useState} from "react"
import styled from "styled-components"
import {useStore} from "../hooks"
import {post} from "../utils/fetch"
import {SEO} from "../components/SEO"
import Container from "../styles/Container"
import {STORE_NOTIFICATIONS} from "../utils/convertkit"
import {navigate} from "gatsby"

const Item = styled.li`
list-style: none;
const Box = styled.div`
display: grid;
grid-template-columns: repeat(2, 1fr);
max-width: 46.875rem;
margin-top: 2rem;
box-sizing: content-box;
line-height: 1.5;
@media (max-width: 40.625rem) {
grid-template-columns: 1fr;
max-width: 30rem;
}
`

const Image = styled(Img)`
border-radius: 0.25rem;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
`

const Right = styled.div`
display: grid;
grid-template-rows: repeat(2, auto);
padding: 2rem;
gap: 1rem;
align-content: center;
`

const Form = styled.form`
display: grid;
gap: 0.5rem;
margin-top: 1rem;
width: 100%;
max-width: 21.875rem;
justify-self: center;
Expand Down Expand Up @@ -48,6 +72,7 @@ const Button = styled.button`
`

const StorePage = () => {
const {fluid} = useStore()
const [email, setEmail] = useState("")
const [loading, setLoading] = useState(false)

Expand Down Expand Up @@ -76,27 +101,37 @@ const StorePage = () => {

<h1>Store</h1>

<p>
We don&apos;t have anything for you yet, but we&apos;re in the
process of creating some great stuff!
</p>

<ul>
<Item>Hats</Item>
<Item>Shirts</Item>
<Item>Koozies</Item>
<Item>Stickers</Item>
</ul>

<p>
Sign up and we&apos;ll send you an email once the store is ready
to go.
</p>

<Form onSubmit={onSubmit}>
<Input type="email" value={email} onChange={onChange} />
<Button disabled={loading}>NOTIFY ME</Button>
</Form>
<Box>
<Image fluid={fluid} />

<Right>
<div>
<h2>Nothing Here Yet</h2>

<p>
We don&apos;t have anything for you yet, but
we&apos;re in the process of creating some great
stuff!
</p>

<p>
Sign up and we&apos;ll send you an email once the
store is ready to go.
</p>
</div>

<Form onSubmit={onSubmit}>
<Input
type="email"
value={email}
onChange={onChange}
required
/>

<Button disabled={loading}>NOTIFY ME</Button>
</Form>
</Right>
</Box>
</Container>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/thanks.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const ThanksPage = () => {

<div>
<p>
Please check your email inbox and confirm it&apos;s really
Please check your email inbox to confirm it&apos;s really
you.
</p>

Expand Down

0 comments on commit e5b1159

Please sign in to comment.