From dba3f4f320fbb36c495e23cabedf6b3d326e8cc9 Mon Sep 17 00:00:00 2001 From: Blaine Date: Tue, 3 Nov 2020 00:47:59 +0530 Subject: [PATCH 1/3] footer fix and wrapping div? --- gatsby-browser.js | 7 ------- gatsby-ssr.js | 11 +++++------ src/components/layout.js | 8 +++----- src/css/layout.css | 15 +++++++++++---- 4 files changed, 19 insertions(+), 22 deletions(-) diff --git a/gatsby-browser.js b/gatsby-browser.js index cbf66a4..f85ff42 100644 --- a/gatsby-browser.js +++ b/gatsby-browser.js @@ -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 {element} } diff --git a/gatsby-ssr.js b/gatsby-ssr.js index 01d8325..d587399 100644 --- a/gatsby-ssr.js +++ b/gatsby-ssr.js @@ -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 {element} +} \ No newline at end of file diff --git a/src/components/layout.js b/src/components/layout.js index 9fd6436..5155cb2 100644 --- a/src/components/layout.js +++ b/src/components/layout.js @@ -7,11 +7,9 @@ import "../css/layout.css" import Hero from "./hero" -const Layout = props => { - const { children, path } = props; - +const Layout = ({children, path}) => { return ( - <> +
@@ -20,7 +18,7 @@ const Layout = props => {
{children}
- + ) } diff --git a/src/css/layout.css b/src/css/layout.css index 6ac79ed..7896e7e 100644 --- a/src/css/layout.css +++ b/src/css/layout.css @@ -24,8 +24,12 @@ } .wrapper .footer { - flex: 0 0 10px; + flex: 0 0 20px; + padding-bottom: 10px; color: white; + background: -webkit-linear-gradient(#eee, #333); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; } #hero { @@ -36,7 +40,10 @@ visibility: visible; } -#hero.hide { - opacity: 0; - transition: opacity 0.1s ease-in; +#Page { + height: 100%; + width: 100%; + top: 0; + left: 0; + position: absolute; } From c4018cfef798e13df1a7be803d622a0c67d555fe Mon Sep 17 00:00:00 2001 From: Blaine Date: Tue, 3 Nov 2020 00:52:42 +0530 Subject: [PATCH 2/3] compat css --- src/css/layout.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/css/layout.css b/src/css/layout.css index 7896e7e..4479469 100644 --- a/src/css/layout.css +++ b/src/css/layout.css @@ -28,6 +28,7 @@ padding-bottom: 10px; color: white; background: -webkit-linear-gradient(#eee, #333); + background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; } From 212b9648642324cbc4c28f69319e82c5b189cb10 Mon Sep 17 00:00:00 2001 From: Blaine Date: Tue, 3 Nov 2020 00:54:45 +0530 Subject: [PATCH 3/3] minor edge case bug --- src/components/eventCard.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/eventCard.js b/src/components/eventCard.js index e1dba8b..ac2aced 100644 --- a/src/components/eventCard.js +++ b/src/components/eventCard.js @@ -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"