]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/todo/hide_add_comment_button_in_print.mdwn
another thing to remove from prints
[git.ikiwiki.info.git] / doc / todo / hide_add_comment_button_in_print.mdwn
1 [[!template  id=gitbranch branch=anarcat/print-no-comment author="[[anarcat]]"]]
3 Print versions are often a neglected part of a style sheet, but it's
4 great when people can actually print your webpage and get a satisfying
5 result.
7 This often means removing a bunch of stuff that are irrelevant for
8 print. Ikiwiki already does a bunch of those things in the
9 base stylesheet:
11     /* things to hide in printouts */
12     @media print {
13         .actions { display: none; }
14         .tags { display: none; }
15         .trails { display: none; }
16         .feedbutton { display: none; }
17         #searchform { display: none; }
18         .blogform, #blogform { display: none; }
19         #backlinks { display: none; }
20     }
22 But I think we should remove more. In particular, the `addcomment`
23 button is not relevant at all for print versions. There might be more:
24 in my [bootstrap theme][], I also had to [remove][] the whole footer,
25 because it was overlapping with the page content. It's unfortunate
26 because it removes the copyright notice, but I don't know how else to
27 fix this.
29 Anyways, how about [this patch][]?
31     --- a/doc/style.css
32     +++ b/doc/style.css
33     @@ -286,6 +286,7 @@ div.progress-done {
34         #searchform { display: none; }
35         .blogform, #blogform { display: none; }
36         #backlinks { display: none; }
37     +   .addcomment { display: none; }
38      }
39      
40      /* infobox template */
42 Thanks! -- [[anarcat]]
44 [bootstrap theme]: https://gitlab.com/anarcat/ikiwiki-bootstrap-anarcat
45 [remove]: https://gitlab.com/anarcat/ikiwiki-bootstrap-anarcat/commit/94521766f4206882c44764253452ec666d90d5c1
46 [this patch]: https://gitlab.com/anarcat/ikiwiki/commit/33630b561623b8dca946916b733807e9b8c97849.patch
48 [[!tag patch]]