Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#207: Calendars Page #286

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
7 changes: 5 additions & 2 deletions src/client/calendar/Calendars.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ class Calendars extends Component {

const calendarsComponent = Object.keys(calendars)
.map(k => <li key={k}>
Copy link
Owner

@Restuta Restuta May 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use x in place of k or key if you want to be explicit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Restuta Done

<a href={`calendars/${k.replace('cal-', '')}`}>{calendars[k].name}</a>
<a href={`calendars/${k.replace('cal-', '')}`}>
{calendars[k].name}
</a>
{calendars[k].description && <p>Description: <b>{calendars[k].description}</b></p>}
</li>)

return (
Expand All @@ -27,6 +30,6 @@ import { getAllCalendars } from 'shared/reducers/reducer.js'

export default connect(
(state, ownProps) => ({
calendars: getAllCalendars(state, ownProps)
calendars: getAllCalendars(state)
})
)(Calendars)
4 changes: 2 additions & 2 deletions src/client/calendar/Calendars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
list-style-type: none;

li {
height: 25px;
height: 100px;
width: 240px;
float: left;
text-align: center;
margin-right: 0px;
margin-right: 20px;
border: 1px solid #aaa;
padding: 0 20px;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't use "px" in CSS, if you look closer to other files they all use "rems". For convenience there is a helper called pxToRem using which you can specify pixels. When you shrink to mobile view I change base from 8px to 7px, that allows everything to progressively shrink.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Restuta Done

}
Expand Down