From e37d0c19102b353bde4abd9e258f6ebacea80558 Mon Sep 17 00:00:00 2001 From: Thierry Pasqualier Date: Tue, 2 Oct 2007 21:49:25 +0000 Subject: [PATCH] I began to use CSS for the calendar display --- webcit/calendar_view.c | 13 ++++++------- webcit/static/webcit.css | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/webcit/calendar_view.c b/webcit/calendar_view.c index 2f1318fee..4deefb22c 100644 --- a/webcit/calendar_view.c +++ b/webcit/calendar_view.c @@ -355,8 +355,7 @@ void calendar_month_view(int year, int month, int day) { /** Outer table (to get the background color) */ wprintf("
" - "
\n"); + " \n
"); wprintf("\n"); @@ -414,17 +413,17 @@ void calendar_month_view(int year, int month, int day) { wprintf(""); } - wprintf("
", - ((tm.tm_mon != month-1) ? "DDDDDD" : - ((tm.tm_wday==0 || tm.tm_wday==6) ? "EEEECC" : - "FFFFFF")) + wprintf("
", + ((tm.tm_mon != month-1) ? "out" : + ((tm.tm_wday==0 || tm.tm_wday==6) ? "weekend" : + "day")) ); if ((i==0) || (tm.tm_mday == 1)) { wc_strftime(colheader_label, sizeof colheader_label, "%B", &tm); wprintf("%s ", colheader_label); } wprintf("" - "%d
", + "%d
", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, diff --git a/webcit/static/webcit.css b/webcit/static/webcit.css index 08665bd52..e2a62c590 100644 --- a/webcit/static/webcit.css +++ b/webcit/static/webcit.css @@ -400,6 +400,27 @@ var sub { font-style: normal; } +.calendar { + background-color: #204B78; +} + +.day { + font-weight: 700; +} + +.calout { + background-color: #DDDDDD; +} + +.calday { + background-color: #FFFFFF; +} + +.calweekend { + background-color: #EEEECC; +} + + /* Links */ @@ -1074,3 +1095,17 @@ ul.tabbed_dialog { width: 74%; padding: 10px; } + +/* Calendar view */ + +.calendar { + margin: 2% auto 0 auto; + width: 98%; +} + +.calday, .calout, .calweekend { + width: 14%; + height: 60px; + text-align: left; + vertical-align: top; +} -- 2.39.2