Commit 827cda9b authored by Seth A Johnson's avatar Seth A Johnson
Browse files

video section (simple)

parent 0879130b
...@@ -54,7 +54,7 @@ body { ...@@ -54,7 +54,7 @@ body {
} }
.video-container { .video-container {
background: darkorange;
} }
.map-area { .map-area {
......
import React from "react"
const Video = ({video}) => {
return (
<div>
<h2>{video.heading}</h2>
<figure dangerouslySetInnerHTML={{ __html: video.embed }} />
<p>{video.description}</p>
</div>
)
}
export default Video
...@@ -7,4 +7,9 @@ newsletterSection: ...@@ -7,4 +7,9 @@ newsletterSection:
description: description of the newsletter description: description of the newsletter
url: "http://google.com" url: "http://google.com"
buttonLabel: Sign Up buttonLabel: Sign Up
videoSection:
heading: Boop
description: Manatee v. Glass
embed:
<iframe width="560" height="315" src="https://www.youtube.com/embed/cmp9_bwNQPg" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
--- ---
...@@ -9,6 +9,7 @@ import Tagline from "../components/tagline" ...@@ -9,6 +9,7 @@ import Tagline from "../components/tagline"
import Newsletter from "../components/newsletter" import Newsletter from "../components/newsletter"
import NewsList from "../components/news/newsList" import NewsList from "../components/news/newsList"
import EventList from "../components/events/eventList" import EventList from "../components/events/eventList"
import Video from "../components/video"
export const IndexQuery = graphql` export const IndexQuery = graphql`
query { query {
...@@ -23,6 +24,11 @@ query { ...@@ -23,6 +24,11 @@ query {
url url
buttonLabel buttonLabel
} }
videoSection {
heading
description
embed
}
} }
} }
books: allMarkdownRemark ( books: allMarkdownRemark (
...@@ -118,6 +124,7 @@ query { ...@@ -118,6 +124,7 @@ query {
const IndexPage = ({data}) => { const IndexPage = ({data}) => {
const tagline = data.home.frontmatter.taglineSection const tagline = data.home.frontmatter.taglineSection
const newsletter = data.home.frontmatter.newsletterSection const newsletter = data.home.frontmatter.newsletterSection
const video = data.home.frontmatter.videoSection
const books = data.books.edges const books = data.books.edges
const news = data.news.edges const news = data.news.edges
const events = data.events.edges const events = data.events.edges
...@@ -148,7 +155,7 @@ const IndexPage = ({data}) => { ...@@ -148,7 +155,7 @@ const IndexPage = ({data}) => {
library signup thing library signup thing
</div> </div>
<div className="video-container"> <div className="video-container">
video <Video video={video} />
</div> </div>
</div> </div>
</Layout> </Layout>
......
...@@ -52,6 +52,8 @@ collections: ...@@ -52,6 +52,8 @@ collections:
- file: src/content/home.md - file: src/content/home.md
name: home name: home
label: Home label: Home
editor:
preview: false
fields: fields:
- { name: templateKey, label: "Template Key", widget: hidden, default: home-page } - { name: templateKey, label: "Template Key", widget: hidden, default: home-page }
- name: taglineSection - name: taglineSection
...@@ -67,6 +69,12 @@ collections: ...@@ -67,6 +69,12 @@ collections:
- { name: description, label: Description } - { name: description, label: Description }
- { name: url, label: "Newsletter URL" } - { name: url, label: "Newsletter URL" }
- { name: buttonLabel, label: "Button Label" } - { name: buttonLabel, label: "Button Label" }
- name: videoSection
label: "Video Section"
widget: object
- { name: heading, label: Heading }
- { name: description, label: Description }
- { name: embed, label: "Video Embed Code", widget: text }
- file: "src/content/about.md" - file: "src/content/about.md"
name: about name: about
label: About label: About
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment