Skip to content

Commit fa23cef

Browse files
authored
Merge pull request #415 from webpack/feature/vote_infomrmatics
Feature/vote infomrmatics
2 parents 7417463 + 873273e commit fa23cef

File tree

4 files changed

+78
-0
lines changed

4 files changed

+78
-0
lines changed

components/vote/app-style.scss

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,33 @@
11
@import 'vars';
22
@import 'mixins';
3+
@import 'functions';
34

45
.vote-app {
6+
margin: 1.5em;
7+
8+
&__influence-descriptions {
9+
display: flex;
10+
flex-direction: column;
11+
12+
@include break(medium) {
13+
flex-direction: row;
14+
}
15+
}
16+
17+
&__influence-section {
18+
flex: 0 0 100%;
19+
}
20+
21+
&__influence-disclaimer {
22+
padding: 1em 0;
23+
flex: 0 0 100%;
24+
font-size: smaller;
25+
color: red;
26+
@include break(medium) {
27+
text-align: center;
28+
}
29+
}
30+
531
&__self-info {
632
margin-top: 10px;
733
}

components/vote/app.jsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import 'whatwg-fetch';
33
import SidebarItem from '../sidebar-item/sidebar-item';
44
import * as api from "./api";
55
import './app-style';
6+
import './influence-style';
67
import VoteButton from './button/button';
8+
import Influence from './influence.jsx';
79

810
function updateByProperty(array, property, propertyValue, update) {
911
return array.map(item => {
@@ -177,6 +179,15 @@ export default class VoteApp extends React.Component {
177179

178180
return (
179181
<div className="vote-app">
182+
<div className="vote-app__influence">
183+
<div className="vote-app__influence-descriptions">
184+
<Influence className="vote-app__influence-section" type="normal"/>
185+
<Influence className="vote-app__influence-section" type="golden"/>
186+
</div>
187+
<div className="vote-app__influence-disclaimer">
188+
DISCLAIMER: Since this feature is its Alpha stages, the formula for calculating influence may change.
189+
</div>
190+
</div>
180191
{this.renderSelf()}
181192
{ listInfo && <div>
182193
<button className="vote-app__update-button" disabled={inProgress} onClick={() => {

components/vote/influence-style.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@import 'mixins';
2+
@import 'functions';
3+
4+
.influence-info {
5+
em {
6+
font-weight: bolder;
7+
}
8+
9+
i {
10+
font-style: italic;
11+
}
12+
13+
&__section {
14+
padding: 0.5em 0;
15+
@include break(medium) {
16+
padding: 0 .5em;
17+
}
18+
}
19+
}

components/vote/influence.jsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React from 'react';
2+
import './influence-style.scss';
3+
4+
export default class InfluenceComponent extends React.Component {
5+
constructor(props) {
6+
super(props);
7+
}
8+
9+
render() {
10+
return (this.props.type === "normal" ? (
11+
<section className="influence-info influence-info__section">
12+
<h1 className="influence-info__header">What is Influence?</h1>
13+
<p><em>Influence</em> is a unit of measure based on time you have been a member on github. However, in 2017 and on you will recieve one influence per day.</p>
14+
</section>
15+
) : (
16+
<section className="influence-info influence-info__section">
17+
<h1 className="influence-info__header">What is Golden Influence?</h1>
18+
<p><em>Golden Influence</em> is equal to 100 <i>normal influence</i>. Golden Influence is obtained by being a backer or sponsor on our <a href="https://opencollective.com/webpack">Open Collective page</a>.</p>
19+
</section>
20+
));
21+
}
22+
}

0 commit comments

Comments
 (0)