Commit d1c18ff2 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 1143502: Use structural HTML5 elements instead of <div>

r=dkl a=sgreen
parent fe75edaf
...@@ -16,6 +16,14 @@ ...@@ -16,6 +16,14 @@
font-family: Verdana, sans-serif; font-family: Verdana, sans-serif;
font-size: small; font-size: small;
} }
/* header and footer are required for IE8. IE9+ support them natively.
* main is required for all IE versions and KHTML-based browsers.
* Other browsers support them natively already. */
header, main, footer {
display: block;
}
/* monospace is much smaller than Verdana by default, so we make it a bit bigger. */ /* monospace is much smaller than Verdana by default, so we make it a bit bigger. */
pre, code, kbd { pre, code, kbd {
font-size: medium; font-size: medium;
......
...@@ -12,15 +12,17 @@ ...@@ -12,15 +12,17 @@
#%] #%]
[% Hook.process('main-end') %] [% Hook.process('main-end') %]
</div> </main>
<div id="footer"> <footer id="footer">
<div class="intro">[% Hook.process('intro') %]</div> <div class="intro">[% Hook.process('intro') %]</div>
<nav>
[% PROCESS "global/useful-links.html.tmpl" %] [% PROCESS "global/useful-links.html.tmpl" %]
</nav>
<div class="outro">[% Hook.process('outro') %]</div> <div class="outro">[% Hook.process('outro') %]</div>
</div> </footer>
[% Hook.process("end") %] [% Hook.process("end") %]
</body> </body>
......
...@@ -228,6 +228,16 @@ ...@@ -228,6 +228,16 @@
[% PROCESS format_js_link %] [% PROCESS format_js_link %]
[% END %] [% END %]
[%# IE8 doesn't understand these HTML5 elements. So we have to declare them here. %]
<!--[if lt IE 9]>
<script>
document.createElement('header');
document.createElement('nav');
document.createElement('main');
document.createElement('footer');
</script>
<![endif]-->
[%# this puts the live bookmark up on firefox for the Atom feed %] [%# this puts the live bookmark up on firefox for the Atom feed %]
[% IF atomlink %] [% IF atomlink %]
<link rel="alternate" <link rel="alternate"
...@@ -248,7 +258,7 @@ ...@@ -248,7 +258,7 @@
[%+ class FILTER css_class_quote %] [%+ class FILTER css_class_quote %]
[% END %] yui-skin-sam"> [% END %] yui-skin-sam">
<div id="header"> <header id="header">
[% INCLUDE global/banner.html.tmpl %] [% INCLUDE global/banner.html.tmpl %]
<div id="titles"> <div id="titles">
...@@ -263,9 +273,9 @@ ...@@ -263,9 +273,9 @@
[% END %] [% END %]
</div> </div>
<div id="common_links"> <nav id="common_links">
[% PROCESS "global/common-links.html.tmpl" qs_suffix = "_top" %] [% PROCESS "global/common-links.html.tmpl" qs_suffix = "_top" %]
</div> </nav>
[% IF Bugzilla.languages.size > 1 %] [% IF Bugzilla.languages.size > 1 %]
<div id="lang_links_container" class="bz_default_hidden"> <div id="lang_links_container" class="bz_default_hidden">
...@@ -284,9 +294,9 @@ ...@@ -284,9 +294,9 @@
</ul> </ul>
</div> </div>
[% END %] [% END %]
</div> </header>
<div id="bugzilla-body"> <main role="main" id="bugzilla-body">
[% IF Param('announcehtml') %] [% IF Param('announcehtml') %]
[% Param('announcehtml') FILTER none %] [% Param('announcehtml') FILTER none %]
[% END %] [% END %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment