schedule table new layout based on flexbox

This commit is contained in:
tmshv committed 2016-02-25 04:41:28 +03:00
1 parent aec409d589
commit 3f2ebd558f
4 files changed
+120 -153

No files matched your search

+76 -101
View File
@@ -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);
//}