From 2caf96afbf118fb6c7e925b2e48ec5bf608667f8 Mon Sep 17 00:00:00 2001 From: Jinksi Date: Fri, 13 Oct 2017 23:01:30 +1000 Subject: [PATCH] Integrate extra content and fields --- public/admin/config.yml | 11 +++++++++++ public/admin/index.html | 4 ++-- src/views/About.js | 8 ++++---- src/views/Contact.js | 14 +------------- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/public/admin/config.yml b/public/admin/config.yml index 1ed2dc9..5f76acd 100644 --- a/public/admin/config.yml +++ b/public/admin/config.yml @@ -15,10 +15,21 @@ collections: # A list of collections the CMS should be able to edit name: "home-page" fields: - {label: Title, name: title, widget: string} + - {label: Subtitle, name: subtitle, widget: string} - {label: Body, name: body, widget: markdown} - file: "content/pages/about.json" label: "About Page" name: "about-page" fields: - {label: Title, name: title, widget: string} + - {label: Subtitle, name: subtitle, widget: string} + - {label: Body, name: body, widget: markdown} + - {label: Section 1, name: section1, widget: markdown} + - {label: Section 2, name: section2, widget: markdown} + - file: "content/pages/contact.json" + label: "Contact Page" + name: "contact-page" + fields: + - {label: Title, name: title, widget: string} + - {label: Subtitle, name: subtitle, widget: string} - {label: Body, name: body, widget: markdown} diff --git a/public/admin/index.html b/public/admin/index.html index 1ef4650..76c205b 100644 --- a/public/admin/index.html +++ b/public/admin/index.html @@ -6,12 +6,12 @@ Content Manager - + - + diff --git a/src/views/About.js b/src/views/About.js index 13ee661..ac1406e 100644 --- a/src/views/About.js +++ b/src/views/About.js @@ -1,5 +1,7 @@ import React from 'react' import Helmet from 'react-helmet' +import Marked from 'react-markdown' + import Page from '../components/Page' import PageHeader from '../components/PageHeader' import { Container, Section } from '../components/common' @@ -12,14 +14,12 @@ export default ({ page }) => (
-

Hello World!

-

A sem vel nec sodales mi vivamus senectus sed potenti a parturient nascetur tincidunt nisi pulvinar rhoncus a. Risus imperdiet taciti suspendisse facilisi a per metus cubilia varius a nostra adipiscing amet ultrices quisque ac mi a. Dictumst a ultrices mi a dignissim ad fermentum eget a nam et a blandit scelerisque. Taciti lorem tempor quam vestibulum dis habitasse vestibulum diam vel est ut proin dis auctor. Suscipit scelerisque orci magna interdum vel bibendum duis netus a consectetur dui magnis ac aliquet sem posuere tincidunt vestibulum.

+
-

This is a skinny center-aligned {''}

-

A sem vel nec sodales mi vivamus senectus sed potenti a parturient nascetur tincidunt nisi pulvinar rhoncus a. Risus imperdiet taciti suspendisse facilisi a per metus cubilia varius a nostra adipiscing amet ultrices quisque ac mi a. Dictumst a ultrices mi a dignissim ad fermentum eget a nam et a blandit scelerisque. Taciti lorem tempor quam vestibulum dis habitasse vestibulum diam vel est ut proin dis auctor. Suscipit scelerisque orci magna interdum vel bibendum duis netus a consectetur dui magnis ac aliquet sem posuere tincidunt vestibulum.

+
diff --git a/src/views/Contact.js b/src/views/Contact.js index f38e18c..9025dd5 100644 --- a/src/views/Contact.js +++ b/src/views/Contact.js @@ -6,24 +6,12 @@ import NetlifyForm from '../components/NetlifyForm' import { Container, Section } from '../components/common' import Marked from 'react-markdown' -const content = ` - # Example contact form - - This form is setup to use Netlify's form handling: - - - the form action is set to the current absolute url: \`action: '/contact/'\` - - a name attribute is sent with the form's data \`'form-name': 'Contact'\` - - netlify data attributes are added to the form \`data-netlify data-netlify-honeypot\` - - Find out more in the [Netlify Docs](https://www.netlify.com/docs/form-handling/). -` - export default ({ page }) => (
- +

{''}