Sunday December 28, 2008 |
Optimising a Roller theme for printingInspired by Phil Harman's Trials with his roller theme I have wanted to create a better hard copy experience for you. I implemented this earlier this morning on my blog's roller files. It has been tested using Opera's print preview on the main weblog page and the comments view of an article and so should work on a view based on a tag, category, or date. I have implemented a 2nd CSS file. Because my theme's base is so old, it is not conformant to the stylesheet/theme file structures of today's roller so I implemented it as just any old template file. The form lets you know/set the URL. It contains the following rules.
.noPrint It is introduced to the weblog using the following code in the weblog template file, in the HEAD section. The assignment in a LINK or STYLE tag with the MEDIA="print" attribute is what applies this rule only when printing.
<LINK HREF="http://blogs.sun.com/DaveLevy/page/print.css" I used the 'new file' form to set the url of the new file as above, but named it _printcss; it needs a preceding _ to become invisible to some of the roller macros such as I have applied the 'noPrint' rule to the Banner, the webCategoryChooser and Sidebar. I have not used the 'noShow' rule, which I developed to apply to objects that occupy vertical space in a table. The rules are applied to a DIV for the banner, P for the web catgory chooser and TABLE for the sidebar. Another pointer to the fact I must find time to remove the tables from this theme. I am working on it I promise. tags: technology blog roller print theme printing (2008-12-28 10:02:54.0) Permalink Comments [2] Notice: New media=print rulesAll weblog views on this blog can now be printed, the banner and sidebar will not be shown in the printed version. This has been tested using Opera's print preview, and should work for the weblog, tag, category, date and comment views. It has not been set for the "About Me" page, nor "Yesterday's Words". tags: none (2008-12-28 09:35:26.0) Permalink |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||