f16abb2f99276fcf1811ef04f4f767ce1631c4c7 kate Wed Nov 16 16:27:45 2016 -0800 Cleanup CSS. refs #17369 diff --git src/hg/lib/web.c src/hg/lib/web.c index 4e35539..7d6abe6 100644 --- src/hg/lib/web.c +++ src/hg/lib/web.c @@ -418,80 +418,96 @@ void webEnd() /* output the footer of the HTML page */ { if(!webInTextMode) { webEndSectionTables(); #ifndef GBROWSE googleAnalytics(); #endif /* GBROWSE */ puts( "</BODY></HTML>"); webPopErrHandlers(); } } -void webStartJWestOptionalBanner(struct cart *cart, char *db, char *title, boolean doBanner) +static void webStartGbOptionalBanner(struct cart *cart, char *db, char *title, boolean doBanner, + boolean hgGateway) /* Start HTML with new header and footer design by JWest. - Optionally display banner above menubar + Optionally display banner above menubar. Use flag with hgGateway, till that is migrated. */ { puts("Content-type:text/html\n"); +if (hgGateway) + { printf( #include "jWestHeader.h" , title); + } +else + { + printf( + #include "gbHeader.h" + , title); + } if (doBanner) { printf( #include "jWestBanner.h" , title); } webPushErrHandlersCartDb(cart, db); htmlWarnBoxSetup(stdout); // Add hotlinks bar char *navBar = menuBar(cart, db); if (navBar) { puts(navBar); // Override nice-menu.css's menu background and fonts: - puts("<link rel=\"stylesheet\" href=\"../style/jWest.afterNiceMenu.css\">"); + puts("<link rel='stylesheet' href='../style/gbAfterMenu.css'>"); } webHeadAlreadyOutputed = TRUE; errAbortSetDoContentType(FALSE); } -void webStartJWest(struct cart *cart, char *db, char *title) -/* Start HTML with new banner and footer design by jWest (with modifications). */ -{ -webStartJWestOptionalBanner(cart, db, title, TRUE); -} - -void webStartJWestNoBanner(struct cart *cart, char *db, char *title) +void webStartGbNoBanner(struct cart *cart, char *db, char *title) /* Start HTML with new header and footer design by jWest, but no banner */ { -webStartJWestOptionalBanner(cart, db, title, FALSE); +webStartGbOptionalBanner(cart, db, title, FALSE, FALSE); } -void webEndJWest() +void webEndGb() /* End HTML that was started with webStartJWest. */ { googleAnalytics(); puts("</body></html>"); webPopErrHandlers(); } +void webStartJWest(struct cart *cart, char *db, char *title) +/* Start HTML with new banner and footer design by jWest (with modifications). */ +{ +webStartGbOptionalBanner(cart, db, title, TRUE, TRUE); +} + +void webEndJWest() +/* End HTML that was started with webStartJWest. */ +{ +webEndGb(); +} + static boolean gotWarnings = FALSE; void webVaWarn(char *format, va_list args) /* Warning handler that closes out page and stuff in * the fancy form. */ { gotWarnings = TRUE; boolean needStart = !webHeadAlreadyOutputed; if (needStart) { // All callers of this (via webPushErrHandlersCartDb) have skipped Content-type // because they want to output text unless we hit this condition: puts("Content-type:text/html\n"); cartWebStart(errCart, errDb, "Error"); }