Skip to content

Commit

Permalink
Merge pull request #33 from Blakeinstein/master
Browse files Browse the repository at this point in the history
  • Loading branch information
Blakeinstein authored Nov 2, 2020
2 parents 359e01a + 212b964 commit 41ac1a2
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 24 deletions.
7 changes: 0 additions & 7 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
/**
* Implement Gatsby's Browser APIs in this file.
*
* See: https://www.gatsbyjs.com/docs/browser-apis/
*/

import "./src/css/global.css";
import React from "react";
import Layout from "./src/components/layout";

require('typeface-rubik');

// Wraps every page in a component
export const wrapPageElement = ({ element, props }) => {
return <Layout {...props}>{element}</Layout>
}
11 changes: 5 additions & 6 deletions gatsby-ssr.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
*
* See: https://www.gatsbyjs.com/docs/ssr-apis/
*/
import React from "react";
import Layout from "./src/components/layout";

// You can delete this file if you're not using it
export const wrapPageElement = ({ element, props }) => {
return <Layout {...props}>{element}</Layout>
}
5 changes: 3 additions & 2 deletions src/components/eventCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ function EventCard(props) {
const { title, description, attachments, link } = props
const startDate = moment(props.startDate)
const endDate = moment(props.endDate)

const imageAttachment = attachments.find(a => a.mimeType.startsWith("image/"))
let imageAttachment = null;
if (attachments)
imageAttachment = attachments.find(a => a.mimeType.startsWith("image/")) || null;
let imageUrl = imageAttachment
? "https://drive.google.com/uc?export=view&id=" + imageAttachment.fileId
: "https://drive.google.com/uc?export=view&id=1FQCwCAFxeagUXASyYQEIFljeQ-dTqiOU"
Expand Down
8 changes: 3 additions & 5 deletions src/components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import "../css/layout.css"

import Hero from "./hero"

const Layout = props => {
const { children, path } = props;

const Layout = ({children, path}) => {
return (
<>
<div id="Page">
<div id="hero">
<Hero/>
</div>
Expand All @@ -20,7 +18,7 @@ const Layout = props => {
<div className="content">{children}</div>
<Footer />
</div>
</>
</div>
)
}

Expand Down
16 changes: 12 additions & 4 deletions src/css/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@
}

.wrapper .footer {
flex: 0 0 10px;
flex: 0 0 20px;
padding-bottom: 10px;
color: white;
background: -webkit-linear-gradient(#eee, #333);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

#hero {
Expand All @@ -36,7 +41,10 @@
visibility: visible;
}

#hero.hide {
opacity: 0;
transition: opacity 0.1s ease-in;
#Page {
height: 100%;
width: 100%;
top: 0;
left: 0;
position: absolute;
}

0 comments on commit 41ac1a2

Please sign in to comment.