$toc .= $sk->tocLine($anchor, $tocline, $numbering, $toclevel);
}
# give headline the correct <h#> tag
- @$head[$headlineCount] .= "<a name=\"$anchor\"></a><div class=\"mw-h$level\">";
+ @$head[$headlineCount] .= "<a name=\"$anchor\"></a><h".$level.$matches[2][$headlineCount];
if( $showEditLink && ( !$istemplate || $templatetitle !== "" ) ) {
if ( empty( $head[$headlineCount] ) ) {
else
$head[$headlineCount] .= $sk->editSectionLink($this->mTitle, $sectionCount+1, $headline_hint);
}
- // Yes, the headline logically goes before the edit section. It can't
- // be put there, however, because of bugs in IE's and Firefox's float
- // rendering. See <https://bugzilla.mozilla.org/show_bug.cgi?id=50630>.
- $head[$headlineCount] .= " <h$level{$matches[2][$headlineCount]}$headline</h$level></div>";
+ // Yes, the headline logically goes before the edit section. Why isn't it there
+ // in source? Ask the CSS people. The float gets screwed up if you do that.
+ // This might be moved to before the editsection at some point so that it will
+ // display a bit more prettily without CSS, so please don't rely on the order.
+ $head[$headlineCount] .= ' <span class="mw-headline">'.$headline.'</span></h'.$level.'>';
$headlineCount++;
if( !$istemplate )
function pageTitle() {
global $wgOut;
- $s = '<div class="mw-h1 mw-first-heading"><h1 class="pagetitle">' . htmlspecialchars( $wgOut->getPageTitle() ) . '</h1></div>';
+ $s = '<h1 class="pagetitle">' . htmlspecialchars( $wgOut->getPageTitle() ) . '</h1>';
return $s;
}
===Smaller headline===
Blah blah
!! result
-<a name="Headline_1"></a><div class="mw-h2"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</span> <h2> Headline 1 </h2></div>
+<a name="Headline_1"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</span> <span class="mw-headline"> Headline 1 </span></h2>
<p>Some text
</p>
-<a name="Headline_2"></a><div class="mw-h2"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Headline 2">edit</a>]</span> <h2>Headline 2</h2></div>
+<a name="Headline_2"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Headline 2">edit</a>]</span> <span class="mw-headline">Headline 2</span></h2>
<p>More
</p>
-<a name="Smaller_headline"></a><div class="mw-h3"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Smaller headline">edit</a>]</span> <h3>Smaller headline</h3></div>
+<a name="Smaller_headline"></a><h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Smaller headline">edit</a>]</span> <span class="mw-headline">Smaller headline</span></h3>
<p>Blah blah
</p>
!! end
</li>
</ul>
</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
-<a name="Headline_1"></a><div class="mw-h2"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</span> <h2> Headline 1 </h2></div>
-<a name="Subheadline_1"></a><div class="mw-h3"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Subheadline 1">edit</a>]</span> <h3> Subheadline 1 </h3></div>
-<a name="Skipping_a_level"></a><div class="mw-h5"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Skipping a level">edit</a>]</span> <h5> Skipping a level </h5></div>
-<a name="Skipping_a_level_2"></a><div class="mw-h6"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Skipping a level">edit</a>]</span> <h6> Skipping a level </h6></div>
-<a name="Headline_2"></a><div class="mw-h2"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Headline 2">edit</a>]</span> <h2> Headline 2 </h2></div>
+<a name="Headline_1"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</span> <span class="mw-headline"> Headline 1 </span></h2>
+<a name="Subheadline_1"></a><h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Subheadline 1">edit</a>]</span> <span class="mw-headline"> Subheadline 1 </span></h3>
+<a name="Skipping_a_level"></a><h5><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Skipping a level">edit</a>]</span> <span class="mw-headline"> Skipping a level </span></h5>
+<a name="Skipping_a_level_2"></a><h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Skipping a level">edit</a>]</span> <span class="mw-headline"> Skipping a level </span></h6>
+<a name="Headline_2"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Headline 2">edit</a>]</span> <span class="mw-headline"> Headline 2 </span></h2>
<p>Some text
</p>
-<a name="Another_headline"></a><div class="mw-h3"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Another headline">edit</a>]</span> <h3>Another headline</h3></div>
+<a name="Another_headline"></a><h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Another headline">edit</a>]</span> <span class="mw-headline">Another headline</span></h3>
!! end
</li>
</ul>
</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
-<a name="Level_1_Heading"></a><div class="mw-h1"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Level 1 Heading">edit</a>]</span> <h1> Level 1 Heading</h1></div>
-<a name="Level_2_Heading"></a><div class="mw-h2"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Level 2 Heading">edit</a>]</span> <h2> Level 2 Heading</h2></div>
-<a name="Level_3_Heading"></a><div class="mw-h3"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Level 3 Heading">edit</a>]</span> <h3> Level 3 Heading</h3></div>
-<a name="Level_4_Heading"></a><div class="mw-h4"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Level 4 Heading">edit</a>]</span> <h4> Level 4 Heading</h4></div>
-<a name="Level_5_Heading"></a><div class="mw-h5"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Level 5 Heading">edit</a>]</span> <h5> Level 5 Heading</h5></div>
-<a name="Level_6_Heading"></a><div class="mw-h6"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Level 6 Heading">edit</a>]</span> <h6> Level 6 Heading</h6></div>
-<a name=".3D_Level_7_Heading.3D"></a><div class="mw-h6"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=7" title="Edit section: = Level 7 Heading=">edit</a>]</span> <h6>= Level 7 Heading=</h6></div>
-<a name=".3D.3D_Level_8_Heading.3D.3D"></a><div class="mw-h6"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=8" title="Edit section: == Level 8 Heading==">edit</a>]</span> <h6>== Level 8 Heading==</h6></div>
-<a name=".3D.3D.3D_Level_9_Heading.3D.3D.3D"></a><div class="mw-h6"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=9" title="Edit section: === Level 9 Heading===">edit</a>]</span> <h6>=== Level 9 Heading===</h6></div>
-<a name=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"></a><div class="mw-h6"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=10" title="Edit section: ==== Level 10 Heading====">edit</a>]</span> <h6>==== Level 10 Heading====</h6></div>
+<a name="Level_1_Heading"></a><h1><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Level 1 Heading">edit</a>]</span> <span class="mw-headline"> Level 1 Heading</span></h1>
+<a name="Level_2_Heading"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Level 2 Heading">edit</a>]</span> <span class="mw-headline"> Level 2 Heading</span></h2>
+<a name="Level_3_Heading"></a><h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Level 3 Heading">edit</a>]</span> <span class="mw-headline"> Level 3 Heading</span></h3>
+<a name="Level_4_Heading"></a><h4><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Level 4 Heading">edit</a>]</span> <span class="mw-headline"> Level 4 Heading</span></h4>
+<a name="Level_5_Heading"></a><h5><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Level 5 Heading">edit</a>]</span> <span class="mw-headline"> Level 5 Heading</span></h5>
+<a name="Level_6_Heading"></a><h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Level 6 Heading">edit</a>]</span> <span class="mw-headline"> Level 6 Heading</span></h6>
+<a name=".3D_Level_7_Heading.3D"></a><h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=7" title="Edit section: = Level 7 Heading=">edit</a>]</span> <span class="mw-headline">= Level 7 Heading=</span></h6>
+<a name=".3D.3D_Level_8_Heading.3D.3D"></a><h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=8" title="Edit section: == Level 8 Heading==">edit</a>]</span> <span class="mw-headline">== Level 8 Heading==</span></h6>
+<a name=".3D.3D.3D_Level_9_Heading.3D.3D.3D"></a><h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=9" title="Edit section: === Level 9 Heading===">edit</a>]</span> <span class="mw-headline">=== Level 9 Heading===</span></h6>
+<a name=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"></a><h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=10" title="Edit section: ==== Level 10 Heading====">edit</a>]</span> <span class="mw-headline">==== Level 10 Heading====</span></h6>
!! end
== Foo bar ==
== Foo bar ==
!! result
-<a name="Foo_bar"></a><div class="mw-h2"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a>]</span> <h2> Foo bar </h2></div>
-<a name="Foo_bar_2"></a><div class="mw-h2"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo bar">edit</a>]</span> <h2> Foo bar </h2></div>
+<a name="Foo_bar"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a>]</span> <span class="mw-headline"> Foo bar </span></h2>
+<a name="Foo_bar_2"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo bar">edit</a>]</span> <span class="mw-headline"> Foo bar </span></h2>
!! end
{{sections}}
==Section 4==
!! result
-<a name="Section_0"></a><div class="mw-h2"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 0">edit</a>]</span> <h2>Section 0</h2></div>
-<a name="Section_1"></a><div class="mw-h3"><span class="editsection">[<a href="/index.php?title=Template:Sections&action=edit&section=1" title="Template:Sections">edit</a>]</span> <h3>Section 1</h3></div>
-<a name="Section_2"></a><div class="mw-h2"><span class="editsection">[<a href="/index.php?title=Template:Sections&action=edit&section=2" title="Template:Sections">edit</a>]</span> <h2>Section 2</h2></div>
-<a name="Section_4"></a><div class="mw-h2"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 4">edit</a>]</span> <h2>Section 4</h2></div>
+<a name="Section_0"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 0">edit</a>]</span> <span class="mw-headline">Section 0</span></h2>
+<a name="Section_1"></a><h3><span class="editsection">[<a href="/index.php?title=Template:Sections&action=edit&section=1" title="Template:Sections">edit</a>]</span> <span class="mw-headline">Section 1</span></h3>
+<a name="Section_2"></a><h2><span class="editsection">[<a href="/index.php?title=Template:Sections&action=edit&section=2" title="Template:Sections">edit</a>]</span> <span class="mw-headline">Section 2</span></h2>
+<a name="Section_4"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 4">edit</a>]</span> <span class="mw-headline">Section 4</span></h2>
!! end
==Section 1==
==Section 2==
!! result
-<a name="Section_1"></a><div class="mw-h2"> <h2>Section 1</h2></div>
-<a name="Section_2"></a><div class="mw-h2"> <h2>Section 2</h2></div>
+<a name="Section_1"></a><h2> <span class="mw-headline">Section 1</span></h2>
+<a name="Section_2"></a><h2> <span class="mw-headline">Section 2</span></h2>
!! end
!! input
==Section with a [[Main Page|link]] in it==
!! result
-<a name="Section_with_a_link_in_it"></a><div class="mw-h2"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section with a link in it">edit</a>]</span> <h2>Section with a <a href="/wiki/Main_Page" title="Main Page">link</a> in it</h2></div>
+<a name="Section_with_a_link_in_it"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section with a link in it">edit</a>]</span> <span class="mw-headline">Section with a <a href="/wiki/Main_Page" title="Main Page">link</a> in it</span></h2>
!! end
== onmouseover= ==
http://__TOC__
!! result
-<a name="onmouseover.3D"></a><div class="mw-h2"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a>]</span> <h2> onmouseover= </h2></div>
+<a name="onmouseover.3D"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a>]</span> <span class="mw-headline"> onmouseover= </span></h2>
http://<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
==a==
{| STYLE=__TOC__
!! result
-<a name="a"></a><div class="mw-h2"><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a>]</span> <h2>a</h2></div>
+<a name="a"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a>]</span> <span class="mw-headline">a</span></h2>
<table style="__TOC__">
<tr><td></td></tr>
</table>
<div id="content">
<a name="top" id="top"></a>
<?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
- <div class="mw-h1 mw-first-heading"><h1 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1></div>
+ <h1 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1>
<div id="bodyContent">
<h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
<div id="contentSub"><?php $this->html('subtitle') ?></div>
font-family: Verdana, Arial, sans-serif;
font-size: 180%; line-height: 21pt;
}
-.mw-first-heading { padding-bottom: 0; margin-bottom: 0; }
+h1 .editsection { font-size: 55.6%; }
+h1.pagetitle { padding-bottom: 0; margin-bottom: 0; }
#article p.subtitle {
color: #666666; font-size: 11pt; font-weight: bold;
padding-top: 0; margin-top: 0; padding-bottom: 1ex;
a.printable { text-decoration: underline; }
a.stub, #quickbar a.stub { color:#772233; text-decoration:none; }
a.new, #quickbar a.new { color: #CC2200; }
-.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { margin-bottom: 0; }
+h2, h3, h4, h5, h6 { margin-bottom: 0; }
small { font-size: 75%; }
input.mw-searchInput { width: 106px; }
\ No newline at end of file
* This file contains CSS settings common to Wikistandard, Nostalgia and CologneBlue
*/
-/* Header margin values from <http://www.w3.org/TR/CSS21/sample.html>.
- Frankly they're quite stupid and I have no idea if they're actually used,
- but that's life. */
-.mw-h1 { margin: 1.33em 0 }
-.mw-h2 { margin: 1.25em 0 }
-.mw-h3 { margin: 0.97em 0 }
-.mw-h4 { margin: 1.12em 0 }
-.mw-h5 { margin: 1.25em 0 }
-.mw-h6 { margin: 1.25em 0 }
-h1, h2, h3, h4, h5, h6 { display: inline; padding: 0; margin: 0; }
+/* For clarity, explicitly state some recommendations from <http://www.w3.org/
+ TR/CSS21/sample.html> to make sure the editsection links scale right */
+h1 { font-size: 2em; }
+h2 { font-size: 1.5em; }
+h3 { font-size: 1.17em; }
+h5 { font-size: .83em; }
+h6 { font-size: .75em; }
+h1, h2, h3, h4, h5, h6 { font-weight: bolder }
+
+/* Now the custom parts */
+
+/* Make edit sections (which are inside h# tags) normal-sized */
.editsection {
+ font-weight: normal;
float: right;
margin-left: 5px;
}
+h1 .editsection { font-size: 50% }
+h2 .editsection { font-size: 66.7% }
+h3 .editsection { font-size: 85.5% }
+h5 .editsection { font-size: 120% }
+h6 .editsection { font-size: 133% }
#footer { clear: both }
/* images */
{
font-weight: bold;
}
+.editsection {
+ font-weight: normal;
+}
p, .documentDescription {
margin: 1em 0 ! important;
a.interwiki, a.external { color: #3366BB; }
a.printable { text-decoration: underline; }
a.stub { color:#772233; text-decoration:none; }
-.mw-first-heading { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0; }
-.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { margin-bottom: 0; }
+h1.pagetitle { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0; }
+h2, h3, h4, h5, h6 { margin-bottom: 0; }
textarea { overflow: auto; }
p.subtitle { padding-top: 0; margin-top: 0; }
textarea { overflow: auto; }
-.mw-first-heading { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0; }
-.mw-first-heading h1 { font-size: 1.5em; }
-.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { margin-bottom: 0;}
-h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; display: inline; }
+h1.pagetitle { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0;
+font-size:150%; }
+h1.pagetitle .editsection { font-size: 66.7%; }
h2 { font-size: 120%; }
+h2 .editsection { font-size: 83.3%; }
+h2, h3, h4, h5, h6 { margin-bottom: 0;}
h3 { font-size: 106.25%; }
+h3 .editsection { font-size: 94.1%; }
h4 { font-size: 103.125%; }
+h4 .editsection { font-size: 97.0%; }
h5 { font-size: 100%; }
+h5 .editsection { font-size: 100%; }
h6 { font-size: 95%; }
+h6 .editsection { font-size: 105.3%; }
hr.sep { color:gray;height:1px;background-color:gray;}
p.subpages { font-size:small;}
p.subtitle { padding-top: 0; margin-top: 0;}
}
h1, h2, h3, h4, h5, h6 {
- display: inline;
color: black;
background: none;
- margin: 0;
- padding: 0;
-}
-h1, h2 {
font-weight: normal;
+ margin: 0;
+ padding-top: .5em;
+ padding-bottom: .17em;
+ border-bottom: 1px solid #aaa;
}
h1 { font-size: 188%; }
+h1 .editsection { font-size: 53%; }
h2 { font-size: 150%; }
+h2 .editsection { font-size: 67%; }
+h3, h4, h5, h6 {
+ border-bottom: none;
+ font-weight: bold;
+}
h3 { font-size: 132%; }
+h3 .editsection { font-size: 76%; font-weight: normal; }
h4 { font-size: 116%; }
+h4 .editsection { font-size: 86%; font-weight: normal; }
h5 { font-size: 100%; }
+h5 .editsection { font-weight: normal; }
h6 { font-size: 80%; }
-.mw-h1 { padding-top: .94em; padding-bottom: .32em; }
-.mw-h2 { padding-top: .75em; padding-bottom: .26em; }
-.mw-h3 { padding-top: .66em; padding-bottom: .22em; }
-.mw-h4 { padding-top: .58em; padding-bottom: .20em; }
-.mw-h5 { padding-top: .50em; padding-bottom: .17em; }
-.mw-h6 { padding-top: .40em; padding-bottom: .14em; }
-.mw-h1, .mw-h2 { border-bottom: 1px solid #aaa; }
-.mw-first-heading { margin-bottom: .1em; }
+h6 .editsection { font-size: 125%; font-weight: normal; }
.editsection {
float: right;
#bodyContent h3, #bodyContent h4, #bodyContent h5 {
margin-bottom: .3em;
}
+.firstHeading {
+ margin-bottom: .1em;
+}
/* user notification thing */
.usermessage {