diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-03-04 17:17:46 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2019-06-04 14:54:29 +0100 |
commit | 4bb4777a7f48c8392bfd4b1392388ed67cac37a0 (patch) | |
tree | fe852270f856fdfa2e129666dcc18277fb95d02b | |
parent | 3f99bcedaa08e6c81326850c355a05a459d2c95a (diff) |
[Hounslow] Initial cobrand
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Hounslow.pm | 39 | ||||
-rw-r--r-- | templates/email/hounslow/_email_color_overrides.html | 19 | ||||
-rw-r--r-- | templates/web/hounslow/footer_extra_js.html | 11 | ||||
-rw-r--r-- | templates/web/hounslow/header_logo.html | 2 | ||||
-rw-r--r-- | web/cobrands/hounslow/_colours.scss | 38 | ||||
-rw-r--r-- | web/cobrands/hounslow/base.scss | 28 | ||||
-rw-r--r-- | web/cobrands/hounslow/images/logo.gif | bin | 0 -> 6883 bytes | |||
-rw-r--r-- | web/cobrands/hounslow/js.js | 18 | ||||
-rw-r--r-- | web/cobrands/hounslow/layout.scss | 21 |
9 files changed, 176 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Hounslow.pm b/perllib/FixMyStreet/Cobrand/Hounslow.pm new file mode 100644 index 000000000..8c51305b6 --- /dev/null +++ b/perllib/FixMyStreet/Cobrand/Hounslow.pm @@ -0,0 +1,39 @@ +package FixMyStreet::Cobrand::Hounslow; +use parent 'FixMyStreet::Cobrand::Whitelabel'; + +use strict; +use warnings; + +sub council_area_id { 2483 } +sub council_area { 'Hounslow' } +sub council_name { 'Hounslow Borough Council' } +sub council_url { 'hounslow' } +sub example_places { ( 'TW3 1SN', "Depot Road" ) } + +sub base_url { + my $self = shift; + return $self->next::method() if FixMyStreet->config('STAGING_SITE'); + return 'https://fms.hounslowhighways.org'; +} + +sub disambiguate_location { + my $self = shift; + my $string = shift; + + return { + %{ $self->SUPER::disambiguate_location() }, + centre => '51.468495,-0.366134', + bounds => [ 51.420739, -0.461502, 51.502850, -0.243443 ], + }; +} + +sub on_map_default_status { 'open' } + +sub contact_email { + my $self = shift; + return join( '@', 'enquiries', $self->council_url . 'highways.org' ); +} + +sub send_questionnaires { 0 } + +1; diff --git a/templates/email/hounslow/_email_color_overrides.html b/templates/email/hounslow/_email_color_overrides.html new file mode 100644 index 000000000..b08a92d86 --- /dev/null +++ b/templates/email/hounslow/_email_color_overrides.html @@ -0,0 +1,19 @@ +[% + +color_purple = '#7D2B80' +color_green = '#8BC54F' +color_white = '#fff' + +header_background_color = color_white +header_text_color = color_purple + +secondary_column_background_color = color_white + +button_background_color = color_purple +button_text_color = color_white + +logo_width = "231" # pixel measurement, but without 'px' suffix +logo_height = "102" # pixel measurement, but without 'px' suffix +logo_file = "logo.gif" + +%] diff --git a/templates/web/hounslow/footer_extra_js.html b/templates/web/hounslow/footer_extra_js.html new file mode 100644 index 000000000..ccec09313 --- /dev/null +++ b/templates/web/hounslow/footer_extra_js.html @@ -0,0 +1,11 @@ +[% +IF bodyclass.match('mappage'); + scripts.push( + version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js'), + version('/cobrands/fixmystreet-uk-councils/roadworks.js'), + version('/cobrands/fixmystreet/assets.js'), + version('/cobrands/highways/assets.js'), + version('/cobrands/hounslow/js.js'), + ); +END +%] diff --git a/templates/web/hounslow/header_logo.html b/templates/web/hounslow/header_logo.html new file mode 100644 index 000000000..50d896496 --- /dev/null +++ b/templates/web/hounslow/header_logo.html @@ -0,0 +1,2 @@ + <a href="http://www.hounslowhighways.org" id="site-logo">Hounslow Highways</a> + <a href="/" id="report-cta" title="[%- loc('Report a problem') -%]">[%- loc('Report') -%]</a> diff --git a/web/cobrands/hounslow/_colours.scss b/web/cobrands/hounslow/_colours.scss new file mode 100644 index 000000000..0a4476720 --- /dev/null +++ b/web/cobrands/hounslow/_colours.scss @@ -0,0 +1,38 @@ +/* COLOURS */ + +$menu-image: 'menu-black'; + +$mappage-header-height: 134px; + +// Primary +$white: #fff; +$purple: rgb(125, 43, 128); +$green: rgb(139, 197, 79); + +// Secondary +$orange: rgb(245,132,35); +$red: rgb(211,17,69); +$blue: rgb(0, 85, 150); +$dark_green: rgb(0, 137, 82); +$magenta: rgb(236, 0, 140); +$cyan: rgb(0, 174, 239); + +$primary: $purple; +//$primary: #dce6f2; // From bexley.gov.uk/services +$primary_b: #222; +$primary_text: $white; + +$base_bg: $white; +$base_fg: #222; + +$nav_background_colour: $white; +$nav_colour: $purple; +$nav_hover_background_colour: darken($purple, 10%); + +$col_click_map: $green; + +$header-top-border: false; + +$heading-font: InfoText, Frutiger, Arial, sans-serif; +$body-font: Frutiger, Arial, sans-serif; +$meta-font: $body-font; diff --git a/web/cobrands/hounslow/base.scss b/web/cobrands/hounslow/base.scss new file mode 100644 index 000000000..e0ba3953c --- /dev/null +++ b/web/cobrands/hounslow/base.scss @@ -0,0 +1,28 @@ +@import "../sass/h5bp"; +@import "./_colours"; +@import "../sass/mixins"; +@import "../sass/base"; + +#site-logo { + width: 115px; + height: 51px; + padding: 0.5em 0; + background: url(/cobrands/hounslow/images/logo.gif) 0 50% no-repeat; + background-size: 115px 51px; +} + +#postcodeForm .form-hint { + color: $white; +} + +.btn-primary, +.green-btn, +.btn--primary { + border: none; + background: $green; + + &:hover, + &:active { + background: lighten($green, 5%); + } +} diff --git a/web/cobrands/hounslow/images/logo.gif b/web/cobrands/hounslow/images/logo.gif Binary files differnew file mode 100644 index 000000000..3bc1019ac --- /dev/null +++ b/web/cobrands/hounslow/images/logo.gif diff --git a/web/cobrands/hounslow/js.js b/web/cobrands/hounslow/js.js new file mode 100644 index 000000000..21bc3b96c --- /dev/null +++ b/web/cobrands/hounslow/js.js @@ -0,0 +1,18 @@ +(function(){ + +if (!fixmystreet.maps) { + return; +} + +var org_id = '5540'; +var body = "Hounslow Borough Council"; +fixmystreet.assets.add($.extend(true, {}, fixmystreet.roadworks.layer_future, { + http_options: { params: { organisation_id: org_id } }, + body: body +})); +fixmystreet.assets.add($.extend(true, {}, fixmystreet.roadworks.layer_planned, { + http_options: { params: { organisation_id: org_id } }, + body: body +})); + +})(); diff --git a/web/cobrands/hounslow/layout.scss b/web/cobrands/hounslow/layout.scss new file mode 100644 index 000000000..6917305de --- /dev/null +++ b/web/cobrands/hounslow/layout.scss @@ -0,0 +1,21 @@ +@import "_colours"; + +@import "../sass/layout"; + +body.twothirdswidthpage .content .sticky-sidebar aside { + top: 10em; +} + +#site-logo { + width: 231px; + height: 102px; + padding: 1em 0; + background-size: 231px 102px; +} + +// Stop visited nav links being purple when hovering over them +.nav-menu--main { + a:hover { + color: $primary_text; + } +} |