Skip to content

Commit c8d8190

Browse files
committed
Merge feature-contentful
2 parents 69f9cc5 + 14ac99d commit c8d8190

File tree

28 files changed

+1144
-1447
lines changed

28 files changed

+1144
-1447
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React from 'react';
2+
import Renderer from 'react-test-renderer/shallow';
3+
import { MemberCardInner } from 'components/Contentful/MemberCard/MemberCard';
4+
5+
test('Matches shallow shapshot', () => {
6+
const renderer = new Renderer();
7+
const MOCK_PROPS = {
8+
memberCard: {
9+
country: 'es',
10+
},
11+
trackIcon: {
12+
file: {
13+
url: 'https://www.topcoder.com',
14+
},
15+
},
16+
theme: {},
17+
};
18+
renderer.render(<MemberCardInner {...MOCK_PROPS} />);
19+
expect(renderer.getRenderOutput()).toMatchSnapshot();
20+
});
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Matches shallow shapshot 1`] = `
4+
<a>
5+
<div>
6+
<div
7+
style={
8+
Object {
9+
"backgroundColor": "#63c630",
10+
}
11+
}
12+
>
13+
<img
14+
alt="track icon"
15+
src="https://www.topcoder.com"
16+
/>
17+
</div>
18+
<div>
19+
<div />
20+
<div>
21+
<span
22+
className="flag-icon flag-icon-es undefined"
23+
/>
24+
<span>
25+
SPAIN
26+
</span>
27+
</div>
28+
</div>
29+
</div>
30+
</a>
31+
`;

config/webpack/default.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,17 @@ module.exports = {
3030
* are not bundled. */
3131
/utils[\\/]router[\\/]require/,
3232
],
33-
rules: [{
34-
test: /\.svg$/,
35-
loader: 'file-loader',
36-
options: {
37-
outputPath: '/images/',
38-
publicPath: `${publicPath}/images`,
33+
rules: [
34+
{
35+
test: /\.svg$/,
36+
loader: 'file-loader',
37+
options: {
38+
outputPath: '/images/',
39+
publicPath: `${publicPath}/images`,
40+
},
41+
exclude: /node_modules/,
3942
},
40-
}],
43+
],
4144
},
4245
plugins: [
4346
new CopyWebpackPlugin([{

docs/contentful/custom-inline-components-in-markdown-fields.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,14 @@ other types too.
9090
component works only with YouTube videos, and the URL should be similar to
9191
`https://www.youtube.com/embed/mD12LIqdxqk` ().
9292

93+
- #### NewsletterArchive
94+
*Example:* `<NewsletterArchive name="Design Newsletter" />`
95+
96+
A list of archive links sorted by descending `sent_date` from a MailChimp's campaign folder. Sould be working under any MarkdownParser component.
97+
98+
The properties are:
99+
- `name` - the unique name of the camplaing foler. It has to be only one name entity. If those duplicate first found will be picked up and rest ignored.
100+
93101
## Links
94102

95103
- #### Link

docs/contentful/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Instructions are also provided below for developments that want to modify/create
2727
- [Navigation Menu](./NavigationMenu.md)
2828
- [Route](./Route.md)
2929
- [Viewport](./viewport.md)
30+
- [Member Card](./memberCard.md)
3031
- [Preview Content](./preview-content.md)
3132
- [Custom inline components in Markdown fields](./custom-inline-components-in-markdown-fields.md)
3233
- [Miscellaneous CSS Solutions](./miscellaneous-CSS-solutions.md)

docs/contentful/memberCard.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Member Card
2+
A card looking component that represents member/speaker/person card.
3+
4+
## Fields
5+
![](./pics/memberCard.png)
6+
7+
## Live Demo
8+
https://community-app.topcoder.com/examples/contentful/viewport/4SKonli2adCNFxBvgaeayI

docs/contentful/pics/memberCard.png

98.2 KB
Loading

0 commit comments

Comments
 (0)