From owner-freebsd-doc@FreeBSD.ORG Thu Apr 17 07:31:39 2014 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3858A9A8 for ; Thu, 17 Apr 2014 07:31:39 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 15E5F13CA for ; Thu, 17 Apr 2014 07:31:38 +0000 (UTC) Received: from delphij-macbook.local (c-24-5-244-32.hsd1.ca.comcast.net [24.5.244.32]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id EB7B120EA0; Thu, 17 Apr 2014 00:31:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1397719898; bh=kEAUOHMdMW1MeyzAgsW5/EvL4Pa0XIwCQu2lyHguhVU=; h=Date:From:Reply-To:To:Subject; b=SGG/VhFqbtk+Y/iluJ8AUGkpYhmfu2htcAwoaJTo2pQV4IIXVckNi8DoCC/jS7rfo dX1apz/qGEVfKMhCC9ECWA5yTjYAU3/F5ITKpX0pZV4ZG79EeguEQbIGCwBDaMSDEr SrQslL5rMhqDSNKHzO2AfqUFlZS0zFgYXqFN3fy0= Message-ID: <534F8358.5080900@delphij.net> Date: Thu, 17 Apr 2014 00:31:36 -0700 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: "freebsd-doc@freebsd.org" Subject: [PATCH] Add CSS for printer for website Content-Type: multipart/mixed; boundary="------------010107030605090101060109" X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: d@delphij.net List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 07:31:39 -0000 This is a multi-part message in MIME format. --------------010107030605090101060109 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi, I noticed that our website is pretty ugly when being printed. Attached is a simple patch that basically hides various unwanted elements when media is print. Comments? (No re-indent is done to make it easier to review). -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJTT4NYAAoJEJW2GBstM+nsJe8P/0IStoHHutpZaHOjOhtkHiBV pkR5llJ5R5Czqh+SOxTnSRQQKvRqG/MkaIxevcGh5tLrgk/sBcVFliItLFG1xEy+ klomsxkP3fdaHagaWIpJN2z+Wd1doxBIb1nY/834DtnlK2HBV6CzT8WMtURuue1d f3W1Ix2bGMnCAvGxUARnQJdY1aRIyV0RUy8V/ZnUD9I03Q2BmJ1gGGFh1x3DT2jC Tn3b6qgmf/w9dAQvQdq1jySVAygXYRKIVsGjMXQmSq9bKXGZgaFUBsbdVmx6ghG9 UOu+5dp6hO2gjZfhIZ3kX9gee8POO9xHl/LaT6FT5hBUkpYg7ghm5XeZ+tcA4H6n kviv2dOnkbrwJrmUnRyZUqnt3mBCP2yoUBTOpkjv/tmyA41k39d/dQ2LMFvh0tMO lsk8KZlPPOoSNz5EoBCOp1zv/7HPydYh5xDYp1RuxGc/i5Z2b4700O6iUdhG9IQ2 yBCD4SheDTGxD8rs2yNZMiZCDU1q5DCuaAyBwwIrbKRrVuKvMCV3AypXMStGRznS /qZ0KMk/3kLhyUyrzH+IBgvJSmJdtRD7JIjKUayI3n/1oQYMeh2kASNy4IwU2XWz IHKd8FsYj70YBCQjUWf8Kay/SImdkiRGlAtPqneqMHq+02QJ5GDhOonWapvCogqe dkK1K/sirPEFL4mAUqKx =xUTI -----END PGP SIGNATURE----- --------------010107030605090101060109 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="print.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="print.diff" Index: en_US.ISO8859-1/htdocs/layout/css/layout.css =================================================================== --- en_US.ISO8859-1/htdocs/layout/css/layout.css (revision 44592) +++ en_US.ISO8859-1/htdocs/layout/css/layout.css (working copy) @@ -62,6 +62,7 @@ /* Search */ +@media screen { #search { position: relative; text-align: right; @@ -108,7 +109,12 @@ color: #666; padding: 2px 2px 2px 5px; } +} +@media print { +#search { display: none; } +} + /* Mirror Select */ #mirror { @@ -471,6 +477,7 @@ /* Secondary Pages */ +@media screen { #sidewrap { float: left; width: 166px; @@ -488,7 +495,13 @@ margin-left: 170px; padding-top: 15px; } +} +@media print { +#sidewrap, #rightwrap { display: none; } +#contentwrap { margin-left: 16px; padding-top: 15px; } +} + /* Footer */ #footer { Index: en_US.ISO8859-1/htdocs/layout/css/navigation.css =================================================================== --- en_US.ISO8859-1/htdocs/layout/css/navigation.css (revision 44592) +++ en_US.ISO8859-1/htdocs/layout/css/navigation.css (working copy) @@ -6,6 +6,7 @@ /* Site Navigation */ +@media screen { #topnav { text-align: left; color: #666; @@ -378,3 +379,14 @@ div#menu ul ul ul li:hover ul { padding-left: 10px; padding-right: 10px; } +} + +@media print { +#topnav, #topnavleft, #topnavright, #topnavlist { display: none; } +#menu { display: none; } +#languagenav, #languagenavlist { display: none; } +#searchnav, #searchnavlist { display: none; } +#sidenav { display: none; } +#feedlinks { display: none; } +.rightnav { display: none; } +} Index: share/xml/xhtml.xsl =================================================================== --- share/xml/xhtml.xsl (revision 44592) +++ share/xml/xhtml.xsl (working copy) @@ -42,7 +42,7 @@ - + &header1.googlejs; --------------010107030605090101060109--