From 0c90905495a5d9fd40282456b4d4098da6adda48 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 7 Nov 2007 22:26:10 +0000 Subject: [PATCH] Add a stylesheet targeted at print media to get nice printouts. --- app/views/layouts/site.rhtml | 1 + app/views/site/index.rhtml | 14 ++++++++++++++ public/stylesheets/print.css | 27 +++++++++++++++++++++++++++ public/stylesheets/site.css | 4 ++++ 4 files changed, 46 insertions(+) create mode 100644 public/stylesheets/print.css diff --git a/app/views/layouts/site.rhtml b/app/views/layouts/site.rhtml index f3cdc9787..7a11ae101 100644 --- a/app/views/layouts/site.rhtml +++ b/app/views/layouts/site.rhtml @@ -5,6 +5,7 @@ <%= javascript_include_tag 'site' %> <%= stylesheet_link_tag 'site' %> + <%= stylesheet_link_tag 'print', :media => "print" %> <%= tag("link", { :rel => "search", :type => "application/opensearchdescription+xml", :title => "OpenStreetMap Search", :href => "/opensearch/osm.xml" }) %> OpenStreetMap<%= ' | '+@title if @title %> diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index 5ca8b0339..98ab2ff1a 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -12,6 +12,20 @@ +
+ + + + + + + +
http://creativecommons.org/licenses/by-sa/2.0/http://openstreetmap.org/
+Licensed under the Creative Commons Attribution-Share Alike 2.0 license +by the OpenStreetMap project and it's contributors. +
+
+ <% if params['mlon'] and params['mlat'] %> <% marker = true %> <% mlon = params['mlon'] %> diff --git a/public/stylesheets/print.css b/public/stylesheets/print.css new file mode 100644 index 000000000..0b20a766f --- /dev/null +++ b/public/stylesheets/print.css @@ -0,0 +1,27 @@ +#left { + display: none; +} + +#greeting { + display: none; +} + +#tabnav { + display: none; +} + +#sidebar { + display: none; +} + +#permalink { + display: none; +} + +.olControlPanZoom { + display: none; +} + +.olControlLayerSwitcher { + display: none; +} diff --git a/public/stylesheets/site.css b/public/stylesheets/site.css index 28d840b72..c09c7885e 100644 --- a/public/stylesheets/site.css +++ b/public/stylesheets/site.css @@ -572,3 +572,7 @@ input { right:15px; font-size:smaller; } + +#attribution { + display: none; +} -- 2.43.2