From f9003bb4e69db1224d901b2c7081861be378e90d Mon Sep 17 00:00:00 2001 From: matthew Date: Tue, 15 Dec 2009 16:53:54 +0000 Subject: Make footer a template so can have on/off-ness. Have smaller map. --- perllib/Page.pm | 14 ++++++-------- templates/website/cobrands/barnet/barnet-footer | 10 +++++----- web/cobrands/barnet/css/basic.css | 7 +++++++ web/cobrands/barnet/css/layout.css | 23 +++++++++++++++++++++++ 4 files changed, 41 insertions(+), 13 deletions(-) diff --git a/perllib/Page.pm b/perllib/Page.pm index 729ef718e..cab731faa 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: Page.pm,v 1.225 2009-12-15 15:53:41 matthew Exp $ +# $Id: Page.pm,v 1.226 2009-12-15 16:53:54 matthew Exp $ # package Page; @@ -316,11 +316,9 @@ sub footer { $js = ''; # Don't use fileupload JS at the moment if ($q->{site} ne 'fixmystreet') { - (my $file = __FILE__) =~ s{/[^/]*?$}{}; - my $template = template($q, %params); - open FP, $file . template_root($q) . $template . '-footer'; - my $html = join('', ); - close FP; + my $template = template($q, %params) . '-footer'; + my $template_root = template_root($q); + my $html = template_include($template, $q, $template_root, %params); my $lang = $mySociety::Locale::lang; if ($q->{site} eq 'emptyhomes' && $lang eq 'cy') { $html =~ s/25 Walter Road
Swansea/25 Heol Walter
Abertawe/; @@ -414,7 +412,7 @@ sub display_map { $params{pre} ||= ''; $params{post} ||= ''; my $mid_point = 254; - if ($q->{site} eq 'scambs') { # Map is c. 380px wide + if ($q->{site} eq 'barnet') { # Map is c. 380px wide $mid_point = 189; } my $px = defined($params{px}) ? $mid_point - $params{px} : 0; @@ -638,7 +636,7 @@ sub os_to_px_with_adjust { my $y_tile = $in_y || int($y); my $px = Page::os_to_px($easting, $x_tile); my $py = Page::os_to_px($northing, $y_tile, 1); - if ($q->{site} eq 'scambs') { # Map is 380px + if ($q->{site} eq 'barnet') { # Map is 380px if ($py > 380) { $y_tile--; $py = Page::os_to_px($northing, $y_tile, 1); diff --git a/templates/website/cobrands/barnet/barnet-footer b/templates/website/cobrands/barnet/barnet-footer index ba7d5de9d..2d6892aa5 100644 --- a/templates/website/cobrands/barnet/barnet-footer +++ b/templates/website/cobrands/barnet/barnet-footer @@ -9,11 +9,11 @@ diff --git a/web/cobrands/barnet/css/basic.css b/web/cobrands/barnet/css/basic.css index 972628e17..c7ba123df 100644 --- a/web/cobrands/barnet/css/basic.css +++ b/web/cobrands/barnet/css/basic.css @@ -61,3 +61,10 @@ blockquote { padding: 0; margin: 0 10px; } + +/* FixMyStreet additions */ + +select, input, textarea { + font-size: 99%; +} + diff --git a/web/cobrands/barnet/css/layout.css b/web/cobrands/barnet/css/layout.css index 193b5c2aa..b66f957b6 100644 --- a/web/cobrands/barnet/css/layout.css +++ b/web/cobrands/barnet/css/layout.css @@ -1,3 +1,26 @@ +/* FixMyStreet additions */ +/* Smaller map */ +#map_box { + width: 380px; +} +#map, #drag { + width: 378px; + height: 378px; +} +#watermark { + background: url("/i/mojwatermark-378.png"); + height: 84px; + width: 171px; + position: absolute; + bottom: 0; + right: 0; +} + +p#fixed, p#unknown { + margin-right: 400px; + width: auto; +} + /*=========FROM CUSTOM=========*/ .cl {clear: both;} -- cgit v1.2.3