Index: branches/wmf/1.18wmf1/extensions/CongressLookup/CongressLookup.php |
— | — | @@ -48,6 +48,11 @@ |
49 | 49 | // Where to report errors (special page) |
50 | 50 | $wgCongressLookupErrorPage = 'CongressFail'; |
51 | 51 | |
| 52 | +/** |
| 53 | + * Use black-on-white style or white-on-black |
| 54 | + * @var bool True = black on white style |
| 55 | + */ |
| 56 | +$wgCongressLookupBlackOnWhite = false; |
52 | 57 | |
53 | 58 | $dir = dirname( __FILE__ ) . '/'; |
54 | 59 | |
Index: branches/wmf/1.18wmf1/extensions/CongressLookup/SpecialCongressLookup.php |
— | — | @@ -50,114 +50,9 @@ |
51 | 51 | $htmlOut .= <<<HTML |
52 | 52 | <!DOCTYPE html> |
53 | 53 | <html lang="en" dir="ltr" class="client-nojs"> |
54 | | -<head> |
55 | | -<title>Wikipedia, the free encyclopedia</title> |
56 | | -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
57 | | -<meta http-equiv="Content-Style-Type" content="text/css" /> |
58 | | -<meta name="generator" content="MediaWiki 1.18wmf1" /> |
59 | | -<style type="text/css"> |
60 | | -body { |
61 | | - color: #dedede; |
62 | | - margin: 2em; |
63 | | - font-family:Times New Roman; |
64 | | - background: black url('//upload.wikimedia.org/wikipedia/commons/9/98/WP_SOPA_Splash_Full.jpg') no-repeat 0 0; |
65 | | -} |
66 | | -h3{ |
67 | | - font-size: 1.5em; |
68 | | - text-align:center; |
69 | | - margin-bottom: 0.5em; |
70 | | - color: #ffffff; |
71 | | - font-weight: bold; |
72 | | -} |
73 | | - |
74 | | -h4 { |
75 | | - font-weight: bold; |
76 | | - color: #ffffff; |
77 | | -} |
78 | | -a:link, a:visited { |
79 | | - color: #dedede; |
80 | | -} |
81 | | -a:hover, a:active { |
82 | | - color: #ffffff; |
83 | | -} |
84 | | -div#everything { |
85 | | - width: 920px; |
86 | | - margin: 0 auto; |
87 | | -} |
88 | | -div#instructions { |
89 | | - position: absolute; |
90 | | - top: 67px; |
91 | | - left: 480px; |
92 | | - text-align: left; |
93 | | - width: 500px; |
94 | | - padding-bottom: 30px; |
95 | | -} |
96 | | -div#instructions p { |
97 | | - text-align:justify; |
98 | | -} |
99 | | -div#contacts { |
100 | | - position: absolute; |
101 | | - top: 50px; |
102 | | - left: 80px; |
103 | | - width: 320px; |
104 | | - background-color: #161616; |
105 | | - padding: 5px 20px 20px 20px; |
106 | | - filter:alpha(opacity=90); |
107 | | - -moz-opacity:0.90; |
108 | | - -khtml-opacity: 0.90; |
109 | | - opacity: 0.90; |
110 | | -} |
111 | | -div#contacts form { |
112 | | - margin-bottom: 1em; |
113 | | -} |
114 | | -table.person { |
115 | | - margin-bottom: 1em; |
116 | | - margin-left: 20px; |
117 | | - border: none; |
118 | | -} |
119 | | -table.person td.name { |
120 | | - font-weight: bold; |
121 | | -} |
122 | | -p { |
123 | | - margin: 1em 0; |
124 | | -} |
125 | | -p.quote { |
126 | | - font-family: georgia, serif; |
127 | | - font-size: 14px; |
128 | | - color: #cccccc; |
129 | | - margin-left: 20px; |
130 | | -} |
131 | | -p.note { |
132 | | - margin-top: 0; |
133 | | -} |
134 | | -h3 { |
135 | | - font-weight: normal; |
136 | | - font-size: 20px; |
137 | | -} |
138 | | -h4 { |
139 | | - font-weight: normal; |
140 | | - font-size: 17px; |
141 | | -} |
142 | | -.sopaBigHeadline { |
143 | | - font-size: 1.5em; |
144 | | - margin-bottom: 0.5em; |
145 | | -} |
146 | | -.sopaSectionHeadline { |
147 | | - font-size: 1.2em; |
148 | | - margin-bottom: 0.2em; |
149 | | -} |
150 | | -.sopaSocial { |
151 | | - float: left; |
152 | | - text-align: center; |
153 | | - margin-right: 12px; |
154 | | - margin-bttom: 3px; |
155 | | - font-size: small; |
156 | | -} |
157 | | -.sopaActionHead { |
158 | | - font-weight: bold |
159 | | -} |
160 | | -</style> |
161 | | -</head> |
| 54 | +HTML; |
| 55 | + $htmlOut .= $this->getHtmlHead(); |
| 56 | + $htmlOut .= <<<HTML |
162 | 57 | <body> |
163 | 58 | <div id="everything"> |
164 | 59 | <div id="instructions"> |
— | — | @@ -446,4 +341,243 @@ |
447 | 342 | |
448 | 343 | return true; |
449 | 344 | } |
| 345 | + |
| 346 | + public function getHtmlHead() { |
| 347 | + global $wgCongressLookupBlackOnWhite; |
| 348 | + |
| 349 | + if ( $wgCongressLookupBlackOnWhite ) { |
| 350 | + $html_head = <<<HTML |
| 351 | +<head> |
| 352 | +<title>Wikipedia, the free encyclopedia</title> |
| 353 | +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 354 | +<meta http-equiv="Content-Style-Type" content="text/css" /> |
| 355 | +<meta name="generator" content="MediaWiki 1.18wmf1" /> |
| 356 | +<style type="text/css"> |
| 357 | +body { |
| 358 | + /*color: #dedede;*/ |
| 359 | + color: #343434; |
| 360 | + margin: 2em; |
| 361 | + font-family:Times New Roman; |
| 362 | + background: white url('//upload.wikimedia.org/wikipedia/commons/0/03/POSTSOPA_Landing_W-2.jpg') no-repeat 0 0; |
450 | 363 | } |
| 364 | +h3{ |
| 365 | + font-size: 1.5em; |
| 366 | + text-align:center; |
| 367 | + margin-bottom: 0.5em; |
| 368 | + /*color: #ffffff;*/ |
| 369 | + color: #000000; |
| 370 | + font-weight: bold; |
| 371 | +} |
| 372 | + |
| 373 | +h4 { |
| 374 | + font-weight: bold; |
| 375 | + /*color: #ffffff;*/ |
| 376 | + color: #000000; |
| 377 | +} |
| 378 | +a:link, a:visited { |
| 379 | + /*color: #dedede;*/ |
| 380 | + color: #343434; |
| 381 | +} |
| 382 | +a:hover, a:active { |
| 383 | + /*color: #ffffff;*/ |
| 384 | + color: #000000; |
| 385 | +} |
| 386 | +div#everything { |
| 387 | + width: 920px; |
| 388 | + margin: 0 auto; |
| 389 | +} |
| 390 | +div#instructions { |
| 391 | + position: absolute; |
| 392 | + top: 67px; |
| 393 | + left: 480px; |
| 394 | + text-align: left; |
| 395 | + width: 500px; |
| 396 | + padding-bottom: 30px; |
| 397 | +} |
| 398 | +div#instructions p { |
| 399 | + text-align:justify; |
| 400 | +} |
| 401 | +div#contacts { |
| 402 | + position: absolute; |
| 403 | + top: 50px; |
| 404 | + left: 80px; |
| 405 | + width: 320px; |
| 406 | + background-color: #161616; |
| 407 | + padding: 5px 20px 20px 20px; |
| 408 | + filter:alpha(opacity=90); |
| 409 | + -moz-opacity:0.90; |
| 410 | + -khtml-opacity: 0.90; |
| 411 | + opacity: 0.90; |
| 412 | + color: #ffffff; |
| 413 | +} |
| 414 | +div#contacts h4 { |
| 415 | + color: #ffffff; |
| 416 | +} |
| 417 | +div#contacts form { |
| 418 | + margin-bottom: 1em; |
| 419 | +} |
| 420 | +table.person { |
| 421 | + margin-bottom: 1em; |
| 422 | + margin-left: 20px; |
| 423 | + border: none; |
| 424 | +} |
| 425 | +table.person td.name { |
| 426 | + font-weight: bold; |
| 427 | +} |
| 428 | +p { |
| 429 | + margin: 1em 0; |
| 430 | +} |
| 431 | +p.quote { |
| 432 | + font-family: georgia, serif; |
| 433 | + font-size: 14px; |
| 434 | + color: #cccccc; |
| 435 | + margin-left: 20px; |
| 436 | +} |
| 437 | +p.note { |
| 438 | + margin-top: 0; |
| 439 | +} |
| 440 | +h3 { |
| 441 | + font-weight: normal; |
| 442 | + font-size: 20px; |
| 443 | +} |
| 444 | +h4 { |
| 445 | + font-weight: normal; |
| 446 | + font-size: 17px; |
| 447 | +} |
| 448 | +.sopaBigHeadline { |
| 449 | + font-size: 1.5em; |
| 450 | + margin-bottom: 0.5em; |
| 451 | +} |
| 452 | +.sopaSectionHeadline { |
| 453 | + font-size: 1.2em; |
| 454 | + margin-bottom: 0.2em; |
| 455 | +} |
| 456 | +.sopaSocial { |
| 457 | + float: left; |
| 458 | + text-align: center; |
| 459 | + margin-right: 12px; |
| 460 | + margin-bttom: 3px; |
| 461 | + font-size: small; |
| 462 | +} |
| 463 | +.sopaActionHead { |
| 464 | + font-weight: bold |
| 465 | +} |
| 466 | +</style> |
| 467 | +</head> |
| 468 | +HTML; |
| 469 | + } else { |
| 470 | + $html_head = <<<HTML |
| 471 | +<head> |
| 472 | +<title>Wikipedia, the free encyclopedia</title> |
| 473 | +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 474 | +<meta http-equiv="Content-Style-Type" content="text/css" /> |
| 475 | +<meta name="generator" content="MediaWiki 1.18wmf1" /> |
| 476 | +<style type="text/css"> |
| 477 | +body { |
| 478 | + color: #dedede; |
| 479 | + margin: 2em; |
| 480 | + font-family:Times New Roman; |
| 481 | + background: black url('//upload.wikimedia.org/wikipedia/commons/9/98/WP_SOPA_Splash_Full.jpg') no-repeat 0 0; |
| 482 | +} |
| 483 | +h3{ |
| 484 | + font-size: 1.5em; |
| 485 | + text-align:center; |
| 486 | + margin-bottom: 0.5em; |
| 487 | + color: #ffffff; |
| 488 | + font-weight: bold; |
| 489 | +} |
| 490 | + |
| 491 | +h4 { |
| 492 | + font-weight: bold; |
| 493 | + color: #ffffff; |
| 494 | +} |
| 495 | +a:link, a:visited { |
| 496 | + color: #dedede; |
| 497 | +} |
| 498 | +a:hover, a:active { |
| 499 | + color: #ffffff; |
| 500 | +} |
| 501 | +div#everything { |
| 502 | + width: 920px; |
| 503 | + margin: 0 auto; |
| 504 | +} |
| 505 | +div#instructions { |
| 506 | + position: absolute; |
| 507 | + top: 67px; |
| 508 | + left: 480px; |
| 509 | + text-align: left; |
| 510 | + width: 500px; |
| 511 | + padding-bottom: 30px; |
| 512 | +} |
| 513 | +div#instructions p { |
| 514 | + text-align:justify; |
| 515 | +} |
| 516 | +div#contacts { |
| 517 | + position: absolute; |
| 518 | + top: 50px; |
| 519 | + left: 80px; |
| 520 | + width: 320px; |
| 521 | + background-color: #161616; |
| 522 | + padding: 5px 20px 20px 20px; |
| 523 | + filter:alpha(opacity=90); |
| 524 | + -moz-opacity:0.90; |
| 525 | + -khtml-opacity: 0.90; |
| 526 | + opacity: 0.90; |
| 527 | +} |
| 528 | +div#contacts form { |
| 529 | + margin-bottom: 1em; |
| 530 | +} |
| 531 | +table.person { |
| 532 | + margin-bottom: 1em; |
| 533 | + margin-left: 20px; |
| 534 | + border: none; |
| 535 | +} |
| 536 | +table.person td.name { |
| 537 | + font-weight: bold; |
| 538 | +} |
| 539 | +p { |
| 540 | + margin: 1em 0; |
| 541 | +} |
| 542 | +p.quote { |
| 543 | + font-family: georgia, serif; |
| 544 | + font-size: 14px; |
| 545 | + color: #cccccc; |
| 546 | + margin-left: 20px; |
| 547 | +} |
| 548 | +p.note { |
| 549 | + margin-top: 0; |
| 550 | +} |
| 551 | +h3 { |
| 552 | + font-weight: normal; |
| 553 | + font-size: 20px; |
| 554 | +} |
| 555 | +h4 { |
| 556 | + font-weight: normal; |
| 557 | + font-size: 17px; |
| 558 | +} |
| 559 | +.sopaBigHeadline { |
| 560 | + font-size: 1.5em; |
| 561 | + margin-bottom: 0.5em; |
| 562 | +} |
| 563 | +.sopaSectionHeadline { |
| 564 | + font-size: 1.2em; |
| 565 | + margin-bottom: 0.2em; |
| 566 | +} |
| 567 | +.sopaSocial { |
| 568 | + float: left; |
| 569 | + text-align: center; |
| 570 | + margin-right: 12px; |
| 571 | + margin-bttom: 3px; |
| 572 | + font-size: small; |
| 573 | +} |
| 574 | +.sopaActionHead { |
| 575 | + font-weight: bold |
| 576 | +} |
| 577 | +</style> |
| 578 | +</head> |
| 579 | +HTML; |
| 580 | + } |
| 581 | + |
| 582 | + return $html_head; |
| 583 | + } |
| 584 | +} |
Property changes on: branches/wmf/1.18wmf1/extensions/CongressLookup/SpecialCongressLookup.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
451 | 585 | Merged /trunk/extensions/CongressLookup/SpecialCongressLookup.php:r109483 |
Property changes on: branches/wmf/1.18wmf1/extensions/CongressLookup |
___________________________________________________________________ |
Modified: svn:mergeinfo |
452 | 586 | Merged /trunk/extensions/CongressLookup:r109483 |