Reimpliment the website design in React
This commit is contained in:
parent
833e5f19fc
commit
f2244ea3ed
23 changed files with 6351 additions and 47 deletions
51
src/App.js
51
src/App.js
|
|
@ -1,21 +1,54 @@
|
|||
import React, { Component } from 'react';
|
||||
import logo from './logo.svg';
|
||||
import './App.css';
|
||||
|
||||
import { Container, Row, Column } from './skeleton';
|
||||
|
||||
import { Header } from './Header';
|
||||
import { Footer } from './Footer';
|
||||
|
||||
import { NavList, TagNav, HistoryNav } from './Nav';
|
||||
import { Article } from './Article';
|
||||
|
||||
|
||||
class App extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="App">
|
||||
<div className="App-header">
|
||||
<img src={logo} className="App-logo" alt="logo" />
|
||||
<h2>Welcome to React</h2>
|
||||
</div>
|
||||
<p className="App-intro">
|
||||
To get started, edit <code>src/App.js</code> and save to reload.
|
||||
</p>
|
||||
<Header />
|
||||
|
||||
<Container>
|
||||
<Row>
|
||||
<Column width="two" className="nav">
|
||||
<NavList />
|
||||
<TagNav />
|
||||
</Column>
|
||||
<Column width="eight">
|
||||
{ this.articles() }
|
||||
</Column>
|
||||
</Row>
|
||||
|
||||
<HistoryNav />
|
||||
</Container>
|
||||
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
articles() {
|
||||
// TODO: This is the thing that'll fetch the articles from the JSON blob
|
||||
// based on the URL that's hit. This will return one or more Articles
|
||||
return [
|
||||
<Article
|
||||
title="This is where a blog post would go"
|
||||
date="1970-01-01"
|
||||
/>,
|
||||
<Article
|
||||
title="This is another blog post!"
|
||||
date="1970-01-01"
|
||||
is_page
|
||||
/>
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
export default App;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue