diff --git a/generators/event_calendar/templates/stylesheet.css b/generators/event_calendar/templates/stylesheet.css index e821653..13ddc02 100644 --- a/generators/event_calendar/templates/stylesheet.css +++ b/generators/event_calendar/templates/stylesheet.css @@ -42,14 +42,14 @@ /* Containers */ .ec-body { position: relative; - border-right: 1px solid #303030; + border-right: 1px solid #D5D5D5; white-space: nowrap; } /* Day names */ .ec-day-names { position: absolute; - top: 0; + top: -21px; left: 0; width: 100%; table-layout: fixed; @@ -64,7 +64,7 @@ /* Rows container and Row */ .ec-rows { - position: absolute; + position: relative; left: 0; bottom: 0; width: 100%; @@ -74,7 +74,7 @@ } .ec-row { - position: absolute; + position: relative; left: 0; width: 100%; overflow: hidden; @@ -113,7 +113,7 @@ border-top: 1px solid #d5d5d5; border-left: 1px solid #d5d5d5; border-bottom: 1px dotted #bbbbbb; - background-color: #ecede2; + background-color: #ffebce; overflow: hidden; } @@ -145,6 +145,8 @@ a.ec-day-link { vertical-align: top; padding-right: 1px; padding-left: 2px; + border-left: 1px solid #D5D5D5; + background-color: #fff9ea; } .ec-event-cell a { @@ -234,4 +236,8 @@ a.ec-day-link { -webkit-border-radius: 2px; -khtml-border-radius: 2px; -moz-border-radius: 2px; -} \ No newline at end of file +} + +table.ec-row-table { + margin-bottom: 0 auto; +} diff --git a/lib/event_calendar/calendar_helper.rb b/lib/event_calendar/calendar_helper.rb index 61c984e..e438499 100644 --- a/lib/event_calendar/calendar_helper.rb +++ b/lib/event_calendar/calendar_helper.rb @@ -136,7 +136,7 @@ def calendar(options = {}, &block) end # body container (holds day names and the calendar rows) - cal << %(
) + cal << %(
) # day names cal << %() @@ -147,8 +147,7 @@ def calendar(options = {}, &block) cal << %(
) # container for all the calendar rows - cal << %(
) + cal << %(
) # initialize loop variables first_day_of_week = beginning_of_week(first, options[:first_day_of_week]) @@ -159,7 +158,7 @@ def calendar(options = {}, &block) # go through a week at a time, until we reach the end of the month while(last_day_of_week <= last_day_of_cal) - cal << %(
) + cal << %(
) top += row_heights[row_num] # this weeks background table @@ -307,7 +306,7 @@ def display_event_time(event, day) # try to make it display as short as possible format = (time.min == 0) ? "%l" : "%l:%M" t = time.strftime(format) - am_pm = time.strftime("%p") == "PM" ? "p" : "" + am_pm = time.strftime("%p") == "PM" ? "pm" : "am" t += am_pm %(#{t}) else diff --git a/lib/generators/event_calendar/templates/stylesheet.css b/lib/generators/event_calendar/templates/stylesheet.css index e821653..13ddc02 100644 --- a/lib/generators/event_calendar/templates/stylesheet.css +++ b/lib/generators/event_calendar/templates/stylesheet.css @@ -42,14 +42,14 @@ /* Containers */ .ec-body { position: relative; - border-right: 1px solid #303030; + border-right: 1px solid #D5D5D5; white-space: nowrap; } /* Day names */ .ec-day-names { position: absolute; - top: 0; + top: -21px; left: 0; width: 100%; table-layout: fixed; @@ -64,7 +64,7 @@ /* Rows container and Row */ .ec-rows { - position: absolute; + position: relative; left: 0; bottom: 0; width: 100%; @@ -74,7 +74,7 @@ } .ec-row { - position: absolute; + position: relative; left: 0; width: 100%; overflow: hidden; @@ -113,7 +113,7 @@ border-top: 1px solid #d5d5d5; border-left: 1px solid #d5d5d5; border-bottom: 1px dotted #bbbbbb; - background-color: #ecede2; + background-color: #ffebce; overflow: hidden; } @@ -145,6 +145,8 @@ a.ec-day-link { vertical-align: top; padding-right: 1px; padding-left: 2px; + border-left: 1px solid #D5D5D5; + background-color: #fff9ea; } .ec-event-cell a { @@ -234,4 +236,8 @@ a.ec-day-link { -webkit-border-radius: 2px; -khtml-border-radius: 2px; -moz-border-radius: 2px; -} \ No newline at end of file +} + +table.ec-row-table { + margin-bottom: 0 auto; +}