-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
/
Copy pathOrganization.jsx
69 lines (59 loc) · 2.41 KB
/
Organization.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import React from 'react';
import Container from '../Container/Container';
import Contributors from '../Contributors/Contributors';
import Link from '../Link/Link';
import Shield from '../Shield/Shield';
import Items from './projects.json';
import './Organization.scss';
export default props => {
return (
<Container className="organization page__content">
<h1>The Organization</h1>
<p>The list below provides a brief overview of all commonly used projects in the webpack ecosystem.</p>
<div className="organization__projects">
{
Items.map(org => (
<div className="organization__project" key={ org.repo }>
<a className="organization__title" href={ `https://github.com/${org.repo}` }>
<h4>{ org.repo }</h4>
</a>
<p>{ org.description }</p>
<h6>Downloads and Stars</h6>
<Shield content={ `npm/dm/${org.npm}`} label="npm" />
<Shield content={ `github/stars/${org.repo}` } label="✭" />
<h6>Activity</h6>
<Shield
content={ `github/commits-since/${org.repo}/${encodeURIComponent("master@{6 months ago}")}` }
label="6m" />
<Shield
content={ `github/commits-since/${org.repo}/${encodeURIComponent("master@{3 months ago}")}` }
label="3m" />
<Shield
content={ `github/commits-since/${org.repo}/${encodeURIComponent("master@{1 month ago}")}` }
label="1m" />
<Shield
content={ `github/commits-since/${org.repo}/${encodeURIComponent("master@{1 week ago}")}` }
label="1w" />
<h6>Issues and PRs</h6>
<Shield content={ `github/issues-raw/${org.repo}` } label="issues" />
<Shield content={ `github/issues-pr-raw/${org.repo}` } label="prs" />
<h6>Maintainers</h6>
{
(() => {
if (org.maintainer) {
return <Contributors contributors={[ org.maintainer ]} />;
} else return <Link to="https://github.com/webpack/webpack/issues/2734">Maintainer needed...</Link>;
})()
}
</div>
))
}
</div>
</Container>
);
};