Skip to content

Commit

Permalink
Merge pull request #24 from dailybruin/Michael/BottomNav
Browse files Browse the repository at this point in the history
Michael/bottom nav
lgtm
  • Loading branch information
ryang72 authored Apr 25, 2019
2 parents 6ccc1a6 + 6ffdd54 commit fd24949
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/components/ArticleTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { css } from 'react-emotion'
interface ArticleTitleProps {
title: string
byline: string
isMobile: boolean
}

interface ArticleTitleState {
Expand Down
84 changes: 84 additions & 0 deletions src/components/BottomNav.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import * as React from 'react'
import { css } from 'react-emotion'
import { faArrowAltCircleDown } from '@fortawesome/free-solid-svg-icons'

interface BottomNavProps {
atBeginning: boolean
atEnd: boolean
prevName: string
nextName: string
}

export class BottomNav extends React.Component<BottomNavProps> {
handleClick = (id: string) => {
// TODO: go to next/prev page
}
render() {
return (
<div
className={css`
color: black;
font-family: 'Open Sans Condensed';
font-style: normal;
font-weight: bold;
font-size: 2.5vw;
line-height: normal;
@media screen and (max-width: 800px) {
font-size: 20px;
}
`}
>
<p
className={css`
float: left;
padding-left: 10%;
@media screen and (max-width: 800px) {
padding-left: 5%;
}
`}
>
{
<img
className={css`
height: 24px;
@media screen and (max-width: 1100px) {
height: 20px;
}
@media screen and (max-width: 900px) {
height: 16px;
}
`}
src={require('../images/left-arrow.png')}
/>
}
{this.props.prevName}
</p>
<p
className={css`
float: right;
padding-right: 10%;
@media screen and (max-width: 800px) {
padding-left: 5%;
}
`}
>
{this.props.nextName}
{
<img
className={css`
height: 24px;
@media screen and (max-width: 1100px) {
height: 20px;
}
@media screen and (max-width: 900px) {
height: 16px;
}
`}
src={require('../images/right-arrow.png')}
/>
}
</p>
</div>
)
}
}
Binary file added src/images/left-arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/right-arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react'
import { graphql } from 'gatsby'
import { ArticleTitle } from '../components/ArticleTitle'
import { BottomNav } from '../components/BottomNav'
import {
Article,
Byline,
Expand Down Expand Up @@ -98,9 +99,14 @@ const IndexPage = ({ data }) => (
<ArticleTitle
title="TITLE OF ARTICLE GOES HERE"
byline="A BYLINE GOES HERE"
isMobile={false}
/>
<Article dropcap={true} content={data.kerckhoffArticle.content} />
<BottomNav
atBeginning={false}
atEnd={false}
prevName="PREV: Name here"
nextName="NEXT: Name here"
/>
<Footer developers="Nathan Smith" copyrightYear={2018} />
</>
)
Expand Down

0 comments on commit fd24949

Please sign in to comment.