r16962 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r16961‎ | r16962 | r16963 >
Date:08:01, 12 October 2006
Author:simetrical
Status:old
Tags:
Comment:
* (bug 4525) Move section links down to same level as headings (editsection links are now inside the h# elements)
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)
  • /trunk/phase3/skins/chick/main.css (modified) (history)
  • /trunk/phase3/skins/common/cologneblue.css (modified) (history)
  • /trunk/phase3/skins/common/common.css (modified) (history)
  • /trunk/phase3/skins/common/commonPrint.css (modified) (history)
  • /trunk/phase3/skins/common/common_rtl.css (modified) (history)
  • /trunk/phase3/skins/common/wikistandard.css (modified) (history)
  • /trunk/phase3/skins/monobook/main.css (modified) (history)
  • /trunk/phase3/skins/monobook/rtl.css (modified) (history)
  • /trunk/phase3/skins/simple/main.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/chick/main.css
@@ -50,16 +50,26 @@
5151 padding-bottom: 0.17em;
5252 border-bottom: 1px solid #aaaaaa;
5353 }
 54+.editsection {
 55+ font-weight: normal;
 56+ float: right;
 57+ margin-left: 5px;
 58+}
5459 h1 { font-size: 188%; }
 60+h1 .editsection { font-size: 53.2%; }
5561 h2 { font-size: 150%; }
 62+h2 .editsection { font-size: 66.7%; }
5663 h3, h4, h5, h6 {
5764 border-bottom: none;
5865 font-weight: bold;
5966 }
6067 h3 { font-size: 132%; }
 68+h3 .editsection { font-size: 75.8%; }
6169 h4 { font-size: 116%; }
 70+h4 .editsection { font-size: 86.2%; }
6271 h5 { font-size: 100%; }
6372 h6 { font-size: 80%; }
 73+h6 .editsection { font-size: 125%; }
6474
6575 ul {
6676 line-height: 1.5em;
Index: trunk/phase3/skins/monobook/rtl.css
@@ -41,7 +41,7 @@
4242 float: right;
4343 clear: right;
4444 }
45 -div.editsection {
 45+.editsection {
4646 float: left;
4747 margin-right: 5px;
4848 }
Index: trunk/phase3/skins/monobook/main.css
@@ -119,17 +119,23 @@
120120 border-bottom: 1px solid #aaa;
121121 }
122122 h1 { font-size: 188%; }
 123+h1 .editsection { font-size: 53%; }
123124 h2 { font-size: 150%; }
 125+h2 .editsection { font-size: 67%; }
124126 h3, h4, h5, h6 {
125127 border-bottom: none;
126128 font-weight: bold;
127129 }
128130 h3 { font-size: 132%; }
 131+h3 .editsection { font-size: 76%; font-weight: normal; }
129132 h4 { font-size: 116%; }
 133+h4 .editsection { font-size: 86%; font-weight: normal; }
130134 h5 { font-size: 100%; }
 135+h5 .editsection { font-weight: normal; }
131136 h6 { font-size: 80%; }
 137+h6 .editsection { font-size: 125%; font-weight: normal; }
132138
133 -div.editsection {
 139+.editsection {
134140 float: right;
135141 margin-left: 5px;
136142 }
Index: trunk/phase3/skins/common/common.css
@@ -2,6 +2,31 @@
33 * common.css
44 * This file contains CSS settings common to Wikistandard, Nostalgia and CologneBlue
55 */
 6+
 7+/* For clarity, explicitly state some recommendations from <http://www.w3.org/
 8+ TR/CSS21/sample.html> to make sure the editsection links scale right */
 9+
 10+h1 { font-size: 2em; }
 11+h2 { font-size: 1.5em; }
 12+h3 { font-size: 1.17em; }
 13+h5 { font-size: .83em; }
 14+h6 { font-size: .75em; }
 15+h1, h2, h3, h4, h5, h6 { font-weight: bolder }
 16+
 17+/* Now the custom parts */
 18+
 19+/* Make edit sections (which are inside h# tags) normal-sized */
 20+.editsection {
 21+ font-weight: normal;
 22+ float: right;
 23+ margin-left: 5px;
 24+}
 25+h1 .editsection { font-size: 50% }
 26+h2 .editsection { font-size: 66.7% }
 27+h3 .editsection { font-size: 85.5% }
 28+h5 .editsection { font-size: 120% }
 29+h6 .editsection { font-size: 133% }
 30+
631 #footer { clear: both }
732 /* images */
833 div.floatright { float: right; margin: 0 0 1em 1em; }
@@ -314,11 +339,6 @@
315340 font-style: italic;
316341 }
317342
318 -div.editsection {
319 - float: right;
320 - margin-left: 5px;
321 -}
322 -
323343 /* Classes for EXIF data display */
324344 table.mw_metadata {
325345 margin-left: 0.5em;
Index: trunk/phase3/skins/common/cologneblue.css
@@ -78,8 +78,9 @@
7979 h1 {
8080 color: #666666;
8181 font-family: Verdana, Arial, sans-serif;
82 - font-size: 18pt; font-weight: bold; line-height: 21pt;
 82+ font-size: 180%; line-height: 21pt;
8383 }
 84+h1 .editsection { font-size: 55.6%; }
8485 h1.pagetitle { padding-bottom: 0; margin-bottom: 0; }
8586 #article p.subtitle {
8687 color: #666666; font-size: 11pt; font-weight: bold;
Index: trunk/phase3/skins/common/commonPrint.css
@@ -130,8 +130,11 @@
131131
132132 h1, h2, h3, h4, h5, h6
133133 {
134 - font-weight: bold;
 134+ font-weight: bold;
135135 }
 136+.editsection {
 137+ font-weight: normal;
 138+}
136139
137140 p, .documentDescription {
138141 margin: 1em 0 ! important;
Index: trunk/phase3/skins/common/common_rtl.css
@@ -13,7 +13,7 @@
1414 margin-right: 1.4em;
1515 margin-left: 0.4em;
1616 }
17 -div.editsection {
 17+.editsection {
1818 float: left;
1919 margin-right: 5px;
2020 }
\ No newline at end of file
Index: trunk/phase3/skins/common/wikistandard.css
@@ -29,12 +29,18 @@
3030
3131 h1.pagetitle { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0;
3232 font-size:150%; }
 33+h1.pagetitle .editsection { font-size: 66.7%; }
3334 h2 { font-size: 120%; }
 35+h2 .editsection { font-size: 83.3%; }
3436 h2, h3, h4, h5, h6 { margin-bottom: 0;}
3537 h3 { font-size: 106.25%; }
 38+h3 .editsection { font-size: 94.1%; }
3639 h4 { font-size: 103.125%; }
 40+h4 .editsection { font-size: 97.0%; }
3741 h5 { font-size: 100%; }
 42+h5 .editsection { font-size: 100%; }
3843 h6 { font-size: 95%; }
 44+h6 .editsection { font-size: 105.3%; }
3945 hr.sep { color:gray;height:1px;background-color:gray;}
4046 p.subpages { font-size:small;}
4147 p.subtitle { padding-top: 0; margin-top: 0;}
Index: trunk/phase3/skins/simple/main.css
@@ -1,3 +1,29 @@
 2+/* For clarity, explicitly state some recommendations from <http://www.w3.org/
 3+ TR/CSS21/sample.html> to make sure the editsection links scale right */
 4+
 5+h1 { font-size: 2em; }
 6+h2 { font-size: 1.5em; }
 7+h3 { font-size: 1.17em; }
 8+h5 { font-size: .83em; }
 9+h6 { font-size: .75em; }
 10+h1, h2, h3, h4, h5, h6 { font-weight: bolder }
 11+
 12+/* Now the custom parts */
 13+
 14+/* Make edit sections (which are inside h# tags) normal-sized
 15+ and otherwise format */
 16+.editsection {
 17+ font-weight: normal;
 18+ float: right;
 19+ margin-left: 5px;
 20+}
 21+h1 .editsection { font-size: 50% }
 22+h2 .editsection { font-size: 66.7% }
 23+h3 .editsection { font-size: 85.5% }
 24+h5 .editsection { font-size: 120% }
 25+h6 .editsection { font-size: 133% }
 26+
 27+
228 #toolbar {
329 display: none;
430 }
Index: trunk/phase3/includes/Linker.php
@@ -1046,11 +1046,11 @@
10471047 $editurl = '&section='.$section;
10481048 $url = $this->makeKnownLinkObj( $title, wfMsg('editsection'), 'action=edit'.$editurl );
10491049
1050 - return "<div class=\"editsection\">[".$url."]</div>";
 1050+ return "<span class=\"editsection\">[".$url."]</span>";
10511051
10521052 }
10531053
1054 - /**
 1054+ /**
10551055 * @param $title Title object.
10561056 * @param $section Integer: section number.
10571057 * @param $hint Link String: title, or default if omitted or empty
@@ -1062,7 +1062,7 @@
10631063 $hint = ( $hint=='' ) ? '' : ' title="' . wfMsgHtml( 'editsectionhint', htmlspecialchars( $hint ) ) . '"';
10641064 $url = $this->makeKnownLinkObj( $nt, wfMsg('editsection'), 'action=edit'.$editurl, '', '', '', $hint );
10651065
1066 - return "<div class=\"editsection\">[".$url."]</div>";
 1066+ return "<span class=\"editsection\">[".$url."]</span>";
10671067 }
10681068
10691069 /**
Index: trunk/phase3/includes/Parser.php
@@ -3501,6 +3501,9 @@
35023502 if( $enoughToc && ( !isset($wgMaxTocLevel) || $toclevel<$wgMaxTocLevel ) ) {
35033503 $toc .= $sk->tocLine($anchor, $tocline, $numbering, $toclevel);
35043504 }
 3505+ # give headline the correct <h#> tag
 3506+ @$head[$headlineCount] .= "<a name=\"$anchor\"></a><h".$level.$matches[2][$headlineCount];
 3507+
35053508 if( $showEditLink && ( !$istemplate || $templatetitle !== "" ) ) {
35063509 if ( empty( $head[$headlineCount] ) ) {
35073510 $head[$headlineCount] = '';
@@ -3510,10 +3513,8 @@
35113514 else
35123515 $head[$headlineCount] .= $sk->editSectionLink($this->mTitle, $sectionCount+1, $headline_hint);
35133516 }
 3517+ $head[$headlineCount] .= $headline.'</h'.$level.'>';
35143518
3515 - # give headline the correct <h#> tag
3516 - @$head[$headlineCount] .= "<a name=\"$anchor\"></a><h".$level.$matches[2][$headlineCount] .$headline.'</h'.$level.'>';
3517 -
35183519 $headlineCount++;
35193520 if( !$istemplate )
35203521 $sectionCount++;
Index: trunk/phase3/RELEASE-NOTES
@@ -42,6 +42,8 @@
4343 * (bug 6918) Stopped borders and backgrounds from showing through floated
4444 tables in Monobook
4545 * (bug 6868) Un-hardcode section edit link style
 46+* (bug 4525) Move section links down to same level as headings (editsection
 47+ links are now inside the h# elements)
4648
4749 == Languages updated ==
4850

Follow-up revisions

RevisionCommit summaryAuthorDate
r17078* (bug 4525) Move section links down visually to same level as headings edits...simetrical06:53, 18 October 2006