]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/more_class__61____34____34___for_css.mdwn
4712c12b3ccaaf55ad2b1f40bc8374286340ca8e
[ikiwiki.git] / doc / todo / 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.
2
3 In this patch I plan to collect changes in this direction.
4
5 The first, one-liner, patch is to use a "div" element with a
6 class="actions" attribute for inline page as is done with non-inlined page.
7 This way the same CSS formatting can be applied to div.actions in the CSS,
8 while at the moment it must be duplicated for a span.actions (which I
9 believe is also incorrect, since it will contain a "ul" element, not sure
10 though). In case the markup should be differentiated it will still be
11 possible relying on the fact that a div.actions is contained or not in a
12 div.inlinepage.
13
14 Here's the one-liner:
15
16 > applied --[[Joey]]
17
18 The following adds a div element with class="trailer" around the meta-information
19 added after an inlined page (namely: the post date, the tags, and the actions):
20
21     --- inlinepage.tmpl.orig        2006-12-28 16:56:49.000000000 +0100
22     +++ inlinepage.tmpl     2006-12-28 17:02:06.000000000 +0100
23     @@ -17,6 +17,8 @@
24      </span>
25      <TMPL_VAR CONTENT>
26
27     +<div class="trailer">
28     +
29      <span class="pageinfo">
30      Posted <TMPL_VAR CTIME>
31      </span>
32     @@ -44,3 +46,5 @@
33      </TMPL_IF>
34
35      </div>
36     +
37     +</div>
38
39 [[!tag patch]]
40
41 > Unfortunately, the inlinepage content passes through markdown, and markdown
42 > gets confused by these nested div's and puts p's around one of them, generating
43 > broken html. If you can come up with a way to put in the div that passes
44 > the test suite, or a fix to markdown, I will accept it, but the above patch
45 > fails the test suite. --[[Joey]] 
46
47 >> Just a note...  This discrepancy doesn't exist in [pandoc](http://code.google.com/p/pandoc/) as
48 >> demonstrated in the relevant [page](http://code.google.com/p/pandoc/wiki/PandocVsMarkdownPl).
49 >> Pandoc is a _real parser_ for markdown (contrasting the regexp based implementation of 
50 >> markdown.pl).  I've almost finished the Debian packaging.  John is working on a `--strict` mode
51 >> which will hopefully make pandoc a drop-in replacement for markdown.  I'll upload pandoc after 
52 >> his work has finished.  Whether it could be used in IkiWiki is an open question, but having
53 >> alternatives is always a good thing and perhaps, the fact that pandoc can make markdown->LaTeX
54 >> conversion may lead to new possibilities. --[[Roktas]]
55
56 >>> I confirm that this ([[!debbug 405058]]) has just been fixed in markdown
57 >>> [`1.0.2b7`](http://packages.debian.org/experimental/web/markdown) (BTW, thanks to your bug
58 >>> report Joey).  FYI, I've observed some performance drop with `1.0.2b7` compared to `1.0.1`,
59 >>> especially noticable with big files.  This was also confirmed by someone else, for example,
60 >>> see this [thread](http://six.pairlist.net/pipermail/markdown-discuss/2006-August/000152.html)
61 >>> --[[Roktas]]
62
63 >>>> 1.0.2b7 is slower, but ok, and parses much better. I'm waiting for it
64 >>>> to at least get into debian testing before I make ikiwiki depend on it
65 >>>> though. --[[Joey]]
66
67 I'd like a class attribute on the `<span>` tag surrounding wikilinks
68 that refer to non-existent pages, in Ikiwiki.pm:htmllink, so that such
69 broken links can be styled more dramatically with CSS. --Jamey
70
71 > added --[[Joey]]