1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-11 02:12:53 +00:00

added loading icon - next step: add sensor stuff and things

This commit is contained in:
2016-08-28 01:59:36 -05:00
parent d173b06129
commit 1c224f95ab
5 changed files with 46 additions and 13 deletions

View File

@@ -33,17 +33,12 @@ export default class Sidebar extends React.Component{
class="fa fa-2x fa-navicon"
aria-hidden="true" />
</a>
<h2>
About Me
</h2>
<h2>About Me</h2>
<img src={me}/>
<p>
My name is Mitchell and I have a passion for software development. I am currently a software engineer and enjoy working on personal projects in my free time.
</p>
<h3>
Contact Me
</h3>
<p>
<i class="fa fa-envelope" aria-hidden="true"></i>
<a class="link" href="mailto:mgerb42@gmail.com"> eMail</a>
@@ -60,6 +55,12 @@ export default class Sidebar extends React.Component{
<i class="fa fa-wpforms" aria-hidden="true"> </i>
<a href="/resume" class="link"> Resume</a>
</p>
<br/>
<h2>Sensors</h2>
<hr/>
</div>
);
}

View File

@@ -13,6 +13,9 @@ import '../../assets/scss/main.scss';
import 'font-awesome/css/font-awesome.min.css';
import '../../assets/css/dracula.css';
//loading icon
import loading from '../../assets/images/loading.svg';
export default class Index extends React.Component {
componentDidMount() {
this.props.actions.fetchPreview();
@@ -35,14 +38,14 @@ export default class Index extends React.Component {
render() {
const fetched = this.props.redux.fetched;
const fetching = this.props.redux.fetching;
return (
<div>
<Header />
<div class="Main">
{typeof this.page === 'undefined' && !fetching ? <Preview posts={this.props.redux.preview.posts} /> : null}
{this.page === 'post' && !fetching ? <Post content={this.props.redux.post}/> : null}
{fetching ? <div class="Content">Fetching</div> : null}
{fetching ? loadingElement : null}
<Sidebar />
</div>
<Footer />
@@ -50,3 +53,7 @@ export default class Index extends React.Component {
);
}
}
const loadingElement = <div class="Loading">
<img src={loading} alt="loading..."/>
</div>;