diff --git a/src/style/components/schedule-table.scss b/src/style/components/schedule-table.scss index babf8356..d8c85b4b 100644 --- a/src/style/components/schedule-table.scss +++ b/src/style/components/schedule-table.scss @@ -2,101 +2,20 @@ $current-week-day-color: $blue-color; + +$cell-width: 9em; +$group-cell-width: 4em; +$current-week-day-color: $blue-color; +$row-padding: $single-margin 0; +$current-day-column-border-thickness: 3px; + .schedule-table { - //margin: 0 auto; - //width: 100%; - min-width: 50em; - position: relative; + margin-bottom: $double-margin; - table { - //margin: 2em auto; - border-spacing: 0; - text-align: center; - - thead { - animation-duration: 0.3s; - - th { - font-weight: normal; - vertical-align: baseline; - height: 80px; - } - - .date { - font-size: 1.5em; - } - - .group { - color: #666; - } - } - - tbody tr:nth-child(even) { - background-color: #f0f2da; - } - - td { - vertical-align: baseline; - - &:not(.group) { - width: 15%; - padding: .75em 1em; - } - - &.group { - width: 5%; - - p.name { - font-size: 1.25em; - font-weight: 800; - } - } - } - - thead.fix { - position: fixed; - top: 41px; - background-color: rgba(255, 255, 255, .95); - z-index: 50; - box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); - - .current { - border: none; - border-radius: 0; - color: $current-week-day-color; - } - - th { - height: auto; - - .day { - margin: .5em 0; - } - - .date { - margin: 0 0 .25em; - } - } - } - - tbody.fix:before { - content: ''; - display: block; - margin-top: 80px; - } + a{ + color: $dark-color; } - //p { - // margin-bottom: .2em; - //} - // - //a { - // color: black; - // - // text-decoration: none; - // border-bottom: 1px solid #ccc; - //} - .lesson { font-size: 1.1em; font-weight: bold; @@ -107,17 +26,73 @@ $current-week-day-color: $blue-color; } .current { - border-left: 2px solid $current-week-day-color; - border-right: 2px solid $current-week-day-color; + border-left: $current-day-column-border-thickness solid $current-week-day-color; + border-right: $current-day-column-border-thickness solid $current-week-day-color; } - .canceled:before { - position: absolute; - content: ""; - width: 70%; - height: 100%; - top: 0; - left: 15%; - background-image: url(lesson-canceled.svg); + &__head{ + display: flex; + justify-content: space-between; + + .date { + margin: .5em 0 0; + font-size: 1.5em; + } + + .group { + color: #666; + } + + & > div{ + min-width: $cell-width; + text-align: center; + } + + & > .group{ + min-width: $group-cell-width; + } + } + + &__body { + display: flex; + flex-direction: column; + } + + &__body-row{ + display: flex; + justify-content: space-between; + + &:nth-child(even) { + background-color: $schedule-row-color; + } + } + + &__body-group{ + min-width: $group-cell-width; + padding: $row-padding; + + text-align: center; + + p.name { + font-size: 1.25em; + font-weight: 800; + } + } + + &__record{ + min-width: $cell-width; + padding: $row-padding; + + text-align: center; } } + +//.canceled:before { +// position: absolute; +// content: ""; +// width: 70%; +// height: 100%; +// top: 0; +// left: 15%; +// background-image: url(lesson-canceled.svg); +//} diff --git a/src/style/style.scss b/src/style/style.scss index 602aff47..b739845d 100644 --- a/src/style/style.scss +++ b/src/style/style.scss @@ -24,4 +24,4 @@ @import "error-404"; @import "tape-viewer"; -@import "footer"; \ No newline at end of file +@import "footer"; diff --git a/src/style/variables.scss b/src/style/variables.scss index ff98833a..d2bb1b11 100644 --- a/src/style/variables.scss +++ b/src/style/variables.scss @@ -25,6 +25,8 @@ $red-color: rgb(246, 27, 20); $link-color: $blue-color; $inactive-link-color: $light-color; +$schedule-row-color: hsl(210, 55%, 90%); + //SHADOW $white-shadow: 0 .1em 0.3em rgba(0, 0, 0, 0.2); diff --git a/src/templates/components/schedule-table.html b/src/templates/components/schedule-table.html index f373d93b..aed079be 100644 --- a/src/templates/components/schedule-table.html +++ b/src/templates/components/schedule-table.html @@ -1,55 +1,45 @@
| Гр. | -
- Понедельник +
+
- Гр.
+
+
+ Понедельник +{{$ctrl.weekDay(0)}} +
+
+ Вторник +{{$ctrl.weekDay(1)}} +
+
+ Среда +{{$ctrl.weekDay(2)}} +
+
+ Четверг +{{$ctrl.weekDay(3)}} +
+
+ Пятница +{{$ctrl.weekDay(4)}} +
+
+ Суббота +{{$ctrl.weekDay(5)}} +{{$ctrl.weekDay(0)}} - |
-
- Вторник +
+
+
+
- {{group.name}} +{{group.time}} +{{$ctrl.weekDay(1)}} - |
-
- Среда - -{{$ctrl.weekDay(2)}} - |
-
- Четверг - -{{$ctrl.weekDay(3)}} - |
-
- Пятница - -{{$ctrl.weekDay(4)}} - |
-
- Суббота - -{{$ctrl.weekDay(5)}} - |
-
|---|---|---|---|---|---|---|
|
- {{group.name}} -{{group.time}} - |
-
-
-
-
- {{day.time[0] | join: '—'}} -{{day.time[1] | join: '—'}} - |
-