Skip to content

Commit

Permalink
RFR: Theme & styling (#224)
Browse files Browse the repository at this point in the history
* changed color of navbar and progress bars, removed logo background

* oops forgot to add these

* changed scratchy font, added padding to bottom of pages

* got hamburger icon to showgit add -u

* changed some button colors to orange, added enter key handler to upgrade user
  • Loading branch information
alicesf2 authored and XuanLi-Leong committed Dec 9, 2018
1 parent 72cc4b8 commit 40676e1
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 25 deletions.
2 changes: 0 additions & 2 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import ROYearGradeView from './pages/ReadingOlympics/ROYearGradeView';
import ROYearView from './pages/ReadingOlympics/ROYearView';
import BadgesPage from './pages/BadgesPage';
import About from './pages/About';

import './styles/App.scss';
import AdminProtection from './pages/protection/AdminProtection';
import AuthenticatedProtection from './pages/protection/AuthenticatedProtection';
import AdminAddQuizPage from './pages/admin/AdminAddQuizPage';
Expand Down
9 changes: 5 additions & 4 deletions frontend/src/components/PReadsNavbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import {
UncontrolledDropdown
} from 'reactstrap';
import Cookies from 'universal-cookie';
import logo from '../images/philareadslogo.png';
import logo from '../images/philareadslogo_transparent.png';
import '../styles/PReadsNavbar.scss';
export default class PReadsNavbar extends React.Component {
navigationOptions = [
{
Expand Down Expand Up @@ -59,11 +60,11 @@ export default class PReadsNavbar extends React.Component {
render() {
return (
<div>
<Navbar color="light" light expand="md">
<Navbar className="navbar-light" expand="md">
<NavbarBrand href="/">
<img src={logo} width="60" alt="philareads" />
<img src={logo} width="80" alt="philareads" />
</NavbarBrand>
<NavbarToggler onClick={this.toggle} />
<NavbarToggler onClick={this.toggle} className="hamburger-color" />
<Collapse isOpen={this.state.isOpen} navbar>
<Nav className="mr-auto" navbar>
{this.navigationOptions.map(({ route, name }) => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions frontend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import './styles/bootswatch.css';
import App from './App';
import * as serviceWorker from './serviceWorker';

Expand Down
5 changes: 4 additions & 1 deletion frontend/src/pages/BadgesPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ class BadgesPage extends Component {
<img src={badgeMap[badge.graphic]} width="50" alt={badge.graphic} />
</Col>
<Col lg="9" align="center">
<Progress value={(badge.currentCount / badge.targetCount) * 100} />
<Progress
color="success"
value={(badge.currentCount / badge.targetCount) * 100}
/>
</Col>
</Row>
);
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/pages/ReadingOlympics/ROHome.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ class ROHome extends Component {
<Button
className="navigation-button"
onClick={this.onClickMiddleSchool}
color="primary"
size="lg"
block
>
Expand All @@ -84,7 +83,6 @@ class ROHome extends Component {
<Button
className="navigation-button"
onClick={this.onClickIntermediate}
color="primary"
size="lg"
block
>
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/pages/admin/AdminManageUsersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ class AdminManageUsersPage extends Component {
onChange={event => {
this.setState({ username: event.target.value });
}}
onKeyPress={event => {
if (event.key === 'Enter') {
event.preventDefault();
this.toggleModal();
}
}}
/>
<br />
<Button
Expand Down
1 change: 1 addition & 0 deletions frontend/src/styles/App.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
body {
background-color: #f5f5f5;
padding-bottom: 40px;
}

.spinner {
Expand Down
28 changes: 13 additions & 15 deletions frontend/src/styles/BadgesPage.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
.profile {
.bar {
align-items: center;
}
.bar {
align-items: center;
}

.completed-badge {
align-self: center;
}
.completed-badge {
align-self: center;
}

.earned-badge {
margin-left: 15px;
margin-right: 15px;
}
.earned-badge {
margin-left: 15px;
margin-right: 15px;
}

.ip-badge {
margin-top: 10px;
margin-bottom: 10px;
}
.ip-badge {
margin-top: 10px;
margin-bottom: 10px;
}
5 changes: 5 additions & 0 deletions frontend/src/styles/Home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
color: white;
}

.navigation-button {
background-color: #ff9966;
color: black;
}

.navigation-button + .navigation-button {
margin: 30px 0px;
}
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/styles/PReadsNavbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
.navbar-brand > img {
padding: 7px 14px;
}

.navbar-light {
background-color: #b3d9ff !important;
}
3 changes: 2 additions & 1 deletion frontend/src/styles/ReadingOlympics.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@

.navigation-button {
margin: 30px 0px;
background-color: #ff9966;
color: black;
}

.book-image-container {
text-align: center;
margin-bottom: 10px;
Expand Down
12 changes: 12 additions & 0 deletions frontend/src/styles/bootswatch.css

Large diffs are not rendered by default.

0 comments on commit 40676e1

Please sign in to comment.