| | @@ -382,58 +382,99 @@ |
| 382 | 382 | @ table.label-value th { |
| 383 | 383 | @ vertical-align: top; |
| 384 | 384 | @ text-align: right; |
| 385 | 385 | @ padding: 0.2ex 2ex; |
| 386 | 386 | @ } |
| 387 | +@ |
| 387 | 388 | ; |
| 388 | 389 | const char zDivSidebox[] = |
| 389 | 390 | @ /* The nomenclature sidebox for branches,.. */ |
| 390 | 391 | @ div.sidebox { |
| 391 | 392 | @ float: right; |
| 392 | 393 | @ border-width: medium; |
| 393 | 394 | @ border-style: double; |
| 394 | 395 | @ margin: 10; |
| 395 | 396 | @ } |
| 397 | +@ |
| 396 | 398 | ; |
| 397 | 399 | const char zDivSideboxTitle[] = |
| 398 | 400 | @ /* The nomenclature title in sideboxes for branches,.. */ |
| 399 | 401 | @ div.sideboxTitle { |
| 400 | 402 | @ display: inline; |
| 401 | 403 | @ font-weight: bold; |
| 402 | 404 | @ } |
| 405 | +@ |
| 403 | 406 | ; |
| 404 | 407 | const char zDivSideboxDescribed[] = |
| 405 | 408 | @ /* The defined element in sideboxes for branches,.. */ |
| 406 | 409 | @ div.sideboxDescribed { |
| 407 | 410 | @ display: inline; |
| 408 | 411 | @ font-weight: bold; |
| 409 | 412 | @ } |
| 413 | +@ |
| 410 | 414 | ; |
| 411 | 415 | const char zSpanDisabled[] = |
| 412 | 416 | @ /* The defined element in sideboxes for branches,.. */ |
| 413 | 417 | @ span.disabled { |
| 414 | 418 | @ color: red; |
| 415 | 419 | @ } |
| 420 | +@ |
| 421 | +; |
| 422 | +const char zSpanTimelineSuppressed[] = |
| 423 | +@ /* The suppressed duplicates lines in timeline, .. */ |
| 424 | +@ span.timelineDisabled { |
| 425 | +@ font-style: italic; |
| 426 | +@ font-size: small; |
| 427 | +@ } |
| 428 | +@ |
| 416 | 429 | ; |
| 430 | +typedef enum cssDefaultItems { |
| 431 | + cssOthers = 0, |
| 432 | + tableLabelValue, |
| 433 | + divSidebox, |
| 434 | + divSideboxTitle, |
| 435 | + divSideboxDescribed, |
| 436 | + spanDisabled, |
| 437 | + spanTimelineSuppressed, |
| 438 | + cssDefaultCount |
| 439 | +}; |
| 440 | +const struct strctCssDefaults { |
| 441 | + char const * const name; |
| 442 | + char const * const value; |
| 443 | +} cssDefaultList[cssDefaultCount] = { |
| 444 | + { "", zDefaultCSS }, |
| 445 | + { "table.label-value", zTableLabelValueCSS }, |
| 446 | + { "div.sidebox", zDivSidebox }, |
| 447 | + { "div.sideboxTitle", zDivSideboxTitle }, |
| 448 | + { "div.sideboxDescribed", zDivSideboxDescribed }, |
| 449 | + { "span.disabled", zSpanDisabled }, |
| 450 | + { "span.timelineDisabled", zSpanTimelineSuppressed } |
| 451 | +}; |
| 452 | + |
| 453 | +void cgi_append_default_css(void) { |
| 454 | + enum cssDefaultItems i; |
| 455 | + |
| 456 | + for (i=cssOthers;i<cssDefaultCount;i++) |
| 457 | + cgi_printf(cssDefaultList[i].value); |
| 458 | +} |
| 417 | 459 | |
| 418 | 460 | /* |
| 419 | 461 | ** WEBPAGE: style.css |
| 420 | 462 | */ |
| 421 | 463 | void page_style_css(void){ |
| 422 | 464 | const char *zCSS = 0; |
| 423 | 465 | const char *zCSSdef = 0; |
| 466 | + enum cssDefaultItems i; |
| 424 | 467 | |
| 425 | 468 | cgi_set_content_type("text/css"); |
| 426 | 469 | zCSS = db_get("css",(char*)zDefaultCSS); |
| 427 | 470 | /* append user defined css */ |
| 428 | 471 | cgi_append_content(zCSS, -1); |
| 429 | 472 | /* add special missing definitions */ |
| 430 | | - if (!strstr("table.label-value",zCSS)) cgi_append_content(zTableLabelValueCSS, -1); |
| 431 | | - if (!strstr("div.sidebox",zCSS)) cgi_append_content(zDivSidebox, -1); |
| 432 | | - if (!strstr("div.sideboxTitle",zCSS)) cgi_append_content(zDivSideboxTitle, -1); |
| 433 | | - if (!strstr("div.sideboxDescribed",zCSS)) cgi_append_content(zDivSideboxDescribed, -1); |
| 434 | | - if (!strstr("span.disabled",zCSS)) cgi_append_content(zSpanDisabled, -1); |
| 473 | + for (i=cssOthers+1;i<cssDefaultCount;i++) |
| 474 | + if (!strstr(zCSS,cssDefaultList[i].name)) |
| 475 | + cgi_append_content(cssDefaultList[i].value, -1); |
| 435 | 476 | g.isConst = 1; |
| 436 | 477 | } |
| 437 | 478 | |
| 438 | 479 | /* |
| 439 | 480 | ** WEBPAGE: test_env |
| 440 | 481 | |