Add footer

This commit is contained in:
LordMathis 2019-11-13 20:10:14 +01:00
parent e4ae601c32
commit c8897a2619
No known key found for this signature in database
GPG Key ID: 575849FD91CE470C
6 changed files with 32 additions and 4 deletions

19
src/components/Footer.js Normal file
View File

@ -0,0 +1,19 @@
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import '../stylesheets/globals.scss'
import contentStyle from '../stylesheets/content.scss'
import style from './Footer.scss'
export default class Footer extends Component {
static propTypes = {
config: PropTypes.object.isRequired
}
render () {
return (
<footer className={style.footer}>
<p>Copyright &copy; {new Date().getFullYear()} { this.props.config.name }</p>
</footer>
)
}
}

View File

@ -0,0 +1,6 @@
@import "../stylesheets/variables.scss";
.footer {
padding: 10px;
text-align: center;
}

View File

@ -1,13 +1,12 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import { Spinner, Header, Navbar } from '.' import { Spinner, Header, Navbar, Wrapper, Footer } from '.'
import '../stylesheets/globals.scss' import '../stylesheets/globals.scss'
import contentStyle from '../stylesheets/content.scss' import contentStyle from '../stylesheets/content.scss'
import styles from './Post.scss' import styles from './Post.scss'
import MarkdownIt from 'markdown-it' import MarkdownIt from 'markdown-it'
import fm from 'front-matter' import fm from 'front-matter'
import moment from 'moment' import moment from 'moment'
import Wrapper from './Wrapper'
export default class Post extends Component { export default class Post extends Component {
static propTypes = { static propTypes = {
@ -44,6 +43,7 @@ export default class Post extends Component {
</div> </div>
</div> </div>
</Wrapper> </Wrapper>
<Footer config={this.props.config}/>
</div> </div>
) )
} }

View File

@ -1,6 +1,6 @@
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import React, { Component } from 'react' import React, { Component } from 'react'
import { Spinner, Navbar, Wrapper, Header } from '.' import { Spinner, Navbar, Wrapper, Header, Footer } from '.'
import '../stylesheets/globals.scss' import '../stylesheets/globals.scss'
import contentStyle from '../stylesheets/content.scss' import contentStyle from '../stylesheets/content.scss'
import style from './Resume.scss' import style from './Resume.scss'
@ -37,6 +37,7 @@ export default class About extends Component {
</div> </div>
</div> </div>
</Wrapper> </Wrapper>
<Footer config={this.props.config} />
</div> </div>
) )
} }

View File

@ -12,3 +12,4 @@ export { default as App } from './App'
export { default as SocialLinks } from './SocialLinks' export { default as SocialLinks } from './SocialLinks'
export { default as Column } from './Column' export { default as Column } from './Column'
export { default as Resume } from './Resume' export { default as Resume } from './Resume'
export { default as Footer } from './Footer'

View File

@ -1,6 +1,6 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import { About, Blog, Home, Wrapper, Column } from '../components' import { About, Blog, Home, Wrapper, Column, Footer } from '../components'
export default class MainContainer extends Component { export default class MainContainer extends Component {
static propTypes = { static propTypes = {
@ -42,6 +42,7 @@ export default class MainContainer extends Component {
posts={this.state.posts}/> posts={this.state.posts}/>
</Column> </Column>
</Wrapper> </Wrapper>
<Footer config={this.state.config} />
</div> </div>
) )
} }