Skip to content

Instantly share code, notes, and snippets.

View timothyde's full-sized avatar

Timothy timothyde

View GitHub Profile
@timothyde
timothyde / Header.jsx
Created January 7, 2021 09:20
Header
import React, { useEffect, useState } from "react";
export default function Header() {
const [small, setSmall] = useState(false);
useEffect(() => {
if (typeof window !== "undefined") {
window.addEventListener("scroll", () =>
setSmall(window.pageYOffset > 200)
);
import React from 'react'
import styled from 'styled-components'
import { Link } from 'gatsby'
import { localeLink } from '../../utils/localeLink'
import signature from '../../images/signature.svg'
const Logo = styled.img`
display: inline-block;
margin: 0;
import React from 'react'
import styled from 'styled-components'
import { Link } from 'gatsby'
import { localeLink } from '../../utils/localeLink'
import signature from '../../images/signature.svg'
const Logo = styled.img`
display: inline-block;
margin: 0;
export const query = graphql`
query {
hero: file(relativePath: { eq: "hero.png" }) {
childImageSharp {
fluid(maxWidth: 1000) {
...GatsbyImageSharpFluid_tracedSVG
}
}
}
}
module.exports = {
siteMetadata: {
title: 'Gatsby Default Starter'
},
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/images`,
name: 'images'
const Container = styled.div`
margin-top: 8px;
flex-grow: 1;
overflow-y: scroll;
margin: 0px -32px;
margin-top: 8px;
padding: 0px 32px;
`;
const Container = styled.div`
flex-grow: 1;
overflow-y: scroll;
margin-top: 8px;
`;
import styled from 'styled-components';
import posed from 'react-pose';
const Perspective = styled.div`
perspective: 800px;
overflow: visible !important;
transform-style: preserve-3d;
width: 100%;
display: flex;
flex-direction: column;
const PosedTopBar = posed(TopBar)({
open: {
opacity: 1,
transition: {
duration: 50
}
},
closed: {
delay: 200,
opacity: 0,