diff options
42 files changed, 173 insertions, 242 deletions
diff --git a/.cypress/cypress/integration/peterborough.js b/.cypress/cypress/integration/peterborough.js index 67c468be8..be1515028 100644 --- a/.cypress/cypress/integration/peterborough.js +++ b/.cypress/cypress/integration/peterborough.js @@ -31,4 +31,11 @@ describe('new report form', function() { cy.get('.js-hide-if-invalid-category').should('be.visible'); }); + it('correctly changes the asset select message', function() { + cy.get('select:eq(4)').select('Street lighting'); + cy.get('.category_meta_message').should('contain', 'You can pick a street light from the map'); + cy.get('select:eq(4)').select('Trees'); + cy.get('.category_meta_message').should('contain', 'You can pick a tree from the map'); + }); + }); diff --git a/CHANGELOG.md b/CHANGELOG.md index c576808d0..19429b6cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ - Admin improvements: - Display user name/email for contributed as reports. #2990 - Interface for enabling anonymous reports for certain categories. #2989 + - Development improvements: + - `#geolocate_link` is now easier to re-style. #3006 + - Links inside `#front-main` can be customised using `$primary_link_*` Sass variables. #3007 * v3.0.1 (6th May 2020) - New features: diff --git a/bin/fixmystreet.com/fixture b/bin/fixmystreet.com/fixture index 1062eb16b..082fc6309 100755 --- a/bin/fixmystreet.com/fixture +++ b/bin/fixmystreet.com/fixture @@ -100,7 +100,7 @@ if ($opt->test_fixtures) { { area_id => 2397, categories => [ 'Graffiti' ], name => 'Northampton Borough Council' }, { area_id => 2483, categories => [ 'Potholes', 'Other' ], name => 'Hounslow Borough Council' }, { area_id => 2636, categories => [ 'Potholes', 'Private', 'Extra' ], name => 'Isle of Wight Council' }, - { area_id => 2566, categories => [ 'Fallen branch' ], name => 'Peterborough City Council' }, + { area_id => 2566, categories => [ 'Fallen branch', 'Light Out', 'Light Dim', 'Fallen Tree', 'Damaged Tree' ], name => 'Peterborough City Council' }, { area_id => 2498, categories => [ 'Incorrect timetable', 'Glass broken', 'Mobile Crane Operation' ], name => 'TfL' }, ) { $bodies->{$_->{area_id}} = FixMyStreet::DB::Factory::Body->find_or_create($_); @@ -108,6 +108,24 @@ if ($opt->test_fixtures) { say "Created body $_->{name} for MapIt area ID $_->{area_id}, categories $cats"; } + for my $cat_name ('Fallen Tree', 'Damaged Tree') { + my $cat = FixMyStreet::DB->resultset('Contact')->find({ + body => $bodies->{2566}, + category => $cat_name, + }); + $cat->set_extra_metadata( group => 'Trees' ); + $cat->update; + } + + for my $cat_name ('Light Out', 'Light Dim') { + my $cat = FixMyStreet::DB->resultset('Contact')->find({ + body => $bodies->{2566}, + category => $cat_name, + }); + $cat->set_extra_metadata( group => 'Street lighting' ); + $cat->update; + } + my $child_cat = FixMyStreet::DB->resultset("Contact")->find({ body => $bodies->{2234}, category => 'Very Urgent', diff --git a/templates/web/buckinghamshire/front/pre-steps.html b/templates/web/buckinghamshire/front/pre-steps.html index 4728bff2f..ee7f83ec9 100644 --- a/templates/web/buckinghamshire/front/pre-steps.html +++ b/templates/web/buckinghamshire/front/pre-steps.html @@ -1,4 +1,4 @@ -<p style="margin: -1em -1em 1em; padding: 20px 30px; background-color: #f79f73; color: #000;"> +<p style="margin: 1em -20px; padding: 20px; background-color: #f79f73; color: #000;"> In light of the ongoing COVID 19 crisis an element of TfB workforce has reduced by the need for self-isolation. This regrettably means that for the immediate future some work will have to be delayed. We apologise for any possible delay diff --git a/templates/web/hart/around/intro.html b/templates/web/hart/around/intro.html index 7cc971041..fc5e2a844 100644 --- a/templates/web/hart/around/intro.html +++ b/templates/web/hart/around/intro.html @@ -1,4 +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> + <h2> (like graffiti, fly tipping, broken paving slabs, dog fouling, or street lighting) </h2> </div> diff --git a/web/cobrands/bathnes/_colours.scss b/web/cobrands/bathnes/_colours.scss index 0340b3eda..c9503ae04 100644 --- a/web/cobrands/bathnes/_colours.scss +++ b/web/cobrands/bathnes/_colours.scss @@ -18,9 +18,11 @@ $site-width: 60em; @import "pattern-lib/colours"; -$primary: #00728F; +$primary: $bathnes-primary; $primary_b: #0b0b0c; -$primary_text: #0b0c0c; +$primary_text: #fff; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); $base_bg: white; $base_fg: #0b0c0c; diff --git a/web/cobrands/bexley/base.scss b/web/cobrands/bexley/base.scss index 7132f33ab..0f72a2e34 100644 --- a/web/cobrands/bexley/base.scss +++ b/web/cobrands/bexley/base.scss @@ -39,7 +39,7 @@ small { .mobile-map-banner { font-size: 0.89em; } -#front-main a#geolocate_link { +a#geolocate_link { font-size: 0.89em; } #front_stats div { diff --git a/web/cobrands/bristol/base.scss b/web/cobrands/bristol/base.scss index 836b27009..cbd5ee081 100644 --- a/web/cobrands/bristol/base.scss +++ b/web/cobrands/bristol/base.scss @@ -109,10 +109,6 @@ dl dt { } } -a#geolocate_link { - color: $b3; -} - label { @extend %bold-font; } diff --git a/web/cobrands/bristol/layout.scss b/web/cobrands/bristol/layout.scss index 07b39b08b..c2ba57afe 100644 --- a/web/cobrands/bristol/layout.scss +++ b/web/cobrands/bristol/layout.scss @@ -54,10 +54,6 @@ body.frontpage, body.twothirdswidthpage, body.fullwidthpage, body.authpage { } } - a#geolocate_link { - color: $b3; - } - h1 { font-size: 3em; } diff --git a/web/cobrands/bromley/_colours.scss b/web/cobrands/bromley/_colours.scss index 9528f5403..53f6bc2c6 100644 --- a/web/cobrands/bromley/_colours.scss +++ b/web/cobrands/bromley/_colours.scss @@ -9,6 +9,8 @@ $bromley_dark_green: #505050; $primary: $bromley_blue; $primary_b: #ffffff; $primary_text: #ffffff; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); $link-color: $bromley_green; $link-hover-color: $bromley_green; diff --git a/web/cobrands/buckinghamshire/base.scss b/web/cobrands/buckinghamshire/base.scss index 8df2cab7b..aefe76945 100644 --- a/web/cobrands/buckinghamshire/base.scss +++ b/web/cobrands/buckinghamshire/base.scss @@ -102,26 +102,15 @@ dl dt { } #postcodeForm { - margin-top: 1em; + margin: 1em 0 0 0; + padding: 0; background: #fff; + div input#sub { @include bucks-button(); box-shadow: 0; } } - a#geolocate_link { - background: transparent; - color: $bucks_links; - padding: 0; - font-size: 1em; - &:hover, - &:active, - &:focus { - background: transparent; - color: $link-hover-color; - text-decoration: underline; - } - } } .btn-primary, .green-btn, .btn--primary { @@ -137,7 +126,13 @@ dl dt { } a#geolocate_link { - color: $b3; + color: $bucks_links; + + &:hover, + &:active, + &:focus { + color: $link-hover-color; + } } label { diff --git a/web/cobrands/buckinghamshire/layout.scss b/web/cobrands/buckinghamshire/layout.scss index 5df31f9e2..bea2fadc0 100644 --- a/web/cobrands/buckinghamshire/layout.scss +++ b/web/cobrands/buckinghamshire/layout.scss @@ -90,19 +90,14 @@ body.twothirdswidthpage .content .sticky-sidebar aside { background-color: white; text-align: left; padding-top: 40px; + padding-bottom: 0; #postcodeForm { - margin-top: 0; - div { margin: 0; } } - a#geolocate_link { - color: $b3; - } - h1 { font-size: 2.5em; } diff --git a/web/cobrands/cheshireeast/_colours.scss b/web/cobrands/cheshireeast/_colours.scss index 363214bd0..e0bc13b08 100644 --- a/web/cobrands/cheshireeast/_colours.scss +++ b/web/cobrands/cheshireeast/_colours.scss @@ -27,6 +27,7 @@ $col_button_hover: $green; $primary: $white; $primary_b: $green; $primary_text: $text_black; +$primary_link_decoration: none; $base_bg: $white; $base_fg: $text_black; diff --git a/web/cobrands/cheshireeast/base.scss b/web/cobrands/cheshireeast/base.scss index 8e771f0ad..c0d798c3a 100644 --- a/web/cobrands/cheshireeast/base.scss +++ b/web/cobrands/cheshireeast/base.scss @@ -90,15 +90,12 @@ a, background-color: #ecf3ec; } -#front-main a#geolocate_link { - color: #2e3191; - background: transparent; +a#geolocate_link { border-bottom: 1px solid #a6a7da; - padding: 0; - margin-top: 0.5em; - font-size: inherit; + padding: 0; // remove padding so that border-bottom looks like an underline + margin: 0 0 1em 0; + &:hover { - background: transparent; border-bottom: 1px solid #2e3191; transition: border-color 0.5s; } diff --git a/web/cobrands/cheshireeast/layout.scss b/web/cobrands/cheshireeast/layout.scss index 71861e13f..ad5c6580b 100644 --- a/web/cobrands/cheshireeast/layout.scss +++ b/web/cobrands/cheshireeast/layout.scss @@ -29,11 +29,9 @@ body.frontpage .content { margin: 0; width: 30em; } -#front-main a#geolocate_link { - color: #2e3191; - &:hover { - text-decoration: none; - } + +a#geolocate_link { + margin-top: 1em; } .ce-footer { diff --git a/web/cobrands/eastherts/layout.scss b/web/cobrands/eastherts/layout.scss index 964feb5ca..d5fb3fc0d 100644 --- a/web/cobrands/eastherts/layout.scss +++ b/web/cobrands/eastherts/layout.scss @@ -116,10 +116,6 @@ } } - a#geolocate_link { - color: $eh_green; - } - h1 { font-size: 2.5em; } diff --git a/web/cobrands/fiksgatami/_colours.scss b/web/cobrands/fiksgatami/_colours.scss index 907065d36..cd5ed0c47 100644 --- a/web/cobrands/fiksgatami/_colours.scss +++ b/web/cobrands/fiksgatami/_colours.scss @@ -7,6 +7,8 @@ $bg: #1a4f7f; $primary: #99bfe1; $primary_b: #000000; $primary_text: #222222; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); $base_bg: $bg; $base_fg: #fff; diff --git a/web/cobrands/fixamingata/_colours.scss b/web/cobrands/fixamingata/_colours.scss index dbdd92e5b..c718a102b 100644 --- a/web/cobrands/fixamingata/_colours.scss +++ b/web/cobrands/fixamingata/_colours.scss @@ -5,6 +5,8 @@ $menu-image: 'menu-black'; $primary: #00b1da; $primary_b: #0087a6; $primary_text: #222; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); $base_bg: #eee url(images/tile.jpg) 0 0 repeat; $base_fg: $primary_text; diff --git a/web/cobrands/fixamingata/layout.scss b/web/cobrands/fixamingata/layout.scss index 6cf0dd47e..25e5b260f 100644 --- a/web/cobrands/fixamingata/layout.scss +++ b/web/cobrands/fixamingata/layout.scss @@ -122,26 +122,23 @@ body.mappage { .content footer .tablewrapper { background: #fff; } -#front-main { - a#geolocate_link { +a#geolocate_link { + background: url(images/locate-me.png) $left 0 no-repeat; + height: 34px; + padding-#{$left}: 24px; + margin-top: 0.25em; + @media ($high-dpi-screen) { + background-image: url(images/locate-me@2.png); + background-size: 22px 34px; + } + &:hover { + text-decoration:underline; background: url(images/locate-me.png) $left 0 no-repeat; - height: 34px; - padding-#{$left}: 24px; - margin-top: 0.25em; - font-size: 1em; + @media ($high-dpi-screen) { background-image: url(images/locate-me@2.png); background-size: 22px 34px; } - &:hover { - text-decoration:underline; - background: url(images/locate-me.png) $left 0 no-repeat; - - @media ($high-dpi-screen) { - background-image: url(images/locate-me@2.png); - background-size: 22px 34px; - } - } } } diff --git a/web/cobrands/fixmystreet.com/_colours.scss b/web/cobrands/fixmystreet.com/_colours.scss index d28cf11e2..b0de8eacb 100644 --- a/web/cobrands/fixmystreet.com/_colours.scss +++ b/web/cobrands/fixmystreet.com/_colours.scss @@ -3,6 +3,8 @@ $primary: #FFD000; $primary_b: #F3B11E; // For the box around the front page postcode form only $primary_text: #222; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); // Tiled main body background $base_bg: #272727 url(images/tile.jpg) 0 0 repeat; diff --git a/web/cobrands/fixmystreet.com/layout.scss b/web/cobrands/fixmystreet.com/layout.scss index f6d7c9096..e6a862f73 100644 --- a/web/cobrands/fixmystreet.com/layout.scss +++ b/web/cobrands/fixmystreet.com/layout.scss @@ -152,20 +152,23 @@ body.fullwidthpage { } } } - a#geolocate_link { - font-family: $body-font; - background: url(images/locate-me.png) $left 0 no-repeat; - height: 34px; - padding-#{$left}: 24px; - margin-top: 0.25em; - @media ($high-dpi-screen) { - background-image: url(images/locate-me@2.png); - background-size: 22px 34px; - } - } - a#geolocate_link.loading { - background: url("/cobrands/fixmystreet/images/spinner-yellow.gif") 100% 33% no-repeat - } + } +} + +a#geolocate_link { + font-family: $body-font; + background: url(images/locate-me.png) $left 0 no-repeat; + height: 34px; + padding-#{$left}: 24px; + margin-top: 0.25em; + + @media ($high-dpi-screen) { + background-image: url(images/locate-me@2.png); + background-size: 22px 34px; + } + + &.loading { + background: url("/cobrands/fixmystreet/images/spinner-yellow.gif") 100% 33% no-repeat } } diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js index 88a098398..e816fb4e5 100644 --- a/web/cobrands/fixmystreet/assets.js +++ b/web/cobrands/fixmystreet/assets.js @@ -833,7 +833,19 @@ fixmystreet.assets = { named_select_action_not_found: function() { var message = this.fixmystreet.asset_item_message; message = message.replace('ITEM', this.fixmystreet.asset_item); - $('.category_meta_message').html(message); + if (this.fixmystreet.asset_group) { + var prefix = this.fixmystreet.asset_group.replace(/[^a-z]/gi, ''); + var id = "category_meta_message_" + prefix; + var $p = $('#' + id); + $p.html(message); + } else { + $.each(this.fixmystreet.asset_category, function(i, c) { + var prefix = c.replace(/[^a-z]/gi, ''), + id = "category_meta_message_" + prefix, + $p = $('#' + id); + $p.html(message); + }); + } }, selectedFeature: function() { diff --git a/web/cobrands/greenwich/base.scss b/web/cobrands/greenwich/base.scss index 0f990c865..bfbb0a62a 100644 --- a/web/cobrands/greenwich/base.scss +++ b/web/cobrands/greenwich/base.scss @@ -28,6 +28,10 @@ background-color: $greenwich_light_grey; } +#front-main #postcodeForm { + margin-top: 1em; +} + label[for=pc] { color: $greenwich_dark_red; } diff --git a/web/cobrands/hart/_colours.scss b/web/cobrands/hart/_colours.scss index d79126bae..321b893ad 100644 --- a/web/cobrands/hart/_colours.scss +++ b/web/cobrands/hart/_colours.scss @@ -8,6 +8,8 @@ $col_fixed_label: $hart_primary; $primary_b: #000000; $primary_text: #ffffff; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); $link-color: #369; $link-hover-color: #369; diff --git a/web/cobrands/hounslow/_colours.scss b/web/cobrands/hounslow/_colours.scss index 0a4476720..622055e82 100644 --- a/web/cobrands/hounslow/_colours.scss +++ b/web/cobrands/hounslow/_colours.scss @@ -21,6 +21,8 @@ $primary: $purple; //$primary: #dce6f2; // From bexley.gov.uk/services $primary_b: #222; $primary_text: $white; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); $base_bg: $white; $base_fg: #222; diff --git a/web/cobrands/isleofwight/_colours.scss b/web/cobrands/isleofwight/_colours.scss index 688eb66e0..511fcef02 100644 --- a/web/cobrands/isleofwight/_colours.scss +++ b/web/cobrands/isleofwight/_colours.scss @@ -11,9 +11,11 @@ $green: #75c044; //Any 20% tint of the above -$primary_text: #fff; $primary: $cyan; $primary_b: #222; +$primary_text: #fff; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); $base_bg: #fff; $base_fg: #222; diff --git a/web/cobrands/oxfordshire/_colours.scss b/web/cobrands/oxfordshire/_colours.scss index 7ef941660..d52571721 100644 --- a/web/cobrands/oxfordshire/_colours.scss +++ b/web/cobrands/oxfordshire/_colours.scss @@ -14,6 +14,7 @@ $color-oxfordshire-link-blue: #0a549d; $primary: $color-oxfordshire-bright-green; $primary_b: $color-oxfordshire-dark-green; $primary_text: #fff; +$primary_link_decoration: none; $link-color: $color-oxfordshire-link-blue; $link-hover-color: $color-oxfordshire-bright-yellow; diff --git a/web/cobrands/oxfordshire/base.scss b/web/cobrands/oxfordshire/base.scss index 999321a7e..9fd4bc2ad 100644 --- a/web/cobrands/oxfordshire/base.scss +++ b/web/cobrands/oxfordshire/base.scss @@ -99,29 +99,15 @@ a:not([class]):focus { } } } +} - a#geolocate_link { - padding: 0; - background: transparent; - font-size: inherit; - color: $link-color; - margin-top: 0.5em; - - &:hover { - background-color: transparent; - color: $link-hover-color; - } - - &:focus { - background-color: $color-oxfordshire-bright-yellow; - outline: 2px solid $color-oxfordshire-bright-yellow; - } +a#geolocate_link { + padding: 0; + margin-top: 0.5em; - &.loading { - background: transparent url("/cobrands/fixmystreet/images/spinner-white.gif") 100% 50% no-repeat; - padding: 0 1.5em 0 0; - border: none; - } + &.loading { + background: transparent url("/cobrands/fixmystreet/images/spinner-white.gif") 100% 50% no-repeat; + padding: 0 1.5em 0 0; } } diff --git a/web/cobrands/oxfordshire/layout.scss b/web/cobrands/oxfordshire/layout.scss index 1b415903a..91ea8c4d1 100644 --- a/web/cobrands/oxfordshire/layout.scss +++ b/web/cobrands/oxfordshire/layout.scss @@ -130,19 +130,6 @@ $mappage-header-height: 10em; } } } - - a#geolocate_link { - color: $color-oxfordshire-link-blue; - - &:hover { - color: $color-oxfordshire-bright-yellow; - } - - &:focus { - background-color: $color-oxfordshire-bright-yellow; - outline: 2px solid $color-oxfordshire-bright-yellow; - } - } } .frontpage { diff --git a/web/cobrands/peterborough/assets.js b/web/cobrands/peterborough/assets.js index 58ec4e5a1..3d718116e 100644 --- a/web/cobrands/peterborough/assets.js +++ b/web/cobrands/peterborough/assets.js @@ -137,8 +137,11 @@ fixmystreet.assets.add(light_defaults, { } }, asset_group: 'Street lighting', + asset_category: 'Lighting enquiry', relevant: function(options) { - return options.group === 'Street lighting' && options.category !== UNKNOWN_LIGHT_CATEGORY_NAME; + return ( options.group === 'Street lighting' && + options.category !== UNKNOWN_LIGHT_CATEGORY_NAME + ) || options.category === "Lighting enquiry"; }, asset_item_message: 'You can pick a <b class="asset-spot">street light</b> from the map »', select_action: true, diff --git a/web/cobrands/peterborough/base.scss b/web/cobrands/peterborough/base.scss index 67e199cca..32d883132 100644 --- a/web/cobrands/peterborough/base.scss +++ b/web/cobrands/peterborough/base.scss @@ -45,6 +45,7 @@ h1, h2 { } #postcodeForm { background-color: #fff; + padding-bottom: 0; div input#sub { background-color: $link-color; } @@ -53,17 +54,6 @@ h1, h2 { .form-hint { color: $primary_b; } - a#geolocate_link { - background-color: transparent; - padding: 0; - color: $link-color; - &:hover, - &:active, - &:focus { - background-color: transparent; - text-decoration: underline - } - } } .btn-primary, diff --git a/web/cobrands/peterborough/layout.scss b/web/cobrands/peterborough/layout.scss index 62486ab35..de5c5f9a9 100644 --- a/web/cobrands/peterborough/layout.scss +++ b/web/cobrands/peterborough/layout.scss @@ -29,14 +29,6 @@ body.frontpage #front-main { font-weight: normal; font-size: 1.5em; } - a#geolocate_link { - color: $link-color; - &:hover, - &:active, - &:focus { - color: $link-hover-color; - } - } } #postcodeForm .form-hint { diff --git a/web/cobrands/rutland/_colours.scss b/web/cobrands/rutland/_colours.scss index aabedb0f1..e81ce2554 100755 --- a/web/cobrands/rutland/_colours.scss +++ b/web/cobrands/rutland/_colours.scss @@ -14,6 +14,8 @@ $RCCbg: #F1F1F1; $primary: $RCCGreen; $primary_b: #000000; $primary_text: #222222; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); $base_bg: $RCCbg; $base_fg: #000; diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss index b52b75f43..f86af2386 100644 --- a/web/cobrands/sass/_base.scss +++ b/web/cobrands/sass/_base.scss @@ -11,6 +11,9 @@ $link-visited-color: $link-color !default; $link-text-decoration: none !default; $link-hover-text-decoration: underline !default; +$primary_link_decoration: underline !default; +$primary_link_hover_decoration: $primary_link_decoration !default; + $itemlist_item_background: #f6f6f6 !default; $itemlist_item_background_hover: #e6e6e6 !default; $col_big_numbers: #666 !default; @@ -2373,26 +2376,19 @@ label .muted { } } } - a#geolocate_link { - @include inline-block; - vertical-align:top; - background:#1a1a1a; - color:#C8C8C8; - padding:0.5em; - font-family: $meta-font; - font-size: 0.8125em; - @include border-radius(0 0 0.25em 0.25em); + a { + text-decoration: $primary_link_decoration; &:hover { - text-decoration:none; - background:#2a2a2a; + text-decoration: $primary_link_hover_decoration; } } - a#geolocate_link.loading { - background: #1a1a1a url("/cobrands/fixmystreet/images/spinner-black.gif") flip(100%,0) 50% no-repeat; - border-#{$right}: solid 0.5em #1a1a1a; - padding-#{$right}: 1.5em; - } } + +a#geolocate_link { + display: inline-block; + padding: 0.5em; +} + .no-js #geolocate_link { display: none !important; } diff --git a/web/cobrands/sass/_layout.scss b/web/cobrands/sass/_layout.scss index 02ded6fc1..8b3406d9d 100644 --- a/web/cobrands/sass/_layout.scss +++ b/web/cobrands/sass/_layout.scss @@ -13,6 +13,9 @@ $header-top-border: $header-top-border-width solid $primary !default; $container-max-width: 60em !default; +$primary_link_color: null !default; +$primary_link_hover_color: null !default; + .internal-link-fixed-header { display: block; position: relative; @@ -854,25 +857,11 @@ textarea.form-error { } } a { - color: inherit; - text-decoration: underline; - &:hover { - text-decoration: none; - } - } - a#geolocate_link { - color: inherit; - background:none; - text-decoration: none; - padding-bottom: 0; + color: $primary_link_color; &:hover { - text-decoration:underline; - background:none; + color: $primary_link_hover_color; } } - a#geolocate_link.loading { - border-#{$right}: none; - } } #front-howto { diff --git a/web/cobrands/tfl/base.scss b/web/cobrands/tfl/base.scss index 9c573f331..43ac90612 100644 --- a/web/cobrands/tfl/base.scss +++ b/web/cobrands/tfl/base.scss @@ -138,18 +138,6 @@ input.form-error, textarea.form-error { } } } - a#geolocate_link { - color: $beck-blue; - font-family: $heading-font; - text-decoration: underline; - font-size: 1.125em; - background: transparent; - &:hover, - &:active, - &:focus { - background: transparent; - } - } h2 { font-style: normal; font-family: $body-font; @@ -158,6 +146,11 @@ input.form-error, textarea.form-error { } } +a#geolocate_link { + font-family: $heading-font; + font-size: 1.125em; +} + .item-list__heading { font-family: $body-font; } diff --git a/web/cobrands/tfl/layout.scss b/web/cobrands/tfl/layout.scss index 8e3c6b5d8..751a71672 100644 --- a/web/cobrands/tfl/layout.scss +++ b/web/cobrands/tfl/layout.scss @@ -66,12 +66,6 @@ h1 { #postcodeForm div { margin: 0; } - a#geolocate_link { - color: $beck-blue; - font-family: $heading-font; - text-decoration: underline; - font-size: 1.125em; - } } .frontpage .content { diff --git a/web/cobrands/warwickshire/base.scss b/web/cobrands/warwickshire/base.scss index 224346195..53bae8431 100644 --- a/web/cobrands/warwickshire/base.scss +++ b/web/cobrands/warwickshire/base.scss @@ -79,31 +79,21 @@ } } } +} - a#geolocate_link { - padding: 0; - background: transparent; - font-size: 1em; - color: $link-color; - margin-top: 0.5em; - - &:hover { - background-color: transparent; - color: $link-hover-color; - } - - &:focus { - outline: 3px solid $warwickshire-yellow; - } +a#geolocate_link { + padding: 0; + margin-top: 0.5em; - &.loading, - &.loading:hover { - background: transparent url("/cobrands/warwickshire/images/spinner-f6f6f6-333333.gif") 100% 50% no-repeat; - padding: 0 1.5em 0 0; - border: none; - } + &:focus { + outline: 3px solid $warwickshire-yellow; } + &.loading, + &.loading:hover { + background: transparent url("/cobrands/warwickshire/images/spinner-f6f6f6-333333.gif") 100% 50% no-repeat; + padding: 0 1.5em 0 0; + } } .box-warning { diff --git a/web/cobrands/warwickshire/layout.scss b/web/cobrands/warwickshire/layout.scss index ac360f16d..fdf3524cd 100644 --- a/web/cobrands/warwickshire/layout.scss +++ b/web/cobrands/warwickshire/layout.scss @@ -43,18 +43,6 @@ margin: 1.5em 0 0.5em 0; } } - - a#geolocate_link { - color: $link-color; - - &:hover { - color: $link-hover-color; - } - - &:focus { - outline: 3px solid $warwickshire-yellow; - } - } } .site-footer__section { diff --git a/web/cobrands/westminster/base.scss b/web/cobrands/westminster/base.scss index c67a67f6d..01b7760e8 100644 --- a/web/cobrands/westminster/base.scss +++ b/web/cobrands/westminster/base.scss @@ -82,27 +82,16 @@ body.frontpage { } } - a#geolocate_link { - background: transparent; - display: block; - padding: 0; - margin-top: 0.5em; - font-family: inherit; - font-size: 1em; - border-radius: 0; - color: $westminster_blue; - - &:hover { - background: transparent; - text-decoration: underline; - } - } - .form-hint { color: inherit; } } +a#geolocate_link { + padding: 0; + margin-top: 0.5em; +} + #front-howto h2, #front-recently h2 { font-weight: bold; diff --git a/web/cobrands/westminster/layout.scss b/web/cobrands/westminster/layout.scss index 94483a523..6e5c30ced 100644 --- a/web/cobrands/westminster/layout.scss +++ b/web/cobrands/westminster/layout.scss @@ -36,10 +36,6 @@ } } -#front-main a#geolocate_link { - color: $westminster-blue; -} - body.mappage { #site-header { box-sizing: border-box; // count padding as part of height, so border-bottom is visible diff --git a/web/js/map-fms.js b/web/js/map-fms.js index ac27cfbce..925fe1fa2 100644 --- a/web/js/map-fms.js +++ b/web/js/map-fms.js @@ -38,14 +38,15 @@ OpenLayers.Layer.BingUK = OpenLayers.Class(OpenLayers.Layer.Bing, { var logo = ''; var c = this.map.getCenter(); var in_uk = c ? this.in_uk(c) : true; + var year = (new Date()).getFullYear(); if (z >= 16 && in_uk) { - copyrights = 'Contains Highways England and Ordnance Survey data © Crown copyright and database right 2016'; + copyrights = 'Contains Highways England and Ordnance Survey data © Crown copyright and database right ' + year; } else { logo = '<a href="https://www.bing.com/maps/"><img border=0 src="//dev.virtualearth.net/Branding/logo_powered_by.png"></a>'; if (in_uk) { - copyrights = '© 2016 <a href="https://www.bing.com/maps/">Microsoft</a>. © AND, Navteq, Highways England, Ordnance Survey'; + copyrights = '© ' + year + ' <a href="https://www.bing.com/maps/">Microsoft</a>. © AND, Navteq, Highways England, Ordnance Survey'; } else { - copyrights = '© 2016 <a href="https://www.bing.com/maps/">Microsoft</a>. © AND, Navteq, Ordnance Survey'; + copyrights = '© ' + year + ' <a href="https://www.bing.com/maps/">Microsoft</a>. © AND, Navteq, Ordnance Survey'; } } this._updateAttribution(copyrights, logo); |