From 64239b97fbfcbcdf5e33c9f879afb336fa2c48a9 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Mon, 9 Jan 2012 02:14:33 +0000 Subject: [PATCH] Update CSS for print media to hide topbar, footer --- public/styles/normal.css | 110 ++++++++++++++++++------------- source/webui/templates/cv.tpl | 2 +- source/webui/templates/index.tpl | 8 ++- 3 files changed, 70 insertions(+), 50 deletions(-) diff --git a/public/styles/normal.css b/public/styles/normal.css index a86a1e6..5c63281 100644 --- a/public/styles/normal.css +++ b/public/styles/normal.css @@ -5,52 +5,70 @@ @import url('http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css'); @CHARSET "UTF-8"; -body { - margin: 0em; - margin-top: 60px; - padding-top: 40px; - padding: 0em; - font-family: verdana, helvetica, sans-serif; - background: #F7F7F7; +@media all { + body { + margin: 0em; + margin-top: 60px; + padding-top: 40px; + padding: 0em; + font-family: verdana, helvetica, sans-serif; + background: #F7F7F7; + } + + a { + color: gray; + } + + label { + margin-left: 1em; + margin-right: 1em; + } + + footer { + padding: 2em; + font-size: smaller; + font-style: italic; + color: #333333; + text-align: center; + } + + /* + Images + */ + img.avatar { + float: right; + vertical-align: top; + border: 1px solid grey; + padding: 0.2em; + margin: 0.75em; + } + + img.at { + height: 1em; + width: 1em; + } + + /* + Homepage + */ + ol.employment,ol.education { + list-style: none; + margin-left: 0px; + } } -a { - color: gray; -} - -label { - margin-left: 1em; - margin-right: 1em; -} - -footer { - padding: 2em; - font-size: smaller; - font-style: italic; - color: #333333; - text-align: center; -} - -/* - Images -*/ -img.avatar { - float: right; - vertical-align: top; - border: 1px solid grey; - padding: 0.2em; - margin: 0.75em; -} - -img.at { - height: 1em; - width: 1em; -} - -/* - Homepage -*/ -ol.employment,ol.education { - list-style: none; - margin-left: 0px; +@media print { + + .no-print { + display: none; + } + + body { + margin: 0; + } + + #page_content { + margin: 1.5em; + } + } \ No newline at end of file diff --git a/source/webui/templates/cv.tpl b/source/webui/templates/cv.tpl index e72bc03..ffdc4c8 100644 --- a/source/webui/templates/cv.tpl +++ b/source/webui/templates/cv.tpl @@ -2,7 +2,7 @@
-
+

Download

diff --git a/source/webui/templates/index.tpl b/source/webui/templates/index.tpl index dc5694a..fd6f172 100644 --- a/source/webui/templates/index.tpl +++ b/source/webui/templates/index.tpl @@ -29,7 +29,7 @@ -
+
{$page->include_template('navigation')} @@ -70,10 +70,12 @@
{/if} - {$page_content} +
+ {$page_content} +
-