chore: add website preview templates (#1716)

This commit is contained in:
Shawn Erquhart
2018-09-06 14:44:58 -04:00
committed by GitHub
parent 9b18596fa2
commit 4fadf3fdb6
13 changed files with 1497 additions and 135 deletions

View File

@ -1,10 +1,12 @@
import React, { Fragment } from 'react';
import React from 'react';
import moment from 'moment';
import { graphql } from 'gatsby';
import Layout from '../components/layout';
import Markdownify from '../components/markdownify';
import VideoEmbed from '../components/video-embed';
import WhatsNew from '../components/whats-new';
import Release from '../components/release';
import '../css/imports/hero.css';
import '../css/imports/cta.css';
@ -12,21 +14,18 @@ import '../css/imports/whatsnew.css';
import '../css/imports/editors.css';
import '../css/imports/community.css';
const Features = ({ items }) => (
<Fragment>
{items.map(item => (
<div className="feature" key={item.feature}>
{item.imgpath && <img src={require(`../img/${item.imgpath}`)} />}
<h3>
<Markdownify source={item.feature} />
</h3>
<p>
<Markdownify source={item.description} />
</p>
</div>
))}
</Fragment>
);
const Features = ({ items }) =>
items.map(item => (
<div className="feature" key={item.feature}>
{item.imgpath && <img src={require(`../img/${item.imgpath}`)} />}
<h3>
<Markdownify source={item.feature} />
</h3>
<p>
<Markdownify source={item.description} />
</p>
</div>
));
const HomePage = ({ data }) => {
const landing = data.landing.childDataYaml;
@ -68,30 +67,16 @@ const HomePage = ({ data }) => {
</div>
</section>
<section className="whatsnew">
<div className="contained">
<ol>
{updates.updates.slice(0, 3).map(node => (
<a
href={`https://github.com/netlify/netlify-cms/releases/tag/${node.version}`}
key={node.version}
>
<li>
<div className="update-metadata">
<span className="update-version">{node.version}</span>
<span className="update-date">
{moment(node.date).format('MMMM D, YYYY')}
</span>
</div>
<span className="update-description">
<Markdownify source={node.description} />
</span>
</li>
</a>
))}
</ol>
</div>
</section>
<WhatsNew>
{updates.updates.slice(0, 3).map((node, idx) => (
<Release
key={idx}
version={node.version}
date={moment(node.date).format('MMMM D, YYYY')}
description={node.description}
/>
))}
</WhatsNew>
<section className="editors">
<div className="contained">