diff --git a/src/components/Schedule.js b/src/components/Schedule.js index 1905b61f..52efd9bf 100644 --- a/src/components/Schedule.js +++ b/src/components/Schedule.js @@ -1,28 +1,27 @@ const React = require('react') -import {getDates} from '../utils/date' -import {shortName} from '../models/collective' +const {getDates} = require('../utils/date') +const {shortName} = require('../models/collective') const now = new Date() -const dates = getDates(now); +const dates = getDates(now) -const days = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun']; -const isToday = weekDayIndex => (now.getDay() - 1) === weekDayIndex; -const weekDay = weekDayIndex => dates[weekDayIndex]; -const short = shortName; +const isToday = weekDayIndex => (now.getDay() - 1) === weekDayIndex +const weekDay = weekDayIndex => dates[weekDayIndex] +const short = shortName const todayClass = i => isToday(i) ? 'current' : '' const HeadDay = ({i, children}) => ( -
+

{children}

{weekDay(i)}

) -const days2 = [ +const days = [ 'Понедельник', 'Вторник', 'Среда', @@ -33,15 +32,15 @@ const days2 = [ const Schedule = ({groups}) => (
-
-
Гр.
- - {days2.map((day, index) => ( - {day} - ))} -
-
+
+
Гр.
+ + {days.map((day, index) => ( + {day} + ))} +
+ {groups.map((group, index) => ( ))} diff --git a/src/routes/schedule.js b/src/routes/schedule.js index 1951b432..a696211e 100644 --- a/src/routes/schedule.js +++ b/src/routes/schedule.js @@ -35,7 +35,7 @@ function getSchedule() { //})) const Component = ( -
+
{/**/} diff --git a/src/style/body-wrapper.scss b/src/style/body-wrapper.scss index efc6b253..e12ba87a 100644 --- a/src/style/body-wrapper.scss +++ b/src/style/body-wrapper.scss @@ -12,7 +12,6 @@ .body-wrapper__content { flex: 1; - margin: 0 auto 0; } @media (max-width: $mobile-width) { diff --git a/src/style/components/schedule-table.scss b/src/style/components/schedule-table.scss index 49d727ae..21cdf247 100644 --- a/src/style/components/schedule-table.scss +++ b/src/style/components/schedule-table.scss @@ -20,7 +20,7 @@ $current-day-column-border-thickness: 3px; } .lesson { - font-weight: bold; + margin-bottom: $half-margin; } .teacher { @@ -32,24 +32,6 @@ $current-day-column-border-thickness: 3px; border-right: $current-day-column-border-thickness solid; } - &__head{ - display: flex; - - .date { - margin: .5em 0 0; - font-size: 1.5em; - } - - & > div{ - min-width: $cell-width; - text-align: center; - } - - & > .group{ - min-width: $group-cell-width; - } - } - &__body { display: flex; flex-direction: column; @@ -72,6 +54,22 @@ $current-day-column-border-thickness: 3px; } } + &__head-record { + min-width: $cell-width; + padding: $row-padding; + + text-align: center; + + & > .group { + min-width: $group-cell-width; + } + + .date { + margin: .5em 0 0; + font-size: 1.5em; + } + } + &__record{ min-width: $cell-width; padding: $row-padding; diff --git a/src/style/variables.scss b/src/style/variables.scss index 4971234c..da3d2844 100644 --- a/src/style/variables.scss +++ b/src/style/variables.scss @@ -6,7 +6,7 @@ $tablet-min-width: 31.25em; $tablet-max-width: 64em; $content-full: 100%; -$content-wide: 80%; +$content-wide: 90%; $content-semi-wide: 70%; $content-thin: 60%;