| | @@ -373,214 +373,184 @@ |
| 373 | 373 | @ div.footer a { color: white; } |
| 374 | 374 | @ div.footer a:link { color: white; } |
| 375 | 375 | @ div.footer a:visited { color: white; } |
| 376 | 376 | @ div.footer a:hover { background-color: white; color: #558195; } |
| 377 | 377 | @ |
| 378 | | -@ /* <verbatim> blocks */ |
| 378 | +@ /* verbatim blocks */ |
| 379 | 379 | @ pre.verbatim { |
| 380 | 380 | @ background-color: #f5f5f5; |
| 381 | 381 | @ padding: 0.5em; |
| 382 | 382 | @} |
| 383 | 383 | @ |
| 384 | | -; |
| 385 | | -const char zTableLabelValueCSS[] = |
| 386 | 384 | @ /* The label/value pairs on (for example) the ci page */ |
| 387 | 385 | @ table.label-value th { |
| 388 | 386 | @ vertical-align: top; |
| 389 | 387 | @ text-align: right; |
| 390 | 388 | @ padding: 0.2ex 2ex; |
| 391 | 389 | @ } |
| 392 | 390 | @ |
| 393 | | -; |
| 394 | | -const char zDivSidebox[] = |
| 395 | | -@ /* The nomenclature sidebox for branches,.. */ |
| 396 | | -@ div.sidebox { |
| 397 | | -@ float: right; |
| 398 | | -@ background-color: white; |
| 399 | | -@ border-width: medium; |
| 400 | | -@ border-style: double; |
| 401 | | -@ margin: 10; |
| 402 | | -@ } |
| 403 | | -@ |
| 404 | | -; |
| 405 | | -const char zDivSideboxTitle[] = |
| 406 | | -@ /* The nomenclature title in sideboxes for branches,.. */ |
| 407 | | -@ div.sideboxTitle { |
| 408 | | -@ display: inline; |
| 409 | | -@ font-weight: bold; |
| 410 | | -@ } |
| 411 | | -@ |
| 412 | | -; |
| 413 | | -const char zDivSideboxDescribed[] = |
| 414 | | -@ /* The defined element in sideboxes for branches,.. */ |
| 415 | | -@ div.sideboxDescribed { |
| 416 | | -@ display: inline; |
| 417 | | -@ font-weight: bold; |
| 418 | | -@ } |
| 419 | | -@ |
| 420 | | -; |
| 421 | | -const char zSpanDisabled[] = |
| 422 | | -@ /* The defined element in sideboxes for branches,.. */ |
| 423 | | -@ span.disabled { |
| 424 | | -@ color: red; |
| 425 | | -@ } |
| 426 | | -@ |
| 427 | | -; |
| 428 | | -const char zSpanTimelineSuppressed[] = |
| 429 | | -@ /* The suppressed duplicates lines in timeline, .. */ |
| 430 | | -@ span.timelineDisabled { |
| 431 | | -@ font-style: italic; |
| 432 | | -@ font-size: small; |
| 433 | | -@ } |
| 434 | | -@ |
| 435 | | -; |
| 436 | | -const char zTableTimelineTable[] = |
| 437 | | -@ /* the format for the timeline data table */ |
| 438 | | -@ table.timelineTable { |
| 439 | | -@ cellspacing: 0; |
| 440 | | -@ border: 0; |
| 441 | | -@ cellpadding: 0 |
| 442 | | -@ } |
| 443 | | -@ |
| 444 | | -; |
| 445 | | -const char zTdTimelineTableCell[] = |
| 446 | | -@ /* the format for the timeline data cells */ |
| 447 | | -@ td.timelineTableCell { |
| 448 | | -@ valign: top; |
| 449 | | -@ align: left; |
| 450 | | -@ } |
| 451 | | -@ |
| 452 | | -; |
| 453 | | -const char zSpanTimelineLeaf[] = |
| 454 | | -@ /* the format for the timeline leaf marks */ |
| 455 | | -@ span.timelineLeaf { |
| 456 | | -@ font-weight: bold; |
| 457 | | -@ } |
| 458 | | -@ |
| 459 | | -; |
| 460 | | -const char zATimelineHistLink[] = |
| 461 | | -@ /* the format for the timeline version links */ |
| 462 | | -@ a.timelineHistLink { |
| 463 | | -@ } |
| 464 | | -@ |
| 465 | | -; |
| 466 | | -const char zSpanTimelineHistDsp[] = |
| 467 | | -@ /* the format for the timeline version display(no history permission!) */ |
| 468 | | -@ span.timelineHistDsp { |
| 469 | | -@ font-weight: bold; |
| 470 | | -@ } |
| 471 | | -@ |
| 472 | | -; |
| 473 | | -const char zTdTimelineTime[] = |
| 474 | | -@ /* the format for the timeline time display */ |
| 475 | | -@ td.timelineTime { |
| 476 | | -@ vertical-align: top; |
| 477 | | -@ text-align: right; |
| 478 | | -@ } |
| 479 | | -@ |
| 480 | | -; |
| 481 | | -const char zATagLink[] = |
| 482 | | -@ /* the format for the tag links */ |
| 483 | | -@ a.tagLink { |
| 484 | | -@ } |
| 485 | | -@ |
| 486 | | -; |
| 487 | | -const char zSpanTagDsp[] = |
| 488 | | -@ /* the format for the tag display(no history permission!) */ |
| 489 | | -@ span.tagDsp { |
| 490 | | -@ font-weight: bold; |
| 491 | | -@ } |
| 492 | | -@ |
| 493 | | -; |
| 494 | | -const char zSpanWikiError[] = |
| 495 | | -@ /* the format for wiki errors */ |
| 496 | | -@ span.wikiError { |
| 497 | | -@ font-weight: bold; |
| 498 | | -@ color: red; |
| 499 | | -@ } |
| 500 | | -@ |
| 501 | | -; |
| 502 | | -const char zSpanInfoTagCancelled[] = |
| 503 | | -@ /* the format for wiki errors */ |
| 504 | | -@ span.infoTagCancelled { |
| 505 | | -@ font-weight: bold; |
| 506 | | -@ text-decoration: line-through; |
| 507 | | -@ } |
| 508 | | -@ |
| 509 | | -; |
| 510 | | -const char zSpanInfoTag[] = |
| 511 | | -@ /* the format for wiki errors */ |
| 512 | | -@ span.infoTag { |
| 513 | | -@ font-weight: bold; |
| 514 | | -@ } |
| 515 | | -@ |
| 516 | | -; |
| 517 | | -const char zSpanWikiTagCancelled[] = |
| 518 | | -@ /* the format for wiki errors */ |
| 519 | | -@ span.wikiTagCancelled { |
| 520 | | -@ text-decoration: line-through; |
| 521 | | -@ } |
| 522 | | -@ |
| 523 | | -; |
| 524 | | -const char zTableBrowser[] = |
| 525 | | -@ /* the format for wiki errors */ |
| 526 | | -@ table.browser { |
| 527 | | -@ width: 100%%; |
| 528 | | -@ border: 0; |
| 529 | | -@ } |
| 530 | | -@ |
| 531 | | -; |
| 532 | | -const char zTdBrowser[] = |
| 533 | | -@ /* the format for wiki errors */ |
| 534 | | -@ td.browser { |
| 535 | | -@ width: 25%%; |
| 536 | | -@ vertical-align: top; |
| 537 | | -@ } |
| 538 | | -@ |
| 539 | | -; |
| 540 | | -const char zUlBrowser[] = |
| 541 | | -@ /* the format for wiki errors */ |
| 542 | | -@ ul.browser { |
| 543 | | -@ margin-left: 0.5em; |
| 544 | | -@ padding-left: 0.5em; |
| 545 | | -@ } |
| 546 | | -@ |
| 547 | 391 | ; |
| 548 | 392 | const struct strctCssDefaults { |
| 549 | | - char const * const name; |
| 393 | + char const * const elementClass; |
| 394 | + char const * const comment; |
| 550 | 395 | char const * const value; |
| 551 | 396 | } cssDefaultList[] = { |
| 552 | | - { "", zDefaultCSS }, |
| 553 | | - { "table.label-value", zTableLabelValueCSS }, |
| 554 | | - { "div.sidebox", zDivSidebox }, |
| 555 | | - { "div.sideboxTitle", zDivSideboxTitle }, |
| 556 | | - { "div.sideboxDescribed", zDivSideboxDescribed }, |
| 557 | | - { "span.disabled", zSpanDisabled }, |
| 558 | | - { "span.timelineDisabled", zSpanTimelineSuppressed }, |
| 559 | | - { "table.timelineTable", zTableTimelineTable }, |
| 560 | | - { "td.timelineTableCell", zTdTimelineTableCell }, |
| 561 | | - { "span.timelineLeaf", zSpanTimelineLeaf }, |
| 562 | | - { "a.timelineHistLink", zATimelineHistLink }, |
| 563 | | - { "span.timelineHistDsp", zSpanTimelineHistDsp }, |
| 564 | | - { "td.timelineTime", zTdTimelineTime }, |
| 565 | | - { "a.tagLink", zATagLink }, |
| 566 | | - { "span.tagDsp", zSpanTagDsp }, |
| 567 | | - { "span.wikiError", zSpanWikiError }, |
| 568 | | - { "span.infoTagCancelled", zSpanInfoTagCancelled }, |
| 569 | | - { "span.infoTag", zSpanInfoTag }, |
| 570 | | - { "span.wikiTagCancelled", zSpanWikiTagCancelled }, |
| 571 | | - { "table.browser", zTableBrowser }, |
| 572 | | - { "td.browser", zTdBrowser }, |
| 573 | | - { "ul.browser", zUlBrowser }, |
| 574 | | - { 0, 0 } |
| 397 | + { "", |
| 398 | + "", |
| 399 | + zDefaultCSS |
| 400 | + }, |
| 401 | + { "div.sidebox", |
| 402 | + "The nomenclature sidebox for branches,..", |
| 403 | + @ float: right; |
| 404 | + @ background-color: white; |
| 405 | + @ border-width: medium; |
| 406 | + @ border-style: double; |
| 407 | + @ margin: 10; |
| 408 | + }, |
| 409 | + { "div.sideboxTitle", |
| 410 | + "The nomenclature title in sideboxes for branches,..", |
| 411 | + @ display: inline; |
| 412 | + @ font-weight: bold; |
| 413 | + }, |
| 414 | + { "div.sideboxDescribed", |
| 415 | + "The defined element in sideboxes for branches,..", |
| 416 | + @ display: inline; |
| 417 | + @ font-weight: bold; |
| 418 | + }, |
| 419 | + { "span.disabled", |
| 420 | + "The defined element in sideboxes for branches,..", |
| 421 | + @ color: red; |
| 422 | + }, |
| 423 | + { "span.timelineDisabled", |
| 424 | + "The suppressed duplicates lines in timeline, ..", |
| 425 | + @ font-style: italic; |
| 426 | + @ font-size: small; |
| 427 | + }, |
| 428 | + { "table.timelineTable", |
| 429 | + "the format for the timeline data table", |
| 430 | + @ cellspacing: 0; |
| 431 | + @ border: 0; |
| 432 | + @ cellpadding: 0 |
| 433 | + }, |
| 434 | + { "td.timelineTableCell", |
| 435 | + "the format for the timeline data cells", |
| 436 | + @ valign: top; |
| 437 | + @ align: left; |
| 438 | + }, |
| 439 | + { "span.timelineLeaf", |
| 440 | + "the format for the timeline leaf marks", |
| 441 | + @ font-weight: bold; |
| 442 | + }, |
| 443 | + { "a.timelineHistLink", |
| 444 | + "the format for the timeline version links", |
| 445 | + @ |
| 446 | + }, |
| 447 | + { "span.timelineHistDsp", |
| 448 | + "the format for the timeline version display(no history permission!)", |
| 449 | + @ font-weight: bold; |
| 450 | + }, |
| 451 | + { "td.timelineTime", |
| 452 | + "the format for the timeline time display", |
| 453 | + @ vertical-align: top; |
| 454 | + @ text-align: right; |
| 455 | + }, |
| 456 | + { "a.tagLink", |
| 457 | + "the format for the tag links", |
| 458 | + @ |
| 459 | + }, |
| 460 | + { "span.tagDsp", |
| 461 | + "the format for the tag display(no history permission!)", |
| 462 | + @ font-weight: bold; |
| 463 | + }, |
| 464 | + { "span.wikiError", |
| 465 | + "the format for wiki errors", |
| 466 | + @ font-weight: bold; |
| 467 | + @ color: red; |
| 468 | + }, |
| 469 | + { "span.infoTagCancelled", |
| 470 | + "the format for fixed/canceled tags,..", |
| 471 | + @ font-weight: bold; |
| 472 | + @ text-decoration: line-through; |
| 473 | + }, |
| 474 | + { "span.infoTag", |
| 475 | + "the format for tags,..", |
| 476 | + @ font-weight: bold; |
| 477 | + }, |
| 478 | + { "span.wikiTagCancelled", |
| 479 | + "the format for fixed/cancelled tags,.. on wiki pages", |
| 480 | + @ text-decoration: line-through; |
| 481 | + }, |
| 482 | + { "table.browser", |
| 483 | + "format for the file display table", |
| 484 | + @ /* the format for wiki errors */ |
| 485 | + @ width: 100%%; |
| 486 | + @ border: 0; |
| 487 | + }, |
| 488 | + { "td.browser", |
| 489 | + "format for cells in the file browser", |
| 490 | + @ width: 25%%; |
| 491 | + @ vertical-align: top; |
| 492 | + }, |
| 493 | + { "ul.browser", |
| 494 | + "format for the list in the file browser", |
| 495 | + @ margin-left: 0.5em; |
| 496 | + @ padding-left: 0.5em; |
| 497 | + }, |
| 498 | + { "table.login_out", |
| 499 | + "table format for login/out label/input table", |
| 500 | + @ text-align: left; |
| 501 | + @ margin-right: 10px; |
| 502 | + @ margin-left: 10px; |
| 503 | + @ margin-top: 10px; |
| 504 | + }, |
| 505 | + { "div.captcha", |
| 506 | + "captcha display options", |
| 507 | + @ text-align: center; |
| 508 | + }, |
| 509 | + { "table.captcha", |
| 510 | + "format for the layout table, used for the captcha display", |
| 511 | + @ margin: auto; |
| 512 | + @ padding: 10px; |
| 513 | + @ outline-width: 1; |
| 514 | + @ outline-style: double; |
| 515 | + }, |
| 516 | + { "td.login_out_label", |
| 517 | + "format for the label cells in the login/out table", |
| 518 | + @ text-align: center; |
| 519 | + }, |
| 520 | + { "span.loginError", |
| 521 | + "format for login error messages", |
| 522 | + @ color: red; |
| 523 | + }, |
| 524 | + { "span.note", |
| 525 | + "format for leading text for notes", |
| 526 | + @ font-weight: bold; |
| 527 | + }, |
| 528 | + { "span.textareaLabel", |
| 529 | + "format for textare labels", |
| 530 | + @ font-weight: bold; |
| 531 | + }, |
| 532 | + { 0, |
| 533 | + 0, |
| 534 | + 0 |
| 535 | + } |
| 575 | 536 | }; |
| 576 | 537 | |
| 577 | 538 | void cgi_append_default_css(void) { |
| 578 | 539 | int i; |
| 579 | 540 | |
| 580 | | - for (i=0;cssDefaultList[i].name;i++) |
| 581 | | - cgi_printf(cssDefaultList[i].value); |
| 541 | + for (i=0;cssDefaultList[i].elementClass;i++) |
| 542 | + if (cssDefaultList[i].elementClass[0]) |
| 543 | + cgi_printf("/* %s */\n%s {\n%s\n}\n\n", |
| 544 | + cssDefaultList[i].comment, |
| 545 | + cssDefaultList[i].elementClass, |
| 546 | + cssDefaultList[i].value |
| 547 | + ); |
| 548 | + else |
| 549 | + cgi_printf("%s", |
| 550 | + cssDefaultList[i].value |
| 551 | + ); |
| 582 | 552 | } |
| 583 | 553 | |
| 584 | 554 | /* |
| 585 | 555 | ** WEBPAGE: style.css |
| 586 | 556 | */ |
| | @@ -592,13 +562,20 @@ |
| 592 | 562 | cgi_set_content_type("text/css"); |
| 593 | 563 | zCSS = db_get("css",(char*)zDefaultCSS); |
| 594 | 564 | /* append user defined css */ |
| 595 | 565 | cgi_append_content(zCSS, -1); |
| 596 | 566 | /* add special missing definitions */ |
| 597 | | - for (i=1;cssDefaultList[i].name;i++) |
| 598 | | - if (!strstr(zCSS,cssDefaultList[i].name)) |
| 567 | + for (i=1;cssDefaultList[i].elementClass;i++) |
| 568 | + if (!strstr(zCSS,cssDefaultList[i].elementClass)) { |
| 569 | + cgi_append_content("/* ", -1); |
| 570 | + cgi_append_content(cssDefaultList[i].comment, -1); |
| 571 | + cgi_append_content(" */\n", -1); |
| 572 | + cgi_append_content(cssDefaultList[i].elementClass, -1); |
| 573 | + cgi_append_content(" {\n", -1); |
| 599 | 574 | cgi_append_content(cssDefaultList[i].value, -1); |
| 575 | + cgi_append_content("}\n\n", -1); |
| 576 | + } |
| 600 | 577 | g.isConst = 1; |
| 601 | 578 | } |
| 602 | 579 | |
| 603 | 580 | /* |
| 604 | 581 | ** WEBPAGE: test_env |
| 605 | 582 | |