diff --git a/perllib/FixMyStreet/Cobrand/Gloucester.pm b/perllib/FixMyStreet/Cobrand/Gloucester.pm new file mode 100644 index 00000000000..3bfc6930078 --- /dev/null +++ b/perllib/FixMyStreet/Cobrand/Gloucester.pm @@ -0,0 +1,102 @@ +=head1 NAME + +FixMyStreet::Cobrand::Gloucester - code specific to the Gloucester cobrand + +=head1 SYNOPSIS + +We integrate with Gloucester's Alloy back end. + +=head1 DESCRIPTION + +=cut + +package FixMyStreet::Cobrand::Gloucester; +use parent 'FixMyStreet::Cobrand::Whitelabel'; + +use strict; +use warnings; + +use Moo; + +=head2 Defaults + +=over 4 + +=cut + +sub council_area_id { '2325' } +sub council_area { 'Gloucester' } +sub council_name { 'Gloucester City Council' } +sub council_url { 'gloucester' } + +=item * Users with a gloucester.gov.uk email can always be found in the admin. + +=cut + +sub admin_user_domain { 'gloucester.gov.uk' } + +=item * Allows anonymous reporting + +=cut + +sub allow_anonymous_reports { 'button' } + +=item * Gloucester use their own privacy policy + +=cut + +sub privacy_policy_url { + 'https://www.gloucester.gov.uk/council-and-democracy/data-protection/privacy-notices/gloucester-county-council-general-privacy-statement/gloucester-county-council-general-privacy-statement/' +} + +=item * Users can not reopen reports + +=cut + +sub reopening_disallowed { + my ($self, $problem) = @_; + + # Only staff can reopen reports. + my $c = $self->{c}; + my $user = $c->user; + return 0 if ($c->user_exists && $user->from_body && $user->from_body->cobrand_name eq $self->council_name); + return 1; +} + +=item * We do not send questionnaires. + +=cut + +sub send_questionnaires { 0 } + +=item * TODO: Don't show reports before the go-live date + +=cut + +# sub cut_off_date { '2024-03-31' } + +=pod + +=back + +=cut + +sub disambiguate_location { + my $self = shift; + my $string = shift; + + my $town = 'Gloucester'; + + return { + %{ $self->SUPER::disambiguate_location() }, + town => $town, + centre => '51.8493825813624,-2.24025312382298', + span => '0.0776436939868574,0.12409536555503', + bounds => [ + 51.8075803711933, -2.30135343437398, + 51.8852240651802, -2.17725806881895 + ], + }; +} + +1; diff --git a/templates/email/gloucester/_email_color_overrides.html b/templates/email/gloucester/_email_color_overrides.html new file mode 100644 index 00000000000..2d879100fa0 --- /dev/null +++ b/templates/email/gloucester/_email_color_overrides.html @@ -0,0 +1,20 @@ +[% + +color_primary = '#0054a4' +color_pale_grey = '#f0f0f0' + +body_font_family = "Helvetica, sans-serif" + +header_background_color = color_primary +header_text_color = color_white + +secondary_column_background_color = color_pale_grey + +button_background_color = color_primary +button_text_color = color_white + +logo_file = 'gloucester-logo.png' +logo_width = "176" # pixel measurement, but without 'px' suffix +logo_height = "70" # pixel measurement, but without 'px' suffix + +%] diff --git a/templates/web/gloucester/footer_extra.html b/templates/web/gloucester/footer_extra.html new file mode 100644 index 00000000000..54a0aeb1fa7 --- /dev/null +++ b/templates/web/gloucester/footer_extra.html @@ -0,0 +1,64 @@ + +[% PROCESS '_footer_main_nav.html' %] +[% PROCESS '_footer_extra_powered_by.html' %] diff --git a/templates/web/gloucester/footer_extra_js.html b/templates/web/gloucester/footer_extra_js.html new file mode 100644 index 00000000000..34107f5bee1 --- /dev/null +++ b/templates/web/gloucester/footer_extra_js.html @@ -0,0 +1 @@ +[% PROCESS 'footer_extra_js_base.html' highways=0 roadworks=0 validation=0 cobrand_js=0 %] diff --git a/templates/web/gloucester/front/footer-marketing.html b/templates/web/gloucester/front/footer-marketing.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/templates/web/gloucester/header_extra.html b/templates/web/gloucester/header_extra.html new file mode 100644 index 00000000000..a30eed2e71a --- /dev/null +++ b/templates/web/gloucester/header_extra.html @@ -0,0 +1,5 @@ + + + + +[% INCLUDE 'tracking_code.html' %] diff --git a/templates/web/gloucester/header_logo.html b/templates/web/gloucester/header_logo.html new file mode 100644 index 00000000000..dab47a8a0fb --- /dev/null +++ b/templates/web/gloucester/header_logo.html @@ -0,0 +1,2 @@ + +[%- loc('Report') -%] diff --git a/templates/web/gloucester/site-name.html b/templates/web/gloucester/site-name.html new file mode 100644 index 00000000000..36282b54ffa --- /dev/null +++ b/templates/web/gloucester/site-name.html @@ -0,0 +1 @@ +Gloucester City Council FixMyStreet diff --git a/templates/web/gloucester/tracking_code.html b/templates/web/gloucester/tracking_code.html new file mode 100644 index 00000000000..6dbcc5dc70e --- /dev/null +++ b/templates/web/gloucester/tracking_code.html @@ -0,0 +1,5 @@ +[% IF c.config.BASE_URL == "https://www.fixmystreet.com" %] + + + +[% END %] diff --git a/web/cobrands/gloucester/_variables.scss b/web/cobrands/gloucester/_variables.scss new file mode 100755 index 00000000000..32f84964323 --- /dev/null +++ b/web/cobrands/gloucester/_variables.scss @@ -0,0 +1,112 @@ +/* This styling is based on https://www.gloucester.gov.uk/ +Also here: https://3.basecamp.com/4020879/buckets/38208405/todos/7578740887 +*/ + +/* COLOURS */ +$gloucester_blue: #0054a4; // Links and buttons +$glucester_blue_hover: #0000b4; +$gloucester_primary_light: #cadcea; +$gloucester_primary_dark: $glucester_blue_hover; +$gloucester_red: #c0232e; +$gloucester_white: #fff; +$gloucester_grey: #f0f0f0; // Body bg +$gloucester_black: #333333; +$gloucester_yellow: #ffae04; + +$primary: $gloucester_blue; +$yellow: $gloucester_yellow; + +$primary_b: $gloucester_black; +$primary_text: $gloucester_white; + +/* FRONTPAGE */ +$base_bg: $gloucester_grey; +$base_fg: $gloucester_black; +$front_stats_bg: $gloucester_white; +$layout_front_stats_color: $primary_b; + +/* LINKS */ +$primary_link_color: $gloucester_blue; +$primary_link_hover_color: #2e8aca; +$primary_link_decoration: underline; +$primary_link_hover_decoration: underline; + +// Found here: https://www.gloucester.gov.uk/planning-development/section-106-agreements/ +$link-color: #0d6efd; +$link-hover-color: #6610f2; +$link-visited-color: $link-color; +$link-text-decoration: underline; +$link-hover-text-decoration: none; + +/* BUTTONS */ +$button-padding-top: 0.625rem; +$button-padding-bottom: 0.625rem; +$button-padding-left: 1.5625rem; +$button-padding-right: 1.5625rem; +$button-border-radius: 0; + +// Usage +/* +a#geolocate_link { + @include button-variant($bg-top: $button-primary-bg-top, $bg-bottom: $button-primary-bg-bottom, $border: $button-primary-border, $text: $button-primary-text, $hover-bg-bottom: $button-primary-hover-bg-bottom, $hover-bg-top: $button-primary-hover-bg-top, $hover-border: $button-primary-hover-border, $hover-text: $button-primary-hover-text); + @include focus-state; +} +*/ +$button-primary-bg-top: $primary; +$button-primary-bg-bottom: $primary; +$button-primary-border: $primary; +$button-primary-text: $primary_text; +$button-primary-hover-bg-bottom: $gloucester_primary_dark; +$button-primary-hover-bg-top: $gloucester_primary_dark; +$button-primary-hover-border: $gloucester_primary_dark; +$button-primary-hover-text: $primary_text; + +$geolocation-link: $primary; +$geolocation-link-border: $primary; + +/* FONTS */ + +$heading-font: "Open Sans", sans-serif; +$body-font: "Open Sans", sans-serif; +$meta-font: "Open Sans", sans-serif; + +/* NAVBAR */ + +$nav_colour: $gloucester_white; +$nav_background_colour: $primary; +$nav_hover_background_colour: $glucester_blue_hover; + +$mappage-header-height: 5.625rem; +$header-top-border: false; +// $header-top-border-width: 0.25em; +// $header-top-border: $header-top-border-width solid $primary; +$menu-image: "menu-white"; +// $close-menu-image: "close-#{$menu-image}"; + +/* OTHER VARIABLES */ + +$container-max-width: 82.5rem; + +$col_click_map: $primary; +$col_fixed_label: $primary; +// $col_fixed_label_light: mix($col_fixed_label, #fff, 10%); + +$search-help-background: #fff3f3; +$search-help-header-font-size-desktop: 1.25em; + +$dropzone-button-text: $primary_text; + +// $pagination_background: #f6f6f6; +$itemlist_item_background: $base_bg; +$itemlist_item_background_hover: $gloucester_primary_light; +$col_big_numbers: $primary_b; + +// $form-control-border-color: #aaaaaa; +$mobile-sticky-sidebar-button-menu-image: "menu-white"; + +$front-main-color: $primary_b; +$postcodeform-background: $gloucester_white; +$front-main-color-desktop: $primary_b; +$front-main-background-desktop: #fff; +$postcodeform-color: $primary_b; +$postcodeform-color-desktop: $primary_b; diff --git a/web/cobrands/gloucester/base.scss b/web/cobrands/gloucester/base.scss new file mode 100755 index 00000000000..713f3615749 --- /dev/null +++ b/web/cobrands/gloucester/base.scss @@ -0,0 +1,198 @@ +@import "../sass/h5bp"; +@import "_variables"; +@import "../sass/mixins"; + +@import "../sass/base"; + +/*TYPOGRAPHY */ +h1, .h1, +h2, .h2, +h3, .h3, +.item-list__heading { + font-weight: 700; +} + +/* BUTTONS */ +a#geolocate_link { + @include button-variant($bg-top: $button-primary-bg-top, $bg-bottom: $button-primary-bg-bottom, $border: $button-primary-border, $text: $button-primary-text, $hover-bg-bottom: $button-primary-hover-bg-bottom, $hover-bg-top: $button-primary-hover-bg-top, $hover-border: $button-primary-hover-border, $hover-text: $button-primary-hover-text); +} + +#report-cta { + padding: 0.75em; + border-color: $primary_text; +} + +a { + &:focus { + text-decoration: none; + color: $link-hover-color; + } +} + +/* NAVBAR */ +#site-logo { + background-image: url("/cobrands/gloucester/images/gloucester-logo.png"); + background-size: auto 3rem; +} + +#main-nav-btn:checked ~ #main-nav { + margin: 0 1em; +} + +.nav-menu--main { + a { + background-color: $gloucester_white; + color: $primary; + text-decoration: none; + + &:visited { + color: $primary; + } + } + + span { + background-color: $gloucester_primary_dark; + color: $primary_text; + } +} + +/* FRONTPAGE */ +.postcode-form-box { + input#sub { + font-family: $body-font; + font-weight: 600; + background-color: $button-primary-bg-top; + + &:hover { + background-color: $button-primary-hover-bg-top; + color: $button-primary-text; + } + } +} + +/* OTHERS */ +.item-list__item { + a { + text-decoration: none; + } +} + +/* SITE MESSAGE */ +.site-message { + color: $primary; + padding: 1.5rem; + background-color: $gloucester_white; + border: none; + border-top: 4px solid $primary; + word-wrap: break-word; +} + +/* FOOTER */ +.pcg-footer-black { + background-color: $primary; + padding: 2rem 0; + border-top: 8px solid #0000b4; + margin-top: 4em; +} + +.footer-grid { + display: flex; + flex-wrap: wrap; + row-gap: 1.5em; + column-gap: 8rem; + color: $primary_text; + + .pcg-footer-black__title { + margin-bottom: 1.5rem; + font-size: 1.25rem; + font-weight: 700; + color: $primary_text; + margin-top: 0; + } + + .pcg-footer-black__subtitle { + margin-bottom: 4px; + font-size: 1rem; + font-weight: normal; + margin-top: 0; + } + + .pcg-footer-black__social { + list-style: none; + display: flex; + flex-direction: row; + margin-left: 0; + } + + .pcg-sn-icon { + display: block; + width: 45px; + height: 45px; + + &.icon { + background-repeat: no-repeat; + background-position: center; + background-size: 26px; + border-radius: 3px; + + &.icon-facebook { + background-image: url("/cobrands/gloucester/images/facebook.svg"); + } + &.icon-twitter { + background-image: url("/cobrands/gloucester/images/twitter.svg"); + } + + &:hover { + background-color: $button-primary-hover-bg-bottom; + } + } + } + + a { + color: $primary_text; + &:hover { + text-decoration: underline; + } + } + + li { + list-style: none; + } + + .pcg-footer-navigation__link { + font-size: 1em; + color: $primary_text; + text-decoration: none; + } + + .col-12 { + flex: 0 0 auto; + width: 100%; + } + + @media (min-width: 576px) { + .col-sm-6 { + flex: 0 0 auto; + width: 50%; + } + } + + @media (min-width: 992px) { + .col-lg-3 { + flex: 0 0 auto; + width: 25%; + } + } + + @media (min-width: 1400px) { + .pcg-footer-black__wrapper--contacts { + width: 30%; + } + + .pcg-footer-black__wrapper--nav { + width: 25%; + } + } +} + +@import "../fixmystreet-uk-councils/societyworks-footer"; diff --git a/web/cobrands/gloucester/images/external-icon.svg b/web/cobrands/gloucester/images/external-icon.svg new file mode 100644 index 00000000000..da5e5c95f9b --- /dev/null +++ b/web/cobrands/gloucester/images/external-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/web/cobrands/gloucester/images/facebook.svg b/web/cobrands/gloucester/images/facebook.svg new file mode 100644 index 00000000000..6df11346796 --- /dev/null +++ b/web/cobrands/gloucester/images/facebook.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/web/cobrands/gloucester/images/favicon.ico b/web/cobrands/gloucester/images/favicon.ico new file mode 100644 index 00000000000..7909710fea8 Binary files /dev/null and b/web/cobrands/gloucester/images/favicon.ico differ diff --git a/web/cobrands/gloucester/images/gloucester-logo.png b/web/cobrands/gloucester/images/gloucester-logo.png new file mode 100644 index 00000000000..d0750925703 Binary files /dev/null and b/web/cobrands/gloucester/images/gloucester-logo.png differ diff --git a/web/cobrands/gloucester/images/twitter.svg b/web/cobrands/gloucester/images/twitter.svg new file mode 100644 index 00000000000..614bedd9b31 --- /dev/null +++ b/web/cobrands/gloucester/images/twitter.svg @@ -0,0 +1 @@ + diff --git a/web/cobrands/gloucester/layout.scss b/web/cobrands/gloucester/layout.scss new file mode 100755 index 00000000000..6e272c5a386 --- /dev/null +++ b/web/cobrands/gloucester/layout.scss @@ -0,0 +1,45 @@ +@import "_variables"; +@import "../sass/layout"; + +/* NAVBAR */ +#site-logo { + background-size: auto 4.375rem; + height: $mappage-header-height; + width: 10.9375rem; +} + +.nav-menu--main { + a, span { + font-size: 1rem; // They have 20px, but we have more items in the navbar so I ended up using this size instead. + + &:focus { + background-color: $glucester_blue_hover; + $color: $primary_text; + outline: none; + } + &:focus-visible { + outline: -webkit-focus-ring-color auto 1px; + } + } + + span { + color: $primary_text; + text-decoration: underline; + &:hover { + color: $nav_colour; + } + } +} + +/* FRONTPAGE */ +#front-main { + margin: 0 0 45px 0; + padding: 5em 1em 5em 1em; + h1 { + font-size: 2.5em; + } +} + +#front_stats { + border-color: $primary_b; +}