]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/patchqueue/more_class__61____34____34___for_css.mdwn
web commit by http://stefano.zacchiroli.myopenid.com/: added a patch for "trailer...
[git.ikiwiki.info.git] / doc / patchqueue / more_class__61____34____34___for_css.mdwn
1 I'm writing my own CSS for ikiwiki. During this effort I often found the need of adding more class="" attributes to the default ikiwiki templates. This way more presentational aspects of visual formatting can be delegated to CSS and removed from the HTML structure.
3 In this patch I plan to collect changes in this direction.
5 The first, one-liner, patch is to use a "div" element with a class="actions" attribute for inline page as is done with non-inlined page.   This way the same CSS formatting can be applied to div.actions in the CSS, while at the moment it must be duplicated for a span.actions (which I believe is also incorrect, since it will contain a "ul" element, not sure though). In case the markup should be differentiated it will still be possible relying on the fact that a div.actions is contained or not in a div.inlinepage.
7 Here's the one-liner:
9     --- /usr/share/ikiwiki/templates/inlinepage.tmpl        2006-12-28 16:24:06.000000000 +0100
10     +++ inlinepage.tmpl.new 2006-12-28 16:24:04.000000000 +0100
11     @@ -31,7 +31,7 @@
12      </span>
14      <TMPL_IF NAME="HAVE_ACTIONS">
15     -<span class="actions">
16     +<div class="actions">
17      <ul>
18      <TMPL_IF NAME="EDITURL">
19      <li><a href="<TMPL_VAR EDITURL>">Edit</a></li>
20     @@ -40,7 +40,7 @@
21      <li><TMPL_VAR DISCUSSIONLINK></li>
22      </TMPL_IF>
23      </ul>
24     -</span>
25     +</div>
26      </TMPL_IF>
28      </div>
30 The following adds a div element with class="trailer" around the meta-information added after an inlined page (namely: the post date, the tags, and the actions):
32     --- inlinepage.tmpl.orig        2006-12-28 16:56:49.000000000 +0100
33     +++ inlinepage.tmpl     2006-12-28 17:02:06.000000000 +0100
34     @@ -17,6 +17,8 @@
35      </span>
36      <TMPL_VAR CONTENT>
38     +<div class="trailer">
39     +
40      <span class="pageinfo">
41      Posted <TMPL_VAR CTIME>
42      </span>
43     @@ -44,3 +46,5 @@
44      </TMPL_IF>
46      </div>
47     +
48     +</div>