]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/Print_link.mdwn
Review request
[ikiwiki.git] / doc / todo / Print_link.mdwn
1 I think that Print link to open popup window with printable
2 HTML version of page is very useful thing, so I would like
3 to have it in my ikiwiki :)
4
5 Probably it's better to generate a page on the fly as a CGI
6 (just the same like for RecentChanges page) when a user
7 really needs it, instead to build static printable version
8 for all ikiwiki pages. --[[Paweł|ptecza]]
9
10 > I've always considered print links to be a sign of a badly designed web
11 > site that looks ugly in a printer because it's ugly anywhere, so I may
12 > take some convinving. :-) Ikiwiki pages seem like they'd print out ok
13 > as-is to me.
14
15 >> ikiwiki home pages are plain and clean, but please note that some
16 >> ikiwiki users can have their wiki with banners and navbars and a lot
17 >> of graphics.
18
19 > (I also often click on print links, just to get a web page that I can
20 > read, especially often hoping that it will have the whole article on it,
21 > instead of the 99 tiny pagelets nasty websites like to split things into.
22 > Have I ever mentioned how much I *hate* the web?)
23
24 >> I always print all interested articles for me, because I hate reading
25 >> them from a display monitor. It's too painful for my eyes. And I want
26 >> to print only article *body* without all wrappers, because I don't
27 >> need them.
28
29 > One option, if your stylesheet contained something that was unpalatable
30 > in printing, would be to define an alternate stylesheet optimised for
31 > printing, and somehow switch the browser to use that stylesheet when
32 > printing a page (it can be switched from a menu in the UI of some
33 > browsers, but I'm not sure what a good way would be to switch the
34 > stylesheet on the fly without re-rendering the page..)
35 >
36 > --[[Joey]]
37
38 >> Maybe you could add `print.css` file for printable version? We just have
39 >> `local.css` file for a local styling. --[[Paweł|ptecza]]
40
41 >>> Sure, very doable, but the UI to switch to it when printing, I don't
42 >>> know..
43
44 >>>> Is the IU to switch is really necessary? Why don't use only
45 >>>> `style.css` and `print.css` files in header of printable version
46 >>>> of page? The second file can be equivalent of `local.css` file
47 >>>> and it can overwrite default CSS styles.
48
49 >>> BTW, I'm sure that the Print link as originally requested could be
50 >>> written as a plugin fairly simply. --[[Joey]]
51
52 >>>> I'm not a Perl expert, but I can take a look at code of other
53 >>>> ikiwiki plugins.
54
55 >>>> BTW, I also was thinkig about plugin to CVS support,
56 >>>> but unfortunately I don't have too much free time. --[[Paweł|ptecza]]
57
58 >> You don't need a stylesheet-switching UI or a printer-friendly
59 >> version; just link to a stylesheet with `media="print"`. --[[JoshTriplett]]
60
61 >>> Example? --[[Joey]]
62
63 >>>> I used `meta` to add a `media="print"` stylesheet to the [[sandbox]].  In print or
64 >>>> print preview (on browsers supporting data URIs), you should no longer
65 >>>> see the search form. --[[JoshTriplett]]
66
67 >>>>> (And I broke it, since it was a security hole ;-). So it looks like
68 >>>>> media=print can be 
69 >>>>> [used inside a style sheet](http://www.w3.org/TR/REC-CSS2/media.html),
70 >>>>> so the thing to do would be to edit style.css to automatically disable parts 
71 >>>>> not wanted when printing. That would rock. --[[Joey]]
72
73 Yay! I've modified the stylesheet and this is [[done]]. --[[Joey]]