Skip to content

Instantly share code, notes, and snippets.

View konstantinmuenster's full-sized avatar
🙌

Konstantin Münster konstantinmuenster

🙌
View GitHub Profile
@konstantinmuenster
konstantinmuenster / index.js
Created May 24, 2020 17:51
index.js (3) - How To Gatsby Portfolio
import React from "react"
import Layout from "../components/layout"
import Hero from "../components/hero"
const IndexPage = () => {
return (
<Layout>
<Hero />
</Layout>
@konstantinmuenster
konstantinmuenster / hero.md
Created May 24, 2020 18:11
hero.md (1) - How To Gatsby Portfolio
greetings emoji title subtitlePrefix subtitleHighlight
Hello
👋
I'm Konstantin Münster
I build and design
things for the web.

Product Manager and Freelance Web Developer. Based in Hamburg.

@konstantinmuenster
konstantinmuenster / gatsby-config.js
Created June 3, 2020 18:21
gatsby-config.js (2) - How To Gatsby Portfolio
{
resolve: `gatsby-source-filesystem`,
options: {
name: `content`,
path: `${__dirname}/src/content`,
},
},
@konstantinmuenster
konstantinmuenster / gatsby-config.js
Created June 3, 2020 18:29
gatsby-config.js (3) - How To Gatsby Portfolio
plugins: [
...
{
resolve: `gatsby-source-filesystem`,
options: {
name: `content`,
path: `${__dirname}/src/content`,
},
},
`gatsby-transformer-remark`,
@konstantinmuenster
konstantinmuenster / index.js
Created June 4, 2020 19:24
index.js (4) - How To Gatsby Portfolio
export const pageQuery = graphql`
{
hero: allMarkdownRemark {
edges {
node {
frontmatter {
title
greetings
emoji
subtitlePrefix
@konstantinmuenster
konstantinmuenster / index.js
Created June 4, 2020 19:33
index.js (5) - How To Gatsby Portfolio
import React from "react"
import { graphql } from "gatsby"
import Layout from "../components/layout"
import Hero from "../components/hero"
const IndexPage = ({ data }) => {
return (
<Layout>
<Hero content={data.hero.edges[0].node} />
@konstantinmuenster
konstantinmuenster / hero.js
Created June 4, 2020 19:36
hero.js (2) - How To Gatsby Portfolio
...
const Hero = ({ content }) => {
const { frontmatter, rawMarkdownBody } = content
return (
<StyledSection id="hero">
<h1 className="title">
{frontmatter.greetings}{" "}
<span role="img" aria-label="emoji">
{frontmatter.emoji}
</span>
@konstantinmuenster
konstantinmuenster / gatsby-config.js
Last active June 6, 2020 06:27
gatsby-config.js (1) - How To Gatsby Portfolio
module.exports = {
...
},
plugins: [
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
<Image
src={image.srcUrl}
alt="Image"
width={600} // If you import the image locally, you can omit this
height={600} // If you import the image locally, you can omit this
/>
<div style={{ position: 'relative', overflow: 'hidden', height: '600px' }}>
<Image
src={image.srcUrl}
alt="Image"
fill={true}
style={{ objectFit: 'cover' }}
/>
</div>