From 5a32d2ff96bf8532f3fff5c1bbbbf2497912ba92 Mon Sep 17 00:00:00 2001 From: Divjot Singh Date: Thu, 8 Feb 2018 16:17:29 +0530 Subject: [PATCH 1/4] Add videos page --- website/i18n/en.json | 4 ++ website/pages/en/index.js | 17 +++++- website/pages/en/users.js | 5 +- website/pages/en/videos.js | 115 +++++++++++++++++++++++++++++++++++++ website/siteConfig.js | 39 ++++++++++--- 5 files changed, 167 insertions(+), 13 deletions(-) create mode 100644 website/pages/en/videos.js diff --git a/website/i18n/en.json b/website/i18n/en.json index 507253f36091..554df93c7ada 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -75,9 +75,13 @@ "Works with TypeScript|no description given": "Works with TypeScript", "Watch Talks about Jest|no description given": "Watch Talks about Jest", "The Jest core team and contributors regularly speak about Jest and Delightful JavaScript Testing. Check out our talks about [Building High-Quality JavaScript Tools](https://www.youtube.com/watch?v=PvabBs_utr8) at JSConf.eu 2017 or our talk about [Jest as a Platform](https://www.youtube.com/watch?v=NtjyeojAOBs) at ReactiveConf 2017.|no description given": "The Jest core team and contributors regularly speak about Jest and Delightful JavaScript Testing. Check out our talks about [Building High-Quality JavaScript Tools](https://www.youtube.com/watch?v=PvabBs_utr8) at JSConf.eu 2017 or our talk about [Jest as a Platform](https://www.youtube.com/watch?v=NtjyeojAOBs) at ReactiveConf 2017.", + "Watch more videos|no description given": "Watch more videos", "Who's using Jest?|no description given": "Who's using Jest?", "Jest is used by teams of all sizes to test web applications, node.js services, mobile apps, and APIs.|no description given": "Jest is used by teams of all sizes to test web applications, node.js services, mobile apps, and APIs.", "More Jest Users|no description given": "More Jest Users", + "Talks & Videos|no description given": "Talks & Videos", + "We understand that reading through docs can be boring sometimes. Here is a community curated list of talks & videos around Jest.|no description given": "We understand that reading through docs can be boring sometimes. Here is a community curated list of talks & videos around Jest.", + "Add your favorite talk|no description given": "Add your favorite talk", "Help Translate|recruit community translators for your project": "Help Translate", "Edit this Doc|recruitment message asking to edit the doc source": "Edit", "Translate this Doc|recruitment message asking to translate the docs": "Translate" diff --git a/website/pages/en/index.js b/website/pages/en/index.js index 42f0c4ef1311..aeeb7be0e113 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -87,7 +87,7 @@ class HomeSplash extends React.Component { -
+

Zero configuration testing platform @@ -350,8 +350,21 @@ class Index extends React.Component {

+ +
+ + Watch more videos + +
+

Who's using Jest? diff --git a/website/pages/en/users.js b/website/pages/en/users.js index fce4294a140e..58bea14fa447 100644 --- a/website/pages/en/users.js +++ b/website/pages/en/users.js @@ -25,10 +25,7 @@ class Users extends React.Component {

{showcase}

Are you using this project?

- + Add your company diff --git a/website/pages/en/videos.js b/website/pages/en/videos.js new file mode 100644 index 000000000000..f2a1e886a171 --- /dev/null +++ b/website/pages/en/videos.js @@ -0,0 +1,115 @@ +const React = require('react'); + +const { Container, MarkdownBlock } = require('../../core/CompLibrary.js'); +const { translate } = require('../../server/translate.js'); +const siteConfig = require(process.cwd() + '/siteConfig.js'); + +class Video extends React.PureComponent { + render() { + const { url, type } = this.props; + + switch (type) { + case siteConfig.videoTypes.YOUTUBE: { + return ( +