diff options
49 files changed, 1306 insertions, 49 deletions
diff --git a/bin/install-as-user b/bin/install-as-user index a7a3be9dc..b05616702 100755 --- a/bin/install-as-user +++ b/bin/install-as-user @@ -88,7 +88,8 @@ export PATH="\$GEM_HOME/bin:\$PATH" EOBRC fi -gem install --no-ri --no-rdoc compass +gem install --conservative --no-ri --no-rdoc sass -v 3.2.14 +gem install --conservative --no-ri --no-rdoc compass -v 0.12.2 # Use compass to generate the CSS, if it doesn't seem to already # exist: diff --git a/conf/packages.debian-wheezy b/conf/packages.debian-wheezy index 68c824ac9..618d3be43 100644 --- a/conf/packages.debian-wheezy +++ b/conf/packages.debian-wheezy @@ -9,7 +9,7 @@ perlmagick libmath-bigint-gmp-perl gettext ruby-compass -postgresql-server-dev-9.1 +postgresql-server-dev-9.1 | postgresql-server-dev-8.4 gnuplot ttf-bitstream-vera libexpat1-dev diff --git a/perllib/FixMyStreet/App/Controller/My.pm b/perllib/FixMyStreet/App/Controller/My.pm index c00264315..bbef1f8d8 100644 --- a/perllib/FixMyStreet/App/Controller/My.pm +++ b/perllib/FixMyStreet/App/Controller/My.pm @@ -45,6 +45,7 @@ sub my : Path : Args(0) { } )->page( $p_page ); while ( my $problem = $rs->next ) { + $c->stash->{has_content}++; push @$pins, { latitude => $problem->latitude, longitude => $problem->longitude, @@ -64,7 +65,9 @@ sub my : Path : Args(0) { order_by => { -desc => 'confirmed' }, rows => 50 } )->page( $u_page ); + my @updates = $rs->all; + $c->stash->{has_content} += scalar @updates; $c->stash->{updates} = \@updates; $c->stash->{updates_pager} = $rs->pager; diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 7fe92bd70..fcab4e49a 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -666,6 +666,15 @@ sub setup_categories_and_bodies : Private { } } + if ($c->cobrand->can('hidden_categories')) { + my %hidden_categories = map { $_ => 1 } + $c->cobrand->hidden_categories; + + @category_options = grep { + !$hidden_categories{$_} + } @category_options; + } + # put results onto stash for display $c->stash->{bodies} = \%bodies; $c->stash->{all_body_names} = [ map { $_->name } values %bodies ]; diff --git a/perllib/FixMyStreet/Cobrand/Hart.pm b/perllib/FixMyStreet/Cobrand/Hart.pm new file mode 100644 index 000000000..cab834b69 --- /dev/null +++ b/perllib/FixMyStreet/Cobrand/Hart.pm @@ -0,0 +1,72 @@ +package FixMyStreet::Cobrand::Hart; +use parent 'FixMyStreet::Cobrand::UKCouncils'; + +use strict; +use warnings; + +sub council_id { return 2333; } # http://mapit.mysociety.org/area/2333.html +sub council_area { return 'Hart'; } +sub council_name { return 'Hart Council'; } +sub council_url { return 'hart'; } +sub is_two_tier { return 1; } + +# Different to councils parent due to this being a two-tier council. If we get +# more, this can be genericised in the parent. +sub problems_clause { + return { bodies_str => { like => '%2333%' } }; +} + +sub path_to_web_templates { + my $self = shift; + return [ + FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify, + FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify + ]; +} + +sub disambiguate_location { + my $self = shift; + my $string = shift; + + my $town = 'Hart, Hampshire'; + + return { + %{ $self->SUPER::disambiguate_location() }, + town => $town, + # these are taken from mapit http://mapit.mysociety.org/area/2333/geometry -- should be automated? + centre => '51.284839,-0.8974600', + span => '0.180311,0.239375', + bounds => [ 51.186005, -1.002295, 51.366316, -0.762920 ], + }; +} + +sub example_places { + return ( 'GU51 4JX', 'Primrose Drive' ); +} + +sub hidden_categories { + return ( + 'Graffiti on bridges/subways', + ); +} + +sub send_questionnaires { + return 0; +} + +sub ask_ever_reported { + return 0; +} + +sub contact_email { + my $self = shift; + return join( '@', 'info', 'hart.gov.uk' ); +} +sub contact_name { 'Hart District Council (do not reply)'; } + +sub default_map_zoom { 3 } + +sub reports_per_page { return 20; } + +1; + diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index 2c18d4e22..ec3423f35 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -99,13 +99,19 @@ sub recent_photos { return $self->problems->recent_photos( $num, $lat, $lon, $dist ); } +# Returns true if the cobrand owns the problem. +sub owns_problem { + my ($self, $report) = @_; + my $bodies = $report->bodies; + my %areas = map { %{$_->areas} } values %$bodies; + return $areas{$self->council_id} ? 1 : undef; +} + # If we ever link to a county problem report, needs to be to main FixMyStreet sub base_url_for_report { my ( $self, $report ) = @_; if ( $self->is_two_tier ) { - my $bodies = $report->bodies; - my %areas = map { %{$_->areas} } values %$bodies; - if ( $areas{$self->council_id} ) { + if ( $self->owns_problem( $report ) ) { return $self->base_url; } else { return FixMyStreet->config('BASE_URL'); diff --git a/perllib/FixMyStreet/DB/ResultSet/AlertType.pm b/perllib/FixMyStreet/DB/ResultSet/AlertType.pm index a2784950a..cc4fc67fc 100644 --- a/perllib/FixMyStreet/DB/ResultSet/AlertType.pm +++ b/perllib/FixMyStreet/DB/ResultSet/AlertType.pm @@ -58,6 +58,7 @@ sub email_alerts ($) { while (my $row = $query->fetchrow_hashref) { my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker($row->{alert_cobrand})->new(); + $cobrand->set_lang_and_domain( $row->{alert_lang}, 1, FixMyStreet->path_to('locale')->stringify ); # Cobranded and non-cobranded messages can share a database. In this case, the conf file # should specify a vhost to send the reports for each cobrand, so that they don't get sent @@ -204,7 +205,7 @@ sub _send_aggregated_alert_email(%) { my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker($data{cobrand})->new(); - $cobrand->set_lang_and_domain( $data{lang}, 1 ); + $cobrand->set_lang_and_domain( $data{lang}, 1, FixMyStreet->path_to('locale')->stringify ); if (!$data{alert_email}) { my $user = FixMyStreet::App->model('DB::User')->find( { diff --git a/perllib/Open311/GetServiceRequestUpdates.pm b/perllib/Open311/GetServiceRequestUpdates.pm index 114a9cd8d..f7b758137 100644 --- a/perllib/Open311/GetServiceRequestUpdates.pm +++ b/perllib/Open311/GetServiceRequestUpdates.pm @@ -139,17 +139,19 @@ sub update_comments { $comment->insert(); if ( $self->suppress_alerts ) { - my $alert = FixMyStreet::App->model('DB::Alert')->find( { + my @alerts = FixMyStreet::App->model('DB::Alert')->search( { alert_type => 'new_updates', parameter => $p->id, confirmed => 1, user_id => $p->user->id, } ); - my $alerts_sent = FixMyStreet::App->model('DB::AlertSent')->find_or_create( { - alert_id => $alert->id, - parameter => $comment->id, - } ); + for my $alert (@alerts) { + my $alerts_sent = FixMyStreet::App->model('DB::AlertSent')->find_or_create( { + alert_id => $alert->id, + parameter => $comment->id, + } ); + } } } } diff --git a/t/app/model/alert_type.t b/t/app/model/alert_type.t index ac8013278..ae413978f 100644 --- a/t/app/model/alert_type.t +++ b/t/app/model/alert_type.t @@ -487,6 +487,31 @@ subtest "check local alerts from cobrand send main site url for alerts for diffe like $body, qr#$expected2#, 'cobrand area report point to cobrand url'; }; +# Test that email alerts are sent in the right language. +subtest "correct i18n-ed summary for state of closed" => sub { + $mech->clear_emails_ok; + + $report->update( { state => 'closed' } ); + $alert->update( { lang => 'nb', cobrand => 'fiksgatami' } ); + + FixMyStreet::App->model('DB::AlertSent')->search( { + alert_id => $alert->id, + parameter => $comment->id, + } )->delete; + + FixMyStreet::override_config { + ALLOWED_COBRANDS => [ 'fiksgatami' ], + }, sub { + FixMyStreet::App->model('DB::AlertType')->email_alerts(); + }; + + $mech->email_count_is( 1 ); + my $email = $mech->get_email; + my $body = $email->body; + my $msg = 'Denne rapporten er for tiden markert som lukket'; + like $body, qr/$msg/, 'email says problem is closed, in Norwegian'; +}; + END { $mech->delete_user($user) if $user; $mech->delete_user($user2) if $user2; diff --git a/t/cobrand/hart.t b/t/cobrand/hart.t new file mode 100644 index 000000000..f4a2473eb --- /dev/null +++ b/t/cobrand/hart.t @@ -0,0 +1,16 @@ +use strict; +use warnings; +use Test::More; + +use FixMyStreet::TestMech; +my $mech = FixMyStreet::TestMech->new; + +FixMyStreet::override_config { + ALLOWED_COBRANDS => [ 'hart' ], +}, sub { + ok $mech->host("hart.fixmystreet.com"), "change host to hart"; + $mech->get_ok('/'); + $mech->content_like( qr/Hart\b/ ); +}; + +done_testing(); @@ -3,15 +3,12 @@ use warnings; use Test::More; -use FixMyStreet; -use mySociety::Locale; -use Encode; -use Data::Dumper; use HTTP::Headers; use Sort::Key qw(keysort); use POSIX 'strcoll'; -local $Data::Dumper::Sortkeys = 1; -use utf8; + +use FixMyStreet; +use mySociety::Locale; # check that the mo files have been generated die "You need to run 'commonlib/bin/gettext-makemo --quiet FixMyStreet' " @@ -59,10 +56,6 @@ my @EN_sorted = qw( A Å Ø Z ); my @NO_sorted = qw( A Z Ø Å ); my @default_sorted = qw( A Z Å Ø ); -sub utf8_diag { - diag encode_utf8( Dumper(@_) ); -} - { mySociety::Locale::negotiate_language( # diff --git a/t/open311/getservicerequestupdates.t b/t/open311/getservicerequestupdates.t index 4e10766d6..00c25a83e 100644 --- a/t/open311/getservicerequestupdates.t +++ b/t/open311/getservicerequestupdates.t @@ -627,10 +627,22 @@ foreach my $test ( { foreach my $test ( { desc => 'normally alerts are not suppressed', + num_alerts => 1, suppress_alerts => 0, }, { desc => 'alerts suppressed if suppress_alerts set', + num_alerts => 1, + suppress_alerts => 1, + }, + { + desc => 'alert suppression ok even if no alerts', + num_alerts => 0, + suppress_alerts => 1, + }, + { + desc => 'alert suppression ok even if 2x alerts', + num_alerts => 2, suppress_alerts => 1, } ) { @@ -652,12 +664,14 @@ foreach my $test ( { $problem->lastupdate( $dt->subtract( hours => 3 ) ); $problem->update; - my $alert = FixMyStreet::App->model('DB::Alert')->find_or_create( { - alert_type => 'new_updates', - parameter => $problem->id, - confirmed => 1, - user_id => $problem->user->id, - } ); + my @alerts = map { + my $alert = FixMyStreet::App->model('DB::Alert')->create( { + alert_type => 'new_updates', + parameter => $problem->id, + confirmed => 1, + user_id => $problem->user->id, + } ) + } (1..$test->{num_alerts}); $requests_xml =~ s/UPDATED_DATETIME/$dt/; @@ -674,19 +688,21 @@ foreach my $test ( { my $alerts_sent = FixMyStreet::App->model('DB::AlertSent')->search( { - alert_id => $alert->id, + alert_id => [ map $_->id, @alerts ], parameter => $problem->comments->first->id, } ); if ( $test->{suppress_alerts} ) { - ok $alerts_sent->count(), 'alerts suppressed'; + is $alerts_sent->count(), $test->{num_alerts}, 'alerts suppressed'; } else { is $alerts_sent->count(), 0, 'alerts not suppressed'; } $alerts_sent->delete; - $alert->delete; + for my $alert (@alerts) { + $alert->delete; + } } } diff --git a/templates/email/zurich/problem-closed.txt b/templates/email/zurich/problem-closed.txt index 2e4526b7c..392004504 100644 --- a/templates/email/zurich/problem-closed.txt +++ b/templates/email/zurich/problem-closed.txt @@ -15,8 +15,6 @@ Ihre Meldung lautet: [% problem.detail %] -Haben Sie schon an der Umfrage zu <<Züe neu>> (Dauer: 1 min.) teilgenommen? - https://www.zueriwieneu.ch/umfrage Freundliche Grüsse diff --git a/templates/email/zurich/problem-external.txt b/templates/email/zurich/problem-external.txt index 89c1d86b0..dbac3d563 100644 --- a/templates/email/zurich/problem-external.txt +++ b/templates/email/zurich/problem-external.txt @@ -15,8 +15,6 @@ Ihre Meldung lautet: [% problem.detail %] -Haben Sie schon an der Umfrage zu <<Züe neu>> (Dauer: 1 min.) teilgenommen? - https://www.zueriwieneu.ch/umfrage Freundliche Grüsse diff --git a/templates/web/default/my/my.html b/templates/web/default/my/my.html index a6e4000df..48a33a1d2 100644 --- a/templates/web/default/my/my.html +++ b/templates/web/default/my/my.html @@ -13,6 +13,11 @@ <h1>[% loc('Your Reports') %]</h1> +[% IF ! has_content %] +[% tprintf( loc('You haven’t created any reports yet. <a href="%s">Report a problem now.</a>'), + c.uri_for('/') ) %] +[% END %] + [% INCLUDE 'pagination.html', pager = problems_pager, param = 'p' diff --git a/templates/web/default/reports/body.html b/templates/web/default/reports/body.html index 8a443a5fe..2b19e5735 100755 --- a/templates/web/default/reports/body.html +++ b/templates/web/default/reports/body.html @@ -39,6 +39,10 @@ [% END %] </h1> +[% IF c.cobrand.moniker == 'hart' %] + [% INCLUDE '_hart_hants_note.html' %] +[% END %] + [% IF NOT body.areas.size AND c.cobrand.country == 'GB' %] <p id="unknown" class="alert">This council no longer exists. [% IF council.name.match('Penwith|Kerrier|Carrick|Restormel|Caradon|North Cornwall') %] diff --git a/templates/web/fixmystreet/index.html b/templates/web/fixmystreet/index.html index f45509891..4d674a17e 100644 --- a/templates/web/fixmystreet/index.html +++ b/templates/web/fixmystreet/index.html @@ -42,7 +42,13 @@ kinds of problems like missed bins use our [% IF recent_photos.size %] <div id="front-recently"> - <h2>[% loc('Recently reported problems') %]</h2> + <h2> + [% IF c.cobrand.moniker == 'hart' %] + Recently reported + [% ELSE %] + [% loc('Recently reported problems') %] + [% END %] + </h2> <section class="full-width"> <ul class="issue-list-a"> diff --git a/templates/web/fixmystreet/my/my.html b/templates/web/fixmystreet/my/my.html index 12f68bd80..5c4ccf2af 100644 --- a/templates/web/fixmystreet/my/my.html +++ b/templates/web/fixmystreet/my/my.html @@ -13,8 +13,15 @@ <h1>[% loc('Your Reports') %]</h1> +[% IF ! has_content %] +[% tprintf( loc('You haven’t created any reports yet. <a href="%s">Report a problem now.</a>'), + c.uri_for('/') ) %] +[% END %] + [% IF c.cobrand.moniker == 'fixmybarangay' %] [% INCLUDE '_barangay_buttons.html' %] +[% ELSIF c.cobrand.moniker == 'hart' %] + [% INCLUDE '_hart_hants_note.html' %] [% END %] [% INCLUDE 'pagination.html', diff --git a/templates/web/hart/_hart_hants_note.html b/templates/web/hart/_hart_hants_note.html new file mode 100644 index 000000000..a091ad3fc --- /dev/null +++ b/templates/web/hart/_hart_hants_note.html @@ -0,0 +1,5 @@ +<div id="hart_hants_note"> + Note that reports managed by Hampshire County Council are not shown on + this map. View those reports on + <a href="http://www.fixmystreet.com/reports/Hampshire">FixMyStreet.com</a> +</div> diff --git a/templates/web/hart/around/intro.html b/templates/web/hart/around/intro.html new file mode 100644 index 000000000..7cc971041 --- /dev/null +++ b/templates/web/hart/around/intro.html @@ -0,0 +1,4 @@ + <div id="postcode-intro"> + <h1> Report something in Hart that needs to be fixed </h1> + <h2> (like graffiti, fly tipping, broken paving slabs, or street lighting) </h2> + </div> diff --git a/templates/web/hart/contact/submit.html b/templates/web/hart/contact/submit.html new file mode 100644 index 000000000..781862866 --- /dev/null +++ b/templates/web/hart/contact/submit.html @@ -0,0 +1,19 @@ +[% INCLUDE 'header.html', title = loc('Contact Us') %] + +<h1>[% loc('Contact the team') %]</h1> + +[% IF success %] + +<p>Thank you for letting us know about this report. We will review, and if +necessary, edit the report, or remove it from the site. You can contact us at +<a href="mailto:[% contact_email %]">[% contact_email %]</a>. + +[% ELSE %] + + <p> + [% tprintf( loc('Failed to send message. Please try again, or <a href="mailto:%s">email us</a>.'), contact_email ) %] + </p> + +[% END %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/hart/faq/faq-en-gb.html b/templates/web/hart/faq/faq-en-gb.html new file mode 100755 index 000000000..0379b0745 --- /dev/null +++ b/templates/web/hart/faq/faq-en-gb.html @@ -0,0 +1,132 @@ +[% INCLUDE 'header.html', title = 'Help', bodyclass = 'fullwidthpage' %] + +<h1> Frequently Asked Questions </h1> + +<p>These pages are for reporting things which are broken, dirty, damaged or dumped, and need fixing, cleaning or clearing, such as the following (<a href="http://hart.gov.uk/index/customer_services/a-z_of_services.htm">See the full list</a>):</p> +<ul> + <li>abandoned vehicles + <li>graffiti + <li>flytipping and dumped rubbish + <li>street cleaning, such as dog fouling and street sweeping + <li>unlit lamp posts + <li>potholes + </ul> +<p> Note that though most of these services are provided by Hart District Council, while FixMyStreet will forward some categories of issue to Hampshire County Council. </p> + +<dl> + <dt>What issues can’t be reported here?</dt> + <dd><p>The following problems should be reported via + <a href="http://www.hart.gov.uk/online-forms">www.hart.gov.uk/online-forms</a>:</p> + <ul> + <li>missed rubbish or recycling collections + <li>anti-social behaviour + <li>noise pollution or barking dogs + <li>fires and smoke/smell pollution + <li>proposals for speed bumps/ CCTV/ pedestrian crossings/ new road layouts/ etc. + <li>complaining about your neighbours + <li>complaining or commenting about the council + </ul> + + </dd> + + <dt><a name="emergencies"></a>Reporting emergencies (Out of Hours)</dt> + <dd> + <p> Please do not report problems which present an immediate risk to life, for example missing manhole covers or a fallen lamp column. </p> + <p> Issues reported via the website are only actioned during office hours. If you require an Out of Hours service please ring our main number 01252 622122 and a message will direct you to the relevant Council Out of Hours service. </p> + + </dd> + + <dt>How do I report a problem here?</dt> + <dd>After entering a postcode or location, you are shown +a map of that area. You can view problems already reported in that area, +or report ones of your own by clicking on the map at the location of +the problem.</dd> + <dt>How are the problems solved?</dt> + <dd>They are reported directly to us so we can then resolve the problem. + You can also discuss the problem on the website with others if you wish.</dd> + + <dt>Do you remove silly or illegal content?</dt> + <dd>Hart District Council and FixMyStreet are not responsible for the content and accuracy +of material submitted by its users. We reserve the right to edit or remove any +problems or updates which we consider to be inappropriate upon being informed +by a user of the site.</dd> + + <dt>Can I use FixMyStreet on my mobile?</dt> + <dd> + <p>The FixMyStreet website will already work on your mobile phone, adapting to + the size of your screen automatically. Using an app has some advantages, though + — for example, you can create a report even when you have no network + connection. + <ul> + <li> + <a href="https://itunes.apple.com/gb/app/fixmystreet/id297456545">FixMyStreet app for iPhone</a> + <li> + <a href="https://play.google.com/store/apps/details?id=org.mysociety.FixMyStreet">FixMyStreet app for Android</a> + <li><em>Nokia:</em> A volunteer, Thomas Forth, has written an app available from the + <a href="http://store.ovi.com/content/107557">Ovi Store</a>. + </ul> + </dd> + + <dt>Can I use these pages to report problems outside of the Hart District?</dd> + <dd>Yes, if you enter a postcode or address outside the borough you will be re-directed to the main FixMyStreet site that will enable you to report problems elsewhere. FixMyStreet will forward these on to the relevant council.</dd> + + <dt>The site is powered by FixMyStreet, who are they?</dt> + <dd>FixMyStreet was built by <a href="http://www.mysociety.org/">mySociety</a>, in conjunction with the <a href="http://www.youngfoundation.org.uk/">Young Foundation</a>. +mySociety is the project of a registered charity which has grown out of the community of +volunteers who built sites like <a href="http://www.theyworkforyou.com/">TheyWorkForYou</a>. +mySociety’s primary mission is to build Internet projects which give people simple, tangible +benefits in the civic and community aspects of their lives. +The charity is called UK Citizens Online Democracy and is charity number 1076346. mySociety +can be contacted by email at <a href="mailto:hello@mysociety.org">hello@mysociety.org</a>, +or by post at mySociety, 483 Green Lanes, London, N13 4BS.</dd> + + <dt>Why does the site use kilometres for measurements?</dt> + <dd>The British national + grid reference system, devised by Ordnance Survey (the British national + mapping agency) around the time of the second world war, uses eastings and + northings measured in metres and kilometres; the maps we use are from + Ordnance Survey and so this is what we use to display distances. + There you have it: not everything British is in miles!</dd> + + <dt>Why can’t I zoom out more on the reporting map?</dt> + <dd>We want to keep reports locally focused, so we restrict the ability to + move radically between areas. The map on <a href="/my">Your Reports</a> will let you see all + the reports you’ve made, wherever they are.</dd> + + <dt>I’d like a site like this for my own location/ where’s the "source code" to this site?</dt> + <dd> +The mySociety software behind this site is open source, and available +under the GNU Affero GPL software license. You can <a +href="http://github.com/mysociety/fixmystreet">download the +source code</a> and help mySociety develop it. +You’re welcome to use it in your own projects, although you must also +make available the source code to any such projects. +<a href="http://www.fiksgatami.no/">Fiksgatami</a> is an example of our code +being used in a Norwegian version of this site. +</dd> + +</dl> + + <h2><a name="privacy"></a>Privacy Questions</h2> + + <dl> + <dt>Who gets to see my email address?</dt> + <dd> +<p>If you submit a problem, your details, and details of the problem, will be +submitted to Hart District Council, or Hampshire County Council, as +appropriate. Other than the council, only people we authorise to view the +FixMyStreet administration interface will be able to see your email address and +they will never use it for anything other than to help administer +FixMyStreet.</p> +<p>We will never give or sell your email address to anyone else, unless we are +obliged to by law. Your name will not be published anywhere unless you let us.</p> +</dd> + + <dt>What emails will you send to me?</dt> + <dd>We will email you when we have received your report, and when it has + been investigated and actioned. We will only send you emails that + relate to an issue you have reported.</dd> + + </dl> + +[% INCLUDE 'footer.html' pagefooter = 'yes' %] diff --git a/templates/web/hart/footer.html b/templates/web/hart/footer.html new file mode 100644 index 000000000..ebdd74d51 --- /dev/null +++ b/templates/web/hart/footer.html @@ -0,0 +1,110 @@ + </div><!-- .content role=main --> + + </div><!-- .container --> + + </div><!-- .table-cell --> + + <div class="nav-wrapper clearfix"> + <div class="main-menu-wrapper"> + <div class="main-menu"> + <ul class="clearfix"> + <li class="home"><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn" + >[% "Report" %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/my' OR ( c.req.uri.path == '/auth' AND c.req.params.r == 'my' ) %]span[% ELSE %]a href="/my"[% END + %]>[% loc("Your reports") %]</[% ( c.req.uri.path == '/my' OR ( c.req.uri.path == '/auth' AND c.req.params.r == 'my' ) ) ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/reports/Hart' %]span[% ELSE %]a href="/reports/Hart"[% END + %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END + %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>[% + %]<li class="last"><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END + %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li> + </ul> + </div> + </div> + <div class="nav-wrapper-2 clearfix"> + <div id="main-nav" class="clearfix" role="navigation"> + <ul> + <li> + <a href="http://www.hart.gov.uk/home">Home</a> + </li> + <li> + <a href="http://www.hart.gov.uk/services">My Services</a> + </li> + <li> + <a href="http://www.hart.gov.uk/residents">Residents</a> + </li> + <li> + <a href="http://www.hart.gov.uk/businesses">Businesses</a> + </li> + <li> + <a href="http://www.hart.gov.uk/visiting">Visiting</a> + </li> + <li> + <a href="http://www.hart.gov.uk/the-council">The Council</a> + </li> + </ul> + </div> + <div class="sign-in"> + [% IF c.user_exists %] + <p> + [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] + <a href="/auth/sign_out">[% loc('sign out') %]</a> + </p> + [% END %] + </div> + </div> + </div> + + <div class="hart-footer-wrapper"> + <div id="footer_outside_wrapper"> + <div id="footer_inside_wrapper" class="clearfix"> + <div id="footer-right" class="clearfix"> + <ul class="footer-nav"> + <li> <a href="http://www.hart.gov.uk/sitemap">Site map</a> </li> + <li> <a href="http://www.hart.gov.uk/Accessibility">Accessibility</a> </li> + </ul> + </div> + <footer id="hart-footer" class="clearfix"> + <div id="copyright-block" class="desk-only"> + <strong>©</strong> + <a href="http://www.hart.gov.uk/disclaimer" title="More information on the Disclaimer">Hart District Council</a> + </div> + <ul class="footer-nav clearfix"> + <li> <a href="http://www.hart.gov.uk/disclaimer">Disclaimer</a></li> + <li> <a href="http://www.hart.gov.uk/freedom-information">Freedom of Information</a></li> + <li> <a href="http://www.hart.gov.uk/privacy">Privacy</a></li> + </ul> + </footer> + <div class="clearfix" id="footer-row-2"> + <div id="hart-powered-by"> + <a href="http://www.mysociety.org/for-councils/fixmystreet/">Powered by <img src="/cobrands/hart/fms-logo.png" alt="FixMyStreet" style="height:20px;"></a> + </div> + <div id="footer-images"> + <a href="https://twitter.com/HartCouncil"> + <img alt="" src="/cobrands/hart/twitter-logo.png" style="height:43px; width:43px" /> + </a> + <a href="http://www.facebook.com/HartDistrictCouncil"> + <img alt="" src="/cobrands/hart/facebook-logo.png" style="height:43px; margin-right: 10px; width:43px" /> + </a> + <a href="http://www.gov.uk"> + <img alt="" src="/cobrands/hart/gov-logo.png" style="height:43px; width:172px" /> + </a> + </div> + </div> + <div id="footer-row-3"> + <div id="copyright-block-mobile" class="mob-only"> + <strong>©</strong> + <a href="http://www.hart.gov.uk/disclaimer" title="More information on the Disclaimer"> + Hart District Council</a> + </div> + </div> + </div> + </div> + </div> + <div class="footer_border"> + </div> + + +</div> +</body> +</html> diff --git a/templates/web/hart/header.html b/templates/web/hart/header.html new file mode 100644 index 000000000..670ddede0 --- /dev/null +++ b/templates/web/hart/header.html @@ -0,0 +1,82 @@ +<!doctype html> +<!--[if lt IE 7]><html class="no-js ie6 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 7]> <html class="no-js ie7 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 8]> <html class="no-js ie8 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 9]> <html class="no-js ie9 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if gt IE 9]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]--> + <head> + <meta name="viewport" content="initial-scale=1.0"> + + <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> + <meta name="HandHeldFriendly" content="true"> + <meta name="mobileoptimized" content="0"> + + <meta property="og:url" content="[% c.cobrand.base_url %][% c.req.uri.path %]"> + <meta property="og:title" content="[% title || 'FixMyStreet' %]"> + <meta property="og:site_name" content="[% c.cobrand.site_title %]"> + [% IF c.req.uri.path == '/' %]<meta property="og:description" content="Report, view, and discuss local street-related problems.">[% END %] + <meta property="og:type" content="website"> + <meta property="og:image" content="[% c.cobrand.base_url %]/cobrands/fixmystreet/fms-og_image.png"> + <meta property="og:image:type" content="image/png"> + <meta property="og:image:width" content="500"> + <meta property="og:image:height" content="500"> + +[% SET start = c.config.ADMIN_BASE_URL IF admin %] + + <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/base.css') %]"> + <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]" media="(min-width:48em)"> + <link rel="stylesheet" href="[% version('/cobrands/hart/hart.css') %]"> + [% extra_css %] + <!--[if (lt IE 9) & (!IEMobile)]> + <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]"> + <![endif]--> + + <script src="[% start %][% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> + <script src="[% start %][% version('/cobrands/fixmystreet/position_map.js') %]" charset="utf-8"></script> + [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js', site_title = c.cobrand.site_title %] + [% extra_js %] + <script type="text/javascript"> + $(function(){ + var $html = $('html'); + $(window).resize(function(){ + if(!$html.hasClass('mobile')) { + // Hart has a bigger header and so needs more room for + // the map controls + $('#fms_pan_zoom').css({ top: '17.75em' }); + } + }).resize(); + }); + </script> + + [% IF c.req.uri.host == 'osm.fixmystreet.com' %] + <link rel="canonical" href="http://www.fixmystreet.com[% c.req.uri.path_query %]"> + [% END %] + + [% INCLUDE 'tracking_code.html' %] + + <link rel="Shortcut Icon" type="image/x-icon" href="/cobrands/hart/favicon.ico"> + + </head> + [% TRY %][% PROCESS 'set_body_class.html' %][% CATCH file %][% END %] + <body class="[% bodyclass | html IF bodyclass %]"> + + <div class="wrapper"> + <div class="table-cell"> + <header id="site-header" role="banner"> + <div class="mobile-header-nav"> + <ul> + <li> <a href="http://www.hart.gov.uk/"><div class="home-icon"> </div></a> + <li> <a href="#main-nav"><div class="menu-icon"> </div></a> + </ul> + </div> + <div class="header-container"> + <a id="site-logo" href="http://www.hart.gov.uk">Hart District Council</a> + </div> + </header> + + [% pre_container_extra %] + + <div class="container"> + <div class="content[% " $mainclass" | html IF mainclass %]" role="main"> + + <!-- [% INCLUDE 'debug_header.html' %] --> diff --git a/templates/web/hart/index-steps.html b/templates/web/hart/index-steps.html new file mode 100644 index 000000000..450a793c9 --- /dev/null +++ b/templates/web/hart/index-steps.html @@ -0,0 +1,18 @@ +<h2> How to report </h2> + +<ol class="big-numbers"> + <li>[% question %]</li> + <li> Locate it on a map of the area </li> + <li> Enter its details </li> + <li>Confirm the report and [% c.cobrand.council_name %] will investigate</li> +</ol> + +<div id="hart_hants_note"> + This site can also be used to report problems to Hampshire County Council via FixMyStreet. +</div> + +<section class="full-width"> +[% INCLUDE "front/stats.html" %] +[% TRY %][% INCLUDE "front/tips.html" %][% CATCH file %][% END %] +</section> + diff --git a/templates/web/hart/report/new/councils_extra_text.html b/templates/web/hart/report/new/councils_extra_text.html new file mode 100644 index 000000000..e3e5fb27e --- /dev/null +++ b/templates/web/hart/report/new/councils_extra_text.html @@ -0,0 +1,10 @@ +<div id="hart_hants_note"> +<p> +<b>NB:</b> though we will forward your request as appropriate, +reports for problems managed by Hampshire County Council are not shown on this map. +View all problems in this area on +<a href="http://www.fixmystreet.com/reports/Hampshire">FixMyStreet.com</a>. +</p> +</div> + +Do not use this to <a href="/faq#emergencies">report emergencies outside of working hours</a>. diff --git a/templates/web/hart/tokens/confirm_problem.html b/templates/web/hart/tokens/confirm_problem.html new file mode 100644 index 000000000..117d2d1bc --- /dev/null +++ b/templates/web/hart/tokens/confirm_problem.html @@ -0,0 +1,21 @@ +[% INCLUDE 'header.html', title = loc('Confirmation') %] + +<h1>[% loc('Confirmation') %]</h1> + +<p class="confirmed"> +Thank you. You have successfully confirmed your report +[% IF c.cobrand.owns_problem( problem ) %] +and this will now be investigated by the council. +You can <a href="[% c.cobrand.base_url_for_report( problem ) %][% problem.url %]">view the problem on this site</a>. +[% ELSE %] +and this has now been passed on to [%# TODO make this generic %] <b>Hampshire County Council</b> to investigate. +Note that Hart District Council is not responsible for this type of problem. However you can continue to view your problem on the <a href="[% c.cobrand.base_url_for_report( problem ) %][% problem.url %]"><i>fixmystreet.com</i> website</a>. +[% END %] +</p> + +<p>Your reference for this problem is [% problem.id %], please quote it in any enquiries. +</p> + +[% display_crosssell_advert( problem.user.email, problem.name ) %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/southampton/header.html b/templates/web/southampton/header.html index 430b8027c..113803492 100644 --- a/templates/web/southampton/header.html +++ b/templates/web/southampton/header.html @@ -5,7 +5,7 @@ <!--[if gt IE 8]><!--><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="[% lang_code %]" lang="[% lang_code %]"><!--<![endif]--> <head> <link rel="stylesheet" type="text/css" href="[% version('/css/core.css') %]"> - <link rel="stylesheet" type="text/css" href="/cobrands/southampton/css/style.css" /> + <link rel="stylesheet" type="text/css" href="[% version('/cobrands/southampton/css/style.css') %]" /> <link rel="stylesheet" type="text/css" href="[% version('/cobrands/southampton/css.css') %]" /> [% INCLUDE 'common_header_tags.html', site_title = 'Southampton City Council FixMyStreet' %] diff --git a/web/cobrands/hart/_colours.scss b/web/cobrands/hart/_colours.scss new file mode 100644 index 000000000..ce47a17c4 --- /dev/null +++ b/web/cobrands/hart/_colours.scss @@ -0,0 +1,20 @@ +/* COLOURS */ + +$hart_primary: #7ECBA2; + +$primary: $hart_primary; +$col_click_map: $hart_primary; +$col_click_map_dark: $hart_primary; +$col_fixed_label_dark: $hart_primary; +$col_fixed_label: $hart_primary; + +$primary_b: #000000; +$primary_text: #ffffff; + +$base_bg: #ffffff; +$base_fg: #1a1a1a; + +/* Unused here */ +$map_nav_bg: #222; +$nav_fg: #fff; +$nav_fg_hover: #444; diff --git a/web/cobrands/hart/base.scss b/web/cobrands/hart/base.scss new file mode 100644 index 000000000..c163f3fcd --- /dev/null +++ b/web/cobrands/hart/base.scss @@ -0,0 +1,104 @@ +@import "../sass/h5bp"; +@import "./_colours"; +@import "../sass/mixins"; +@import "compass"; + +@import "../sass/base"; + +a, a:visited { + color: #369; + &:hover, &:active { + color: #369; + } +} + +.issue-list-a { + li { + color:#666; + a { + color:#666; + } + } +} + +h1.main { + color: $primary; + text-align: center; + margin: 0.5em 0; +} + +.container { + padding: 0 1em 1em; /* if remove this 1em, need to edit .full-width! */ +} + +#site-header { + background: $primary; + height: 57px; + + + .mobile-header-nav { + height: 56px; + float: right; + li { + a, a:hover {text-decoration:none;} + list-style-type: none; + float: left; + div { + height: 57px; + width: 57px; + background-repeat: no-repeat; + background-position: 50% 50%; + } + .home-icon { background-image: url('/cobrands/hart/home_mobile.png'); } + .search-icon { background-image: url('/cobrands/hart/search_mobile.png'); } + .menu-icon { background-image: url('/cobrands/hart/menu_mobile.png'); } + } + } +} + +// Colour tab to match colour scheme +#nav-link { + width: 50px; + height: 48px; + background: url('/cobrands/hart/tab-blue.png') 0 0 no-repeat; +} + +#problems-nav { + border-bottom:0.25em solid $primary; + ul li a { + text-transform: none; + color: #666; + &.active { + background: $primary; + color: #fff; + } + } +} + +.big-green-banner { + text-transform: none; + z-index: 0; +} + +#form_sign_in { + margin-top: 1em; +} + +#front-main { + /* default on mobile view, preventing jagged hart-green box */ + + margin: 0; + padding: 1em; + + #postcodeForm { + padding: 1em; + div { + padding-top: 0px; + input#pc { + } + input#sub { + height: 100%; + } + } + } +} diff --git a/web/cobrands/hart/config.rb b/web/cobrands/hart/config.rb new file mode 100644 index 000000000..cab97b18f --- /dev/null +++ b/web/cobrands/hart/config.rb @@ -0,0 +1,25 @@ +# Require any additional compass plugins here. + +# Set this to the root of your project when deployed: +http_path = "/" +css_dir = "" +sass_dir = "" +images_dir = "" +javascripts_dir = "" + +# You can select your preferred output style here (can be overridden via the command line): +# output_style = :expanded or :nested or :compact or :compressed + +# To enable relative paths to assets via compass helper functions. Uncomment: +# relative_assets = true + +# To disable debugging comments that display the original location of your selectors. Uncomment: +# line_comments = false + +# If you prefer the indented syntax, you might want to regenerate this +# project again passing --syntax sass, or you can uncomment this: +# preferred_syntax = :sass +# and then run: +# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass + +line_comments = false # by Compass.app diff --git a/web/cobrands/hart/facebook-logo.png b/web/cobrands/hart/facebook-logo.png Binary files differnew file mode 100755 index 000000000..931c39316 --- /dev/null +++ b/web/cobrands/hart/facebook-logo.png diff --git a/web/cobrands/hart/favicon.ico b/web/cobrands/hart/favicon.ico Binary files differnew file mode 100644 index 000000000..a960bae0a --- /dev/null +++ b/web/cobrands/hart/favicon.ico diff --git a/web/cobrands/hart/favicon.png b/web/cobrands/hart/favicon.png Binary files differnew file mode 100644 index 000000000..0acd804e7 --- /dev/null +++ b/web/cobrands/hart/favicon.png diff --git a/web/cobrands/hart/fms-logo.png b/web/cobrands/hart/fms-logo.png Binary files differnew file mode 100644 index 000000000..23bea6b0f --- /dev/null +++ b/web/cobrands/hart/fms-logo.png diff --git a/web/cobrands/hart/gov-logo.png b/web/cobrands/hart/gov-logo.png Binary files differnew file mode 100755 index 000000000..d5fc93455 --- /dev/null +++ b/web/cobrands/hart/gov-logo.png diff --git a/web/cobrands/hart/hart-logo-inverse-small.gif b/web/cobrands/hart/hart-logo-inverse-small.gif Binary files differnew file mode 100644 index 000000000..899567e6d --- /dev/null +++ b/web/cobrands/hart/hart-logo-inverse-small.gif diff --git a/web/cobrands/hart/hart-logo-mobile.png b/web/cobrands/hart/hart-logo-mobile.png Binary files differnew file mode 100755 index 000000000..0c779121e --- /dev/null +++ b/web/cobrands/hart/hart-logo-mobile.png diff --git a/web/cobrands/hart/hart-logo.png b/web/cobrands/hart/hart-logo.png Binary files differnew file mode 100755 index 000000000..7dd453c3e --- /dev/null +++ b/web/cobrands/hart/hart-logo.png diff --git a/web/cobrands/hart/hart.scss b/web/cobrands/hart/hart.scss new file mode 100644 index 000000000..b2602a06e --- /dev/null +++ b/web/cobrands/hart/hart.scss @@ -0,0 +1,475 @@ +/* + + CARGO CULTED FROM BROMLEY FOR NOW + + */ + +@import "compass"; +@import "_colours"; + +/* from http://nicolasgallagher.com/micro-clearfix-hack/ */ +.clearfix:before, +.clearfix:after { content: " "; display: table; } +.clearfix:after { clear: both; } +/* For IE 6/7 only */ +.clearfix { *zoom: 1; } + + +// Taken from Bromley's form css +input[type=text], +input[type=password], +input[type=email], +input[type=file], +textarea, +select { background: #fff; border: 1px solid #768b9a; border-color: #768b9a #d1dee8 #d1dee8 #768b9a; color: #333; font-family: "Gill Sans MT", "Gill Sans", Arial, 'Helvetica Neue', Helvetica, sans-serif; padding: 8px; +@include border-radius(0); } + +.green-btn, button.green-btn, input.green-btn { + background: #5b7189; + border: 1px solid #8e9eb0; + color: #fff; + font-family: 'Gill Sans MT', 'Gill Sans', 'Trebuchet MS', Calibri, sans-serif; + font-weight: normal; + margin: 0; min-height: 23px; + /* outline: 1px solid #405062; */ + padding: 4px 8px; + text-transform: uppercase; +} +.green-btn:hover, button.green-btn:hover, input.green-btn:hover { + background: #5b7189; border: 1px solid #8e9eb0; +} +.form-txt-submit-box input[type=submit] { + padding-top: 0; padding-bottom: 0; width: auto; +} + + +h1, h2, h3, h4, h5, h6, legend { font-family: 'Gill Sans MT', 'Gill Sans', 'Trebuchet MS', Calibri, sans-serif; } +body { color: #333; font-family: "Gill Sans MT", "Gill Sans", Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 1.4; background-color: $base_bg;} + +.nav-wrapper-2, +body.mappage .nav-wrapper .nav-wrapper-2, +body.frontpage .nav-wrapper-2 { + border: 0; + border-top: solid 4px $hart_primary; /* otherwise overridden in base layout.scss + for some templates only */ + min-height: auto; + background-color: $hart_primary; + + @media only screen and (min-width:48em) { + height: 173px; + } +} + +@media only screen and (min-width:48em) { + body.frontpage #site-header { + height: 13em; + + .mobile-header-nav { + display: none; + } + } + + #skipped-map { + clear: both; + margin-top: 3em; /* required to push "Your Reports" visible on Safari/IE */ + } + + #main-nav { + margin-top: 106px; + + ul { + margin-left: 157px; + float: none; + } + } + + #main-nav ul li { + text-align: center; + text-transform: uppercase; + padding: 0 15px; + font-size: 16px; + border-right: solid 1px white; + line-height: 1.5em; + } + + #main-nav ul li a { + padding: 0; + font-size: inherit; + } + + #main-nav ul li:last-child { + border-right: none; + } + + #main-nav ul li a:link, #main-nav ul li a:visited { + color: #fff; + } + + #main-nav ul li:hover, #main-nav ul li:hover a, { + background-color: white; + color: black; + text-decoration: none; + } +} + +@media only screen and (max-width: 61em) and (min-width: 48em) { + #main-nav { + padding-left: 0px; + float:none; + } +} + +/* -------- For Google translate select box only */ +.header-nav div#google_translate_element .goog-te-gadget { font-family: "Gill Sans MT", Arial, 'Helvetica Neue', Helvetica, sans-serif; } +.header-nav div#google_translate_element .goog-te-gadget .goog-te-combo { margin:5px 0 0 5px; padding:0 0 0 2px; background: #9b9b9b; color: #fff; border: 1px solid #606060; font-size: 12px; width: 138px;} +.header-nav div#google_translate_element .goog-te-gadget .goog-te-combo option { background:#fff; color: #666; padding: 1px 0; margin: 0; } +/* --- */ + +body.frontpage #site-logo, +#site-logo { + display: block; + background: url("/cobrands/hart/hart-logo-mobile.png") 0 0 no-repeat; + margin: 10px; + padding-left: 10px; + position: static; + @media only screen and (min-width: 48em) { + position: relative; + top: 1em; + margin: 0; + margin-left: 2.25em; + padding: 0; + background: url("/cobrands/hart/hart-logo.png") 0 0 no-repeat; + width: 123px; + height: 132px; + } +} + +.sign-in { + display: none; +} +@media only screen and (min-width:48em) { + .sign-in { + display: block; + float:right; + margin-top:-87px; + height: 2em; + } +} +.sign-in a:link, .sign-in a:visited {color:#333; font-weight:bold; text-decoration:none;} +.sign-in a:hover, .sign-in a:active {text-decoration:underline;} + +.main-menu-wrapper { + /* z-index:2; */ + background-color: #FFF; + width:100%; + @media only screen and (min-width:48em) { + position: absolute; + } +} + +@media only screen and (min-width:48em) { + body.mappage .main-menu-wrapper { + position: fixed + } +} + +.main-menu { + + li { + font-family: 'Gill Sans MT', 'Gill Sans', 'Trebuchet MS', Calibri, sans-serif; + margin: 0; + + span { display: none } + + a { + padding: 0.5em 1em; + background: #f6f6f6; + color: #333; + font-size: 1.25em; + border-bottom: 0.25em solid #333; + display: block; + + &:link, &:visited { + color: $hart_primary; + text-decoration: none; + } + &:hover { + background-color: $hart_primary; + color: #FFF; + } + } + } + @media only screen and (min-width:48em) { + margin-top: 173px; + height: 2em; + max-width: 60em; + margin: 173px auto 0 auto; + + li { + float: left; + margin-left: 1em; + text-align: center; + + span { + display: inline; + } + + a { + padding: 0; + background: #fff; + color: #333; + font-size: 1em; + border-bottom: 0; + display: inline; + + &:link, &:visited { + color: $hart_primary; + text-decoration: none; + } + &:hover { + background-color: #fff; + color: $hart_primary; + text-decoration: underline; + } + } + } + } +} + +#front-main { + background-color: #FFF; + + #front-main-container { + padding-bottom: 1em; + } +} + +#postcode-intro { + background-color: #FFF; + color: $hart_primary; + padding-bottom: 1em; +} + +.content, +body.frontpage .table-cell .content { + margin-bottom: 2em; +} + +.hart-footer-wrapper { + + background-color: #4F5757; + clear: both; + height: auto; + overflow: hidden; + padding: 15px 15px 50px 15px; + color:#fff; + + @media only screen and (min-width:48em) { + margin-left:-15px; + padding: 35px 25px 40px 25px; + } + + #footer_outside_wrapper { + max-width: 60em; + margin: 0 auto; + #footer_inside_wrapper { + display: block; + + #footer-right { + @media only screen and (min-width:48em) { + float: right; + width: 30%; + } + + .region-footer-right { + float: left; + max-width: 319px; + } + } + #footer-images { + width: 50%; + text-align: right; + padding-bottom: 10px; + margin-bottom: 0px; + @media only screen and (min-width:48em) { + margin-top: 1.5em; + padding-bottom: 1em; + } + float: right!important; + text-decoration: none!important; + img { + margin-bottom: 5px; + } + a, a:hover, a:active { + text-decoration: none; + } + } + } + } + .footer_border { + display: block; + } + p { + margin: 0; + } + a:link, a:visited { + color: #fff; text-decoration: none; + } + a:hover, a:active { + text-decoration: underline; + } + + footer#hart-footer { + margin-top: 0; + + @media only screen and (min-width:48em) { + width: 70%; + float: left; + } + } + + #copyright-block { + float: left; + margin-left: 1em; + } + #copyright-block-mobile { + margin-left: 10px; + } + + #footer-row-2 { + margin-top: 2em; + } + + .footer-nav, { + height:35px; + + margin-left: 0; + margin-bottom: 0; + + @media only screen and (min-width:48em) { + float: right; + } + + li { + list-style-type: none; + float: left; + width: 50%; + margin-bottom: 0; + + a { + display: block; + border-bottom:1px solid #797f7f; + padding: 10px 0; + margin-left: 10px; + margin-right: 10px; + } + @media only screen and (min-width:48em) { + border-right:1px solid #fff; + width: auto; + a { + border-bottom: none; + padding: 0 10px; + margin-left: 0; + margin-right: 0; + } + &:last-child { + border: none; + padding-right: 0; + } + } + } + } +} + +// IE specific CSS +.ie6 { + div { zoom: 1; } + .hart-wrapper { padding: 0; } + #hart-footer { margin: 0; } + //#search input { padding: 8px 5px 2px; } + //#search input.button { padding: 0; width: 68px; line-height: 24px; } + input.button { overflow: visible; width: 1%; } +} +.ie7 { + div { zoom: 1; } + //#search input { padding: 8px 5px 2px; } + //#search input.button { padding: 0; width: 68px; line-height: 24px; } + input.button { overflow: visible; } +} +.ie8 { + //#search input { padding: 8px 5px 2px; } + //#search input.button { padding: 0; line-height: 24px; } +} + +// mySociety additions +.hart-header { + font-size: 12px; + clear: both; +} + +.header-nav ul { + margin: 0; +} + +.header-nav li { + list-style-type: none; +} + +.main-menu ul { + margin: 0; + padding-top: 8px; +} + +.main-menu li { + list-style-type: none; + color: #000; +} + +.main-menu li.last { + padding-right: 0; +} + +.main-menu li.last a:hover, .main-menu li.last a:active { +} + +//#search input { display: inline; margin: 0; @include border-radius(0em); } +//#search input.button { font-weight: normal; text-transform: none; } +// The footer breaks the map pages layout, easier to exclude it than +// work out how to make it not be broken. +body.mappage .hart-footer-wrapper { + display: none; +} +#hart-powered-by { + float: left; + width: 50%; + a { + margin-left: 10px; + } + @media only screen and (min-width:48em) { + a { + margin-left: 1em; + } + } + img { + float: none; + margin-top: 0; + } +} + +.issue-list-a li .text small { + display: inline; +} + +#fms_pan_zoom { + top: 12em; +} + +#hart_hants_note { + background-color: lighten($hart_primary, 30%); + padding: 0.5em; + font-size: 0.8em; +} + +.banner { + z-index: 1; +} diff --git a/web/cobrands/hart/home_mobile.png b/web/cobrands/hart/home_mobile.png Binary files differnew file mode 100755 index 000000000..a0a568b3d --- /dev/null +++ b/web/cobrands/hart/home_mobile.png diff --git a/web/cobrands/hart/layout.scss b/web/cobrands/hart/layout.scss new file mode 100644 index 000000000..99f8bdfcf --- /dev/null +++ b/web/cobrands/hart/layout.scss @@ -0,0 +1,49 @@ +@import "_colours"; +@import "../sass/layout"; + +@media only screen and (min-width: 48em) { + .content { + margin-top: 8em; + } + .header-container { + max-width: 60em; + margin: 0 auto; + padding: 0em; + position: relative; + } + body.mappage .content { + margin-top: 14em; + } + + #front-main-container { + background-color: $hart_primary; + } + .hart-footer-wrapper { + display: block; + } +} + +#report-a-problem-sidebar { + top: 14em; +} + +body.twothirdswidthpage .content { + width: 30em; + aside { + left: 672px; + width: 208px; + padding: 16px; + @include box-shadow(none); + } + .sticky-sidebar { + left: 672px; + aside { + position: fixed; + top: 14em; + } + } +} + +.content { + @include box-shadow(none); +} diff --git a/web/cobrands/hart/main-menu-hover-home-right.gif b/web/cobrands/hart/main-menu-hover-home-right.gif Binary files differnew file mode 100644 index 000000000..80c11c782 --- /dev/null +++ b/web/cobrands/hart/main-menu-hover-home-right.gif diff --git a/web/cobrands/hart/main-menu1.gif b/web/cobrands/hart/main-menu1.gif Binary files differnew file mode 100644 index 000000000..21ab45668 --- /dev/null +++ b/web/cobrands/hart/main-menu1.gif diff --git a/web/cobrands/hart/menu_mobile.png b/web/cobrands/hart/menu_mobile.png Binary files differnew file mode 100755 index 000000000..61c1c0cf8 --- /dev/null +++ b/web/cobrands/hart/menu_mobile.png diff --git a/web/cobrands/hart/position_map.js b/web/cobrands/hart/position_map.js new file mode 100644 index 000000000..e5bc78c9a --- /dev/null +++ b/web/cobrands/hart/position_map.js @@ -0,0 +1,21 @@ +function position_map_box() { + var $html = $('html'); + if ($html.hasClass('ie6')) { + $('#map_box').prependTo('body').css({ + zIndex: 0, position: 'absolute', + top: 250, left: 0, right: 0, bottom: 0, + width: '100%', height: $(window).height(), + margin: 0 + }); + } else { + $('#map_box').prependTo('body').css({ + zIndex: 0, position: 'fixed', + top: 250, left: 0, right: 0, bottom: 0, + width: '100%', height: '100%', + margin: 0 + }); + } +} + +function map_fix() {} +var slide_wards_down = 0; diff --git a/web/cobrands/hart/tab-blue.png b/web/cobrands/hart/tab-blue.png Binary files differnew file mode 100644 index 000000000..62e6285b7 --- /dev/null +++ b/web/cobrands/hart/tab-blue.png diff --git a/web/cobrands/hart/twitter-logo.png b/web/cobrands/hart/twitter-logo.png Binary files differnew file mode 100755 index 000000000..7e10506e2 --- /dev/null +++ b/web/cobrands/hart/twitter-logo.png diff --git a/web/cobrands/southampton/css/style.css b/web/cobrands/southampton/css/style.css index cd4c0f490..8bdf19aa6 100644 --- a/web/cobrands/southampton/css/style.css +++ b/web/cobrands/southampton/css/style.css @@ -12,10 +12,10 @@ ul#topMenu {width:860px; height:15px; margin:13px auto 3px auto;} ul#topMenu li {float:left; list-style-type:none;}
ul#topMenu a {padding:0 5px 2px 5px; font-size:0.9em; color:#000; font-weight:400;}
-#wrapper {width:960px; height:auto; margin:0 auto; background:url(bg-repeat.gif) repeat-y;}
-#header {width:100%; height:176px; background:url(bg-header.jpg) no-repeat; background-position:1px 0px;}
+#wrapper {width:960px; height:auto; margin:0 auto; background:url(../bg-repeat.gif) repeat-y;}
+#header {width:100%; height:176px; background:url(../bg-header.jpg) no-repeat; background-position:1px 0px;}
#header .logo {float:left; width:87px; height:81px; margin:25px 0 17px 46px;}
-#header a.siteTitle {height:27px; width:287px; background:url(logo.png) no-repeat; display:block; font-family:verdana; float:left; margin:60px 0 0 15px; text-indent:-9999px;}
+#header a.siteTitle {height:27px; width:287px; background:url(../logo.png) no-repeat; display:block; font-family:verdana; float:left; margin:60px 0 0 15px; text-indent:-9999px;}
a.mctv {float:right; height:37px; width:104px; margin:15px 7px 0 0;}
a.mctv img {border:none;}
@@ -24,25 +24,25 @@ a.mctv img {border:none;} #searchWrap form {border:none; padding:0; margin:0 0 10px 0;}
#searchWrap fieldset {border:none; padding:0; margin:0;}
#searchWrap label {color:#1b4384; font-weight:700; font-size:1.1em; margin:0; padding:0;}
-#searchWrap input {float:left; background:url(bg-input.gif) repeat-x; margin:3px 0 0 0; line-height:16px; padding:3px 5px 3px 4px;}
-#searchWrap .button {background:url(bg-button.gif) repeat-x; margin:3px 0 0 5px; float:left; height:26px; padding:0 3px 4px 3px; color:#fff; border:none;}
+#searchWrap input {float:left; background:url(../bg-input.gif) repeat-x; margin:3px 0 0 0; line-height:16px; padding:3px 5px 3px 4px;}
+#searchWrap .button {background:url(../bg-button.gif) repeat-x; margin:3px 0 0 5px; float:left; height:26px; padding:0 3px 4px 3px; color:#fff; border:none;}
.moreInfo {margin:0 0 -2px 2px;}
.text {width:109px; color:#999;}
.text2 {width:137px; color:#999;}
-ul#topNav {width:870px; height:17px; background:#1b4384; clear:both; margin:0 auto; padding:3px 0 1px 0;}
-ul#topNav li {float:left; list-style-type:none; background:url(line.gif) no-repeat 0 2px;}
+ul#topNav {width:870px; height:40px; background:#1b4384; clear:both; margin:0 auto; padding:3px 0 1px 0;}
+ul#topNav li {float:left; list-style-type:none; background:url(../line.gif) no-repeat 0 2px;}
ul#topNav li:first-child {background:none;}
ul#topNav li a {color:#ffffff; font-size:1.2em; padding:0 7px 0 8px; font-size:1.2em; font-weight:400;}
p.atoz {float:left; margin:8px 0 0 43px; padding:5px 5px 3px 0; font-size:1.2em; border-bottom:1px solid #E0DBEF;}
-ul#atoz {width:485px; float:left; margin:13px 0 0 0; border-bottom:1px solid #E0DBEF; padding:0 0 1px 0;}
+ul#atoz {width:420px; float:left; margin:13px 0 0 0; border-bottom:1px solid #E0DBEF; padding:0 0 1px 0;}
ul#atoz li {list-style-type:none; display:inline;}
ul#atoz li a {font-size:13px; font-weight:400;}
ul#contacts {float:right; margin:13px 36px 0 0; padding:0;}
-ul#contacts li {float:left; list-style-type:none; background:url(blue-line.gif) no-repeat 0 2px;}
+ul#contacts li {float:left; list-style-type:none; background:url(../blue-line.gif) no-repeat 0 2px;}
ul#contacts li:first-child {background:none;}
ul#contacts li a {font-size:1.2em; padding:0 8px 0 10px; font-weight:400;}
@@ -54,12 +54,12 @@ ul#contacts li a {font-size:1.2em; padding:0 8px 0 10px; font-weight:400;} #menuBar {width:200px; height:auto; float:left; margin:25px 0 0 43px; padding-bottom:25px; clear:both; }
-ul#leftMenu {height:auto; width:199px; float:left; background:#e9eef7 url(bg-box.gif) no-repeat -1px 100%; padding:0 0 10px 0; margin:5px 0 0 0; overflow:hidden;}
+ul#leftMenu {height:auto; width:199px; float:left; background:#e9eef7 url(../bg-box.gif) no-repeat -1px 100%; padding:0 0 10px 0; margin:5px 0 0 0; overflow:hidden;}
ul#leftMenu li {list-style-type:none; width:199px; padding:0;}
ul#leftMenu li a {display:block; width:100%; line-height:1.5em; padding:3px 10px 3px 32px; font-size:1.2em; font-weight:700;}
-ul#leftMenu li.parent {background:url(bulletActiveSG.gif) no-repeat #768eb5; background-position:10px 11px; color:#fff; padding:3px 0 3px 0;}
+ul#leftMenu li.parent {background:url(../bulletActiveSG.gif) no-repeat #768eb5; background-position:10px 11px; color:#fff; padding:3px 0 3px 0;}
ul#leftMenu li.parent a {color:#fff}
-ul#leftMenu li.selected {background:url(bullet.gif) no-repeat; background-position:10px 8px; color:#fff; padding:0;}
+ul#leftMenu li.selected {background:url(../bullet.gif) no-repeat; background-position:10px 8px; color:#fff; padding:0;}
/* ******* End of Left Menu Bar ******* */
@@ -75,7 +75,7 @@ ul#leftMenu li.selected {background:url(bullet.gif) no-repeat; background-positi /* ******* Start of Footer ******* */
-#footer {width:100%; height:54px; clear:both; background:url(bg-footer.gif) no-repeat;}
+#footer {width:100%; height:54px; clear:both; background:url(../bg-footer.gif) no-repeat;}
a.accessInfo {float:left; height:32px; width:117px; margin:0 10px 0 43px;}
a.accessInfo img {border:none;}
|