Add a stylesheet targeted at print media to get nice printouts.
authorTom Hughes <tom@compton.nu>
Wed, 7 Nov 2007 22:26:10 +0000 (22:26 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 7 Nov 2007 22:26:10 +0000 (22:26 +0000)
app/views/layouts/site.rhtml
app/views/site/index.rhtml
public/stylesheets/print.css [new file with mode: 0644]
public/stylesheets/site.css

index f3cdc97873b41628185289a75e65a223fcae2354..7a11ae101563c84bfc57008a396037ea2db9b0f7 100644 (file)
@@ -5,6 +5,7 @@
     <%= javascript_include_tag 'site' %>
     <!--[if lt IE 7]><%= javascript_include_tag 'pngfix' %><![endif]--> <!-- thanks, microsoft! -->
     <%= 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" }) %>
     <title>OpenStreetMap<%= ' | '+@title if @title %></title>
   </head>
index 5ca8b0339b0d4af168bea33403b64e6a665ee7d5..98ab2ff1a681e0007b3ac6a53e62f461f908096a 100644 (file)
 <div id="permalink"><a href="/" id="permalinkanchor">Permalink</a></div>
 </div> 
 
+<div id="attribution">
+<table width="100%">
+<tr>
+<td align="left">http://creativecommons.org/licenses/by-sa/2.0/</td>
+<td align="right">http://openstreetmap.org/</td>
+</tr>
+<tr>
+<td colspan="2" align="center">
+Licensed under the Creative Commons Attribution-Share Alike 2.0 license
+by the OpenStreetMap project and it's contributors.
+</td>
+</table>
+</div>
+
 <% 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 (file)
index 0000000..0b20a76
--- /dev/null
@@ -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;
+}
index 28d840b728b93e9739b76f789c701a709d483dc6..c09c7885ed06da45ee3b7238f974a6c451636611 100644 (file)
@@ -572,3 +572,7 @@ input {
   right:15px;
   font-size:smaller;
 }
+
+#attribution {
+  display: none;
+}