398e3e06a362dd390083f428d8163aeb85e2c05d chinhli Mon Apr 23 21:45:45 2012 -0700 Finished generate userAccount.css in HEAD and class='userAccount' attributes in BODY. diff --git src/lib/htmshell.c src/lib/htmshell.c index 88e3dfd..ba710f7 100644 --- src/lib/htmshell.c +++ src/lib/htmshell.c @@ -352,30 +352,45 @@ "\n"; void htmlSetStyle(char *style) /* Set document wide style. A favorite style to * use for many purposes is htmlStyleUndecoratedLink * which will remove underlines from links. * Needs to be called before htmlStart or htmShell. */ { htmlStyle = style; } +static char *htmlStyleSheet = NULL; +void htmlSetStyleSheet(char *styleSheet) +/* Set document wide style sheet by adding css name to HEAD part. + * Needs to be called before htmlStart or htmShell. */ +{ +htmlStyleSheet = styleSheet; +} + +static char *htmlFormClass = NULL; +void htmlSetFormClass(char *formClass) +/* Set class in the BODY part. */ +{ +htmlFormClass = formClass; +} + static char *htmlBackground = NULL; void htmlSetBackground(char *imageFile) /* Set background - needs to be called before htmlStart * or htmShell. */ { htmlBackground = imageFile; } static int htmlBgColor = 0xFFFFFF; boolean gotBgColor = FALSE; void htmlSetBgColor(int color) /* Set background color - needs to be called before htmlStart * or htmShell. */ @@ -426,32 +441,38 @@ #else///ifndef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS char *browserVersion; if (btIE == cgiClientBrowser(&browserVersion, NULL, NULL) && *browserVersion < '8') fputs("\n", f); else fputs("",f); // Strict would be nice since it fixes atleast one IE problem (use of :hover CSS pseudoclass) //fputs("\n",f); #endif///ndef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS } fputs("", f); fprintf(f,"\n%s%s\n", head, title); fprintf(f, "\t\n"); if (htmlStyle != NULL) fputs(htmlStyle, f); +if (htmlStyleSheet != NULL) + fprintf(f, "\n", + htmlStyleSheet); fputs("\n\n",f); fputs("\n",f); htmlWarnBoxSetup(f); } void htmlStart(char *title) /* Write the start of an html from CGI */ { puts("Content-Type:text/html"); puts("\n");