]> scripts.mit.edu Git - www/ikiwiki.git/commitdiff
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
authorJoey Hess <joey@kitenet.net>
Sun, 2 May 2010 19:45:48 +0000 (15:45 -0400)
committerJoey Hess <joey@kitenet.net>
Sun, 2 May 2010 19:45:48 +0000 (15:45 -0400)
IkiWiki/Plugin/mirrorlist.pm
debian/changelog
doc/bugs/html5_support.mdwn
doc/style.css
templates/page.tmpl

index 92be7913efaf871929d8c3e0746191888aa1f513..f54d94ad52366110e29f20575672bcd0fcc4413c 100644 (file)
@@ -40,7 +40,7 @@ sub pagetemplate (@) {
 
 sub mirrorlist ($) {
        my $page=shift;
-       return "<p>".
+       return ($config{html5} ? '<nav id="mirrorlist">' : '<div>').
                (keys %{$config{mirrorlist}} > 1 ? gettext("Mirrors") : gettext("Mirror")).
                ": ".
                join(", ",
@@ -50,7 +50,7 @@ sub mirrorlist ($) {
                                qq{">$_</a>}
                        } keys %{$config{mirrorlist}}
                ).
-               "</p>";
+               ($config{html5} ? '</nav>' : '</div>');
 }
 
 1
index c9fc2e65790dd047f6b8307405666813d00faa19..789fda1cea207ac3df60fae704303e9008fcb7c6 100644 (file)
@@ -3,6 +3,9 @@ ikiwiki (3.20100502) UNRELEASED; urgency=low
   * Add parameter to displaytime to specify that it is a pubdate,
     and in html5 mode, use time tag.
   * Add placeholder text in search form (in html5 mode only).
+  * In html5 mode, use all the nice new semantic tags. Care was taken
+    to not change the id/class named used in the CSS, so only CSS
+    that refers to tag types needed to be changed.
 
  -- Joey Hess <joeyh@debian.org>  Sun, 02 May 2010 13:22:50 -0400
 
index 5530b29db13ebfac1e376a606c2370b846696a5a..ef0ec1e703cc8d2d6351a28ab70b3219dd412c46 100644 (file)
@@ -30,40 +30,11 @@ HTML5](http://www.w3.org/TR/html5-diff/).
 > small start at doing that.
 > 
 > Some of your changes are obvious, like using the new `time` and
-> and `article` elements. Others less so, and I'm particularly
-> puzzled by these:
-> 
-> * Removing the value="Submit" from the button on the 
->   commentmoderation form.
-> * Removing feedlink.tmpl. What?!
-> * Using a `h2` for the header of inlinepage.tmpl and page.tmpl, rather
->   than the styled span. Ikiwiki has
->   [[a_reason|todo/Option_to_make_title_an_h1?]] for not
->   using real `hN` for the header atop a page and here.
->   AFAICS, html5 does not invalidate that.
-> * Removing Editurl from inlinepage.tmpl actions. I assume 
->   this is your own preference, needs to be removed from branch
->   before I can use it.
-> * Removing the pageheader, content, and footer divs
->   which are all used by style.css.
->   Perhaps, the style sheet needs to be updated to use
->   the new elements, like the `footer` and `header`.
-> * Removal of the favicon from page.tmpl. Surely html5 supports?
-> * Removal of BASEURL from page.tmpl, apparently a mistake.
-> * Removal of the `/` between wiki title and page title.
->   Personal preference.
-> * Removal of `comments` div, which is there to be styled.
-> * Why use a `p` rather than the `div` for `addcomments`?
-> * Moving the action bar to the bottom of the page.
->   Personal preference.
-> * Clearly searchquery.tmpl has no business using bad old `center`
->   tag, but something should still be done to replace it.
-> 
-> (BTW, it would be helpful if you could re-merge master into your branch
-> as it is a bit diverged now.) 
-> 
+> and `article` elements. Looks like I can't merge it as-is though
+> due to other changes.
+>
 > Other ideas:
-> 
+>  
 > * Use aside for the sidebar? Or for the [[templates/note]] template?
 > * Use nav for the actionbar
 > * Use details tag instead of the javascript in the toggle plugin. 
index 7ffcf9fe27d32eb18307c68e0d1419e006d250fa..69c7f80d8085fdae3d4eacbffa3ab393d49a855a 100644 (file)
@@ -60,15 +60,12 @@ div.inlinecontent {
        clear: both;
 }
 
-.tags {
-}
-
 #pageinfo {
        margin: 1em 0;
        border-top: 1px solid #000;
 }
 
-div.tags {
+.tags {
        margin-top: 1em;
 }
 
index 661d4a51501d6ba7706312a5af1dea477860322f..195ce788683d1308586595a9a9efac346d4a6d31 100644 (file)
@@ -5,7 +5,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 </TMPL_IF>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<TMPL_IF HTML5><meta charset="utf-8" /><TMPL_ELSE><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></TMPL_IF>
 <meta http-equiv="Cache-Control" content="must-revalidate" />
 <title><TMPL_VAR TITLE></title>
 <TMPL_IF NAME="FAVICON">
 </head>
 <body>
 
-<div class="pageheader">
-<div class="header">
+<TMPL_IF HTML5><article class="page"><TMPL_ELSE><div class="page"></TMPL_IF>
+
+<TMPL_IF HTML5><section class="pageheader"><TMPL_ELSE><div class="pageheader"></TMPL_IF>
+<TMPL_IF HTML5><header class="header"><TMPL_ELSE><div class="header"></TMPL_IF>
 <span>
 <span class="parentlinks">
 <TMPL_LOOP NAME="PARENTLINKS">
 &nbsp;(<TMPL_VAR NAME="PERCENTTRANSLATED">%)
 </TMPL_IF>
 </span>
-</span><!--.header-->
+</span>
 <TMPL_IF NAME="SEARCHFORM">
 <TMPL_VAR SEARCHFORM>
 </TMPL_IF>
-</div>
+<TMPL_IF HTML5></header><TMPL_ELSE></div></TMPL_IF>
 
 <TMPL_IF NAME="HAVE_ACTIONS">
-<div class="actions">
+<TMPL_IF HTML5><nav class="actions"><TMPL_ELSE><div class="actions"></TMPL_IF>
 <ul>
 <TMPL_IF NAME="EDITURL">
 <li><a href="<TMPL_VAR EDITURL>" rel="nofollow">Edit</a></li>
 </TMPL_IF>
 </TMPL_IF>
 </ul>
-</div>
+<TMPL_IF HTML5></nav><TMPL_ELSE></div></TMPL_IF>
 </TMPL_IF>
 
 <TMPL_IF NAME="OTHERLANGUAGES">
-<div id="otherlanguages">
+<TMPL_IF HTML5><nav class="otherlanguages"><TMPL_ELSE><div class="otherlanguages"></TMPL_IF>
 <ul>
 <TMPL_LOOP NAME="OTHERLANGUAGES">
 <li>
 </li>
 </TMPL_LOOP>
 </ul>
-</div> <!-- #otherlanguages -->
+<TMPL_IF HTML5></nav><TMPL_ELSE></div></TMPL_IF>
 </TMPL_IF>
 
-</div> <!-- .pageheader -->
+<TMPL_IF HTML5></section><TMPL_ELSE></div></TMPL_IF>
 
 <TMPL_IF SIDEBAR>
-<div class="sidebar">
+<TMPL_IF HTML5><aside class="sidebar"><TMPL_ELSE><div class="sidebar"></TMPL_IF>
 <TMPL_VAR SIDEBAR>
-</div>
+<TMPL_IF HTML5></aside><TMPL_ELSE></div></TMPL_IF>
 </TMPL_IF>
 
-<div id="content">
+<TMPL_IF HTML5><section id="content"><TMPL_ELSE><div id="content"></TMPL_IF>
 <TMPL_VAR CONTENT>
-</div>
+<TMPL_IF HTML5></section><TMPL_ELSE></div></TMPL_IF>
 
 <TMPL_IF COMMENTS>
-<div id="comments">
+<TMPL_IF HTML5><section id="comments"><TMPL_ELSE><div id="comments"></TMPL_IF>
 <TMPL_VAR COMMENTS>
 <TMPL_IF ADDCOMMENTURL>
 <div class="addcomment">
 <TMPL_ELSE>
 <div class="addcomment">Comments on this page are closed.</div>
 </TMPL_IF>
-</div>
+<TMPL_IF HTML5></section><TMPL_ELSE></div></TMPL_IF>
 </TMPL_IF>
 
-<div id="footer" class="pagefooter">
-<div id="pageinfo">
+<TMPL_IF HTML5><footer id="footer" class="pagefooter"><TMPL_ELSE><div id="footer" class="pagefooter"></TMPL_IF>
+<TMPL_IF HTML5><nav id="pageinfo"><TMPL_ELSE><div id="pageinfo"></TMPL_IF>
 
 <TMPL_IF NAME="TAGS">
-<div class="tags">
+<TMPL_IF HTML5><nav class="tags"><TMPL_ELSE><div class="tags"></TMPL_IF>
 Tags:
 <TMPL_LOOP NAME="TAGS">
 <TMPL_VAR LINK>
 </TMPL_LOOP>
-</div>
+<TMPL_IF HTML5></nav><TMPL_ELSE></div></TMPL_IF>
 </TMPL_IF>
 
 <TMPL_IF NAME="BACKLINKS">
-<div id="backlinks">
+<TMPL_IF HTML5><nav id="backlinks"><TMPL_ELSE><div id="backlinks"></TMPL_IF>
 Links:
 <TMPL_LOOP NAME="BACKLINKS">
 <a href="<TMPL_VAR URL>"><TMPL_VAR PAGE></a>
@@ -144,7 +146,7 @@ Links:
 </span>
 </span>
 </TMPL_IF>
-</div><!-- #backlinks -->
+<TMPL_IF HTML5></nav><TMPL_ELSE></div></TMPL_IF>
 </TMPL_IF>
 
 <TMPL_IF COPYRIGHT>
@@ -166,10 +168,12 @@ Last edited <TMPL_VAR MTIME>
 <!-- Created <TMPL_VAR CTIME> -->
 </div>
 
-</div><!-- #pageinfo -->
+<TMPL_IF HTML5></nav><TMPL_ELSE></div></TMPL_IF>
 <TMPL_IF EXTRAFOOTER><TMPL_VAR EXTRAFOOTER></TMPL_IF>
 <!-- from <TMPL_VAR WIKINAME> -->
-</div><!-- .pagefooter #footer -->
+<TMPL_IF HTML5></footer><TMPL_ELSE></div></TMPL_IF>
+
+<TMPL_IF HTML5></article><TMPL_ELSE></div></TMPL_IF>
 
 </body>
 </html>