diff --git a/assets/style/main.scss b/assets/style/main.scss index 47473069..fd764892 100644 --- a/assets/style/main.scss +++ b/assets/style/main.scss @@ -1,12 +1,10 @@ * { margin: 0; padding: 0; - // width: 100%; - // height: 100%; } body { - font-family: "PT Sans"; + font-family: "PT Sans", Arial, sans-serif; } .menu { diff --git a/assets/style/schedule.scss b/assets/style/schedule.scss index c5fac0a7..71676161 100644 --- a/assets/style/schedule.scss +++ b/assets/style/schedule.scss @@ -12,7 +12,7 @@ td{ position: relative; - :not(.group){ + &:not(.group){ min-width: 150px; /* width: 15%;*/ width: 150px; @@ -29,7 +29,7 @@ vertical-align:baseline; p{ - position: absolute; + // position: absolute; width:30px; height: 30px; left: 0; @@ -155,6 +155,7 @@ background-color: rgba(255, 255, 255, 0.96); z-index: 100; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); + border-radius: 0 0 20px 20px; .current{ border: none; @@ -164,7 +165,6 @@ } th{ - /* border: 1px solid black;*/ :not(.group){ min-width: 150px; /* width: 15%;*/ diff --git a/client/schedule.js b/client/schedule.js new file mode 100644 index 00000000..f3a4d765 --- /dev/null +++ b/client/schedule.js @@ -0,0 +1,64 @@ +$(document).ready(function(){ + $(window).scroll(function(){ + if ($(window).scrollTop() >= 220) { + $(".schedule table thead").addClass("fix animated fadeInDown"); + $(".schedule table tbody").addClass("fix"); + }else{ + $(".schedule table thead").removeClass("fix animated fadeInDown"); + $(".schedule table tbody").removeClass("fix"); + } + }); + + var now = new Date(); + var day = now.getDay(); + if(day < 7) selectDay(day); + else deselectDays(); + + var dates = getDates(day); + // var dates = [45, 53, 53, 23, 53, 64]; + $(".schedule thead .date").each(function(index, elem){ + $(elem).text(dates[index]); + }); + + function selectDay(day){ + deselectDays(); + // day = Math.min(1, day); + // day = Math.max(6, day); + + $($(".schedule thead th")[day]).addClass("current first"); + $(".schedule tbody tr").each(function(index, elem){ + $($(elem).find("td")[day]).addClass("current"); + }); + $($(".schedule tbody tr").last().find("td")[day]).addClass("last"); + } + + function deselectDays(){ + $(".schedule thead th").removeClass("current first"); + $(".schedule tbody td").removeClass("current last"); + } +}); + +function range(start, num, step){ + var list= []; + var val = start; + for(var i = 0; i