Skip to content

Commit

Permalink
display version in the header
Browse files Browse the repository at this point in the history
  • Loading branch information
mertkahyaoglu committed Jan 22, 2017
1 parent bda6cff commit fee9166
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/constants/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const VERSION = 'v0.3.0';
export const ADMIN_PREFIX = '/admin';
5 changes: 4 additions & 1 deletion src/containers/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Link } from 'react-router';
import { fetchConfig } from '../actions/config';
import { VERSION } from '../constants';

export class Header extends Component {

Expand All @@ -17,9 +18,11 @@ export class Header extends Component {
<div className="header">
<h3 className="title">
<Link target="_blank" to={`/`}>
<i className="fa fa-home"></i> <span>{config.title || 'You have no title!'}</span>
<i className="fa fa-home"></i>
<span>{config.title || 'You have no title!'}</span>
</Link>
</h3>
<span className="version">{VERSION}</span>
</div>
);
}
Expand Down
6 changes: 5 additions & 1 deletion src/styles/header.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
.header {
display: flex;
align-items: center;
justify-content: space-between;
height: 75px;
background-color: white;
padding: 0 40px;
@include box-shadow(0 2px 4px 0 rgba(204, 204, 204, 0.4));
.title {
font-weight: normal;
margin: 0 0 0 40px;
a {
color: #444444;
&:hover {
color: black;
}
}
}
.version {
color: $inactive-gray;
}
}

0 comments on commit fee9166

Please sign in to comment.