feat: data fetching from src
This commit is contained in:
12
src/data/greetings.json
Normal file
12
src/data/greetings.json
Normal file
@@ -0,0 +1,12 @@
|
||||
[
|
||||
"Hello",
|
||||
"Hi there",
|
||||
"Bonjour",
|
||||
"Salut",
|
||||
"Privet",
|
||||
"Nǐ hǎo",
|
||||
"Ciao",
|
||||
"Konnichiwa",
|
||||
"Guten Tag",
|
||||
"Ahlan"
|
||||
]
|
||||
10
src/data/quotes.json
Normal file
10
src/data/quotes.json
Normal file
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"quote": "Dude, sucking at something is the first step to being sorta good at something.",
|
||||
"author": "Jake the Dog"
|
||||
},
|
||||
{
|
||||
"quote": "Sucking at something is the first step to being sort of good at something.",
|
||||
"author": "Jake the Dog"
|
||||
}
|
||||
]
|
||||
@@ -3,27 +3,45 @@ import { Link } from "gatsby"
|
||||
import styled from "@emotion/styled"
|
||||
import { withTheme } from "emotion-theming"
|
||||
|
||||
import { SIZES } from "styles/constants"
|
||||
import { Button, P } from "components/elements"
|
||||
import Logo from "components/Logo"
|
||||
import Footer from "components/Footer"
|
||||
import { todayUrl } from "utils/date"
|
||||
|
||||
const WelcomeGrid = styled.div`
|
||||
margin-top: 30px;
|
||||
text-align: center;
|
||||
margin-top: 60px;
|
||||
line-height: 1.5;
|
||||
color: ${props => props.theme.colors.primary};
|
||||
height: 100%;
|
||||
`
|
||||
|
||||
const Quote = styled.blockquote`
|
||||
margin-top: 30px;
|
||||
font-family: Montserrat;
|
||||
font-size: ${SIZES.medium};
|
||||
color: ${props => props.theme.colors.primary};
|
||||
`
|
||||
const QuoteAuthor = styled(P)`
|
||||
font-style: italic;
|
||||
`
|
||||
|
||||
class Welcome extends Component {
|
||||
render() {
|
||||
const { theme } = this.props
|
||||
return (
|
||||
<WelcomeGrid>
|
||||
<h1>Your Space for Wandering Thoughts and Ideas</h1>
|
||||
<h1>Hello</h1>
|
||||
<Quote>
|
||||
Sucking at something is the first step to being sort of good at
|
||||
something
|
||||
</Quote>
|
||||
<QuoteAuthor style={{ letterSpacing: 1.1, marginBottom: 30 }}>
|
||||
- Jake the Dog
|
||||
</QuoteAuthor>
|
||||
<P style={{ letterSpacing: 1.1, marginBottom: 30 }}>
|
||||
This your space for wandering thoughts and ideas. Write about whatever
|
||||
comes to mind.
|
||||
is on your mind.
|
||||
</P>
|
||||
<Link to={`/app${todayUrl()}`} style={{ textDecoration: "none" }}>
|
||||
<Button colors={theme.colors}>Write about today</Button>
|
||||
|
||||
Reference in New Issue
Block a user