Skip to content

Commit

Permalink
chore (beautify homepage): Make a better first impression on the home…
Browse files Browse the repository at this point in the history
…page

- Add homepage carousel below the navigation bar
- Show actual article images in the footer (remove placeholder images)
- Centre the "Read More" button for each article
- Add the theme colour (turquoise) where appropriate

[Starts #162693578]
  • Loading branch information
Bruce Allan Makaaru authored and Bruce Allan Makaaru committed Dec 17, 2018
1 parent e5af190 commit ab18403
Show file tree
Hide file tree
Showing 19 changed files with 832 additions and 364 deletions.
2 changes: 1 addition & 1 deletion src/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ exports[`Provider and App renders <App/> correctly 1`] = `
path="/article/:articleId"
/>
</Switch>
<Footer />
<Connect(Footer) />
</BrowserRouter>
`;

Expand Down
6 changes: 6 additions & 0 deletions src/commons/initialStates.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,10 @@ export const initialStateWithSample2 = {
article: sampleArticle2,
};

export const sampleListOfArticles = [
sampleArticle, { ...sampleArticle, id: 2 }, { ...sampleArticle, id: 3 },
{ ...sampleArticle, id: 4 }, { ...sampleArticle, id: 5 }, { ...sampleArticle, id: 6 },
{ ...sampleArticle, id: 7 }, { ...sampleArticle, id: 8 }, { ...sampleArticle, id: 9 },
];

export default initialState;
4 changes: 2 additions & 2 deletions src/components/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { faSearch } from '@fortawesome/free-solid-svg-icons';
import Home from '../Home';
import Login from '../Login/index';
import Header from '../Header';
import { Footer } from '../Footer';
import FooterConnected from '../../containers/Footer';
import SignUpPageConnected from '../../containers/SignUpPage';
import Articles from '../../containers/Articles';
import ArticlePageConnected from '../../containers/ArticlePage';
Expand All @@ -23,7 +23,7 @@ const App = () => (
<Route path="/articles" component={Articles} />
<Route path="/article/:articleId" component={ArticlePageConnected} />
</Switch>
<Footer />
<FooterConnected />
</React.Fragment>
</BrowserRouter>
);
Expand Down
27 changes: 19 additions & 8 deletions src/components/Articles/Articles.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
$primaryLight: #40e0d0;
$primaryDark: #20c0b0;
$primaryDarker: #345F5B;

.articles-body {
display: flex;
flex-flow: row wrap;
Expand Down Expand Up @@ -48,15 +52,22 @@
.date-section {
}
.read-more {
border-radius: 5px;
// border: 1px solid red;
width: 40%;
background: #47d79f;
color: white;
text-align: center;
padding-top: 20px;

a{
color: #efefef;
}
a {
border-radius: 5px;
background: $primaryLight;
color: #efefef;
text-align: center;
padding: 5px 10px;
}
a:hover {
text-decoration: none;
border: 1px solid $primaryLight;
background: white;
color: $primaryDark;
}
}
}
}
235 changes: 0 additions & 235 deletions src/components/Footer/__snapshots__/footer.test.js.snap

This file was deleted.

23 changes: 0 additions & 23 deletions src/components/Footer/footer.test.js

This file was deleted.

Loading

0 comments on commit ab18403

Please sign in to comment.