Skip to content

Commit e204518

Browse files
committedFeb 21, 2016
21 menu slides out when link clicked
1 parent 8e4d257 commit e204518

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed
 

‎src/js/components/Header.jsx

+11-6
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ export default class Header extends Component {
3939
}
4040
}
4141

42+
hide () {
43+
this.setState({visible: false});
44+
document.querySelector(".container-main").style.opacity = 1;
45+
}
46+
4247
render () {
4348
var { location, visible } = this.state;
4449
var { voter_photo_url: url, signed_in_personal: signedIn } = this.props;
@@ -69,7 +74,7 @@ export default class Header extends Component {
6974
<span>
7075
<ul className="list-group">
7176
<li className="list-group-item">
72-
<Link to="/more/sign_in">
77+
<Link onClick={this.hide.bind(this)} to="/more/sign_in">
7378
Sign In
7479
</Link>
7580
</li>
@@ -80,17 +85,17 @@ export default class Header extends Component {
8085
<ul className="list-group">
8186
{/*<li className="list-group-item"><Link to="/more/email_ballot">Print or Email Ballot</Link></li>*/}
8287
<li className="list-group-item">
83-
<Link to="/more/opinions/followed">
88+
<Link onClick={this.hide.bind(this)} to="/more/opinions/followed">
8489
Opinions I'm Following
8590
</Link>
8691
</li>
8792
<li className="list-group-item">
88-
<Link to="/settings/location">
93+
<Link onClick={this.hide.bind(this)} to="/settings/location">
8994
My Ballot Location
9095
</Link>
9196
</li>
9297
<li className="list-group-item">
93-
<Link to="/more/sign_in">
98+
<Link onClick={this.hide.bind(this)} to="/more/sign_in">
9499
Account Settings
95100
</Link>
96101
</li>
@@ -105,7 +110,7 @@ export default class Header extends Component {
105110
<h4 className="text-left"></h4>
106111
<ul className="list-group">
107112
<li className="list-group-item">
108-
<Link to="/more/about">
113+
<Link onClick={this.hide.bind(this)} to="/more/about">
109114
About <strong>We Vote</strong>
110115
</Link>
111116
</li>
@@ -120,7 +125,7 @@ export default class Header extends Component {
120125

121126
{ signedIn ?
122127
<li className="list-group-item">
123-
<Link to="/signout">
128+
<Link onClick={this.hide.bind(this)} to="/signout">
124129
Sign Out
125130
</Link>
126131
</li> : <span></span> }

‎src/sass/layout/_mediaquery.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
top: 43px;
3535
transform: translate3d(-10px, 0, 0);
3636
-webkit-transform: translate3d(-10px, 0, 0);
37-
width: 90%;
37+
width: 220px;
3838
z-index: 2;
3939
}
4040
}

‎src/sass/main.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
'./components/_badges',
3232
'./components/_ballotList',
3333
'./components/_itemActionbar',
34-
'./components/_candidate.scss',
35-
'./components/_navigator.scss';
34+
'./components/_candidate',
35+
'./components/_navigator';
3636

3737
// 6. Page-specific styles
3838
@import

0 commit comments

Comments
 (0)
Please sign in to comment.