Skip to content

Commit 12f04ad

Browse files
committed
feat(vote): add information about influence, their value, and disclaimer, basic styling
1 parent c6ffe23 commit 12f04ad

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
@@ -2,7 +2,9 @@ import React from 'react';
22
import SidebarItem from '../sidebar-item/sidebar-item';
33
import * as api from "./api";
44
import './app-style';
5+
import './influence-style';
56
import VoteButton from './button/button';
7+
import Influence from './influence.jsx';
68

79
function updateByProperty(array, property, propertyValue, update) {
810
return array.map(item => {
@@ -176,6 +178,15 @@ export default class VoteApp extends React.Component {
176178

177179
return (
178180
<div className="vote-app">
181+
<div className="vote-app__influence">
182+
<div className="vote-app__influence-descriptions">
183+
<Influence className="vote-app__influence-section" type="normal"/>
184+
<Influence className="vote-app__influence-section" type="golden"/>
185+
</div>
186+
<div className="vote-app__influence-disclaimer">
187+
DISCLAIMER: Since this feature is its Alpha stages, the formula for calculating influence may change.
188+
</div>
189+
</div>
179190
{this.renderSelf()}
180191
{ listInfo && <div>
181192
<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 10 <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)