Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gloucester] Added cobrand front-end #5295

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions perllib/FixMyStreet/Cobrand/Gloucester.pm
Original file line number Diff line number Diff line change
@@ -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' }

Check warning on line 30 in perllib/FixMyStreet/Cobrand/Gloucester.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Gloucester.pm#L27-L30

Added lines #L27 - L30 were not covered by tests

=item * Users with a gloucester.gov.uk email can always be found in the admin.

=cut

sub admin_user_domain { 'gloucester.gov.uk' }

Check warning on line 36 in perllib/FixMyStreet/Cobrand/Gloucester.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Gloucester.pm#L36

Added line #L36 was not covered by tests

=item * Allows anonymous reporting

=cut

sub allow_anonymous_reports { 'button' }

Check warning on line 42 in perllib/FixMyStreet/Cobrand/Gloucester.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Gloucester.pm#L42

Added line #L42 was not covered by tests

=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/'

Check warning on line 49 in perllib/FixMyStreet/Cobrand/Gloucester.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Gloucester.pm#L49

Added line #L49 was not covered by tests
}

=item * Users can not reopen reports

=cut

sub reopening_disallowed {
my ($self, $problem) = @_;

Check warning on line 57 in perllib/FixMyStreet/Cobrand/Gloucester.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Gloucester.pm#L57

Added line #L57 was not covered by tests

# Only staff can reopen reports.
my $c = $self->{c};
my $user = $c->user;

Check warning on line 61 in perllib/FixMyStreet/Cobrand/Gloucester.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Gloucester.pm#L60-L61

Added lines #L60 - L61 were not covered by tests
return 0 if ($c->user_exists && $user->from_body && $user->from_body->cobrand_name eq $self->council_name);
return 1;

Check warning on line 63 in perllib/FixMyStreet/Cobrand/Gloucester.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Gloucester.pm#L63

Added line #L63 was not covered by tests
}

=item * We do not send questionnaires.

=cut

sub send_questionnaires { 0 }

Check warning on line 70 in perllib/FixMyStreet/Cobrand/Gloucester.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Gloucester.pm#L70

Added line #L70 was not covered by tests

=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;

Check warning on line 86 in perllib/FixMyStreet/Cobrand/Gloucester.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Gloucester.pm#L85-L86

Added lines #L85 - L86 were not covered by tests

my $town = 'Gloucester';

Check warning on line 88 in perllib/FixMyStreet/Cobrand/Gloucester.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Gloucester.pm#L88

Added line #L88 was not covered by tests

return {
%{ $self->SUPER::disambiguate_location() },

Check warning on line 91 in perllib/FixMyStreet/Cobrand/Gloucester.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Gloucester.pm#L91

Added line #L91 was not covered by tests
town => $town,
centre => '51.8493825813624,-2.24025312382298',
span => '0.0776436939868574,0.12409536555503',
bounds => [
51.8075803711933, -2.30135343437398,
51.8852240651802, -2.17725806881895
],
};
}

1;
20 changes: 20 additions & 0 deletions templates/email/gloucester/_email_color_overrides.html
Original file line number Diff line number Diff line change
@@ -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

%]
64 changes: 64 additions & 0 deletions templates/web/gloucester/footer_extra.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<footer class="pcg-footer-black">
<div class="container footer-grid">
<div class="pcg-footer-black__wrapper--contacts col-12 col-sm-6 col-lg-3">
<h3 class="pcg-footer-black__subtitle">Follow us</h3>
<ul class="pcg-footer-black__social">
<li class="pcg-footer-black__social-item">
<a href="https://www.facebook.com/GloucesterCityCouncil/" target="_blank" title="https://www.facebook.com/GloucesterCityCouncil/" class="pcg-sn-icon pcg-contrast__link-hovered icon icon-facebook" aria-label="Go to https://www.facebook.com/GloucesterCityCouncil/">
</a>
</li>

<li class="pcg-footer-black__social-item">
<a href="https://twitter.com/GloucesterCity" target="_blank" title="https://twitter.com/GloucesterCity" class="pcg-sn-icon pcg-contrast__link-hovered icon icon-twitter" aria-label="Go to https://twitter.com/GloucesterCity">
</a>
</li>
</ul>
</div>

<div class="pcg-footer-black__wrapper--nav col-12 col-sm-6 col-lg-3">
<h2 class="pcg-footer-black__title" id="footer-menu-title-2b7317">About Gloucester</h2>

<nav class="pcg-footer-navigation pcg-footer-black__navigation" aria-labelledby="footer-menu-title-2b7317">
<ul class="pcg-footer-navigation__list">
<li>
<a href="http://visitgloucester.co.uk/" target="_blank" class="pcg-footer-navigation__link" aria-label="Visit Gloucester - Opens new tab">Visit Gloucester</a>
<img src="/cobrands/gloucester/images/external-icon.svg" alt="" role="presentation" aria-hidden="true" width="16">
</li>
<li>
<a href="http://democracy.gloucester.gov.uk/mgFindMember.aspx" target="_blank" class="pcg-footer-navigation__link" aria-label="Find your councillor - Opens new tab">Find your councillor</a>
<img src="/cobrands/gloucester/images/external-icon.svg" alt="" role="presentation" aria-hidden="true" width="16">
</li>
<li>
<a href="https://www.gloucesterlottery.co.uk/" target="_blank" class="pcg-footer-navigation__link" aria-label="Gloucester Lottery - Opens new tab">Gloucester Lottery</a>
<img src="/cobrands/gloucester/images/external-icon.svg" alt="" role="presentation" aria-hidden="true" width="16">
</li>
</ul>
</nav>
</div>

<div class="pcg-footer-black__wrapper pcg-footer-black__wrapper--nav col-12 col-sm-6 col-lg-3">
<h2 class="pcg-footer-black__title" id="footer-menu-title-77cd40">Using our site</h2>
<nav class="pcg-footer-navigation pcg-footer-black__navigation" aria-labelledby="footer-menu-title-77cd40">
<ul class="pcg-footer-navigation__list">
<li>
<a href="https://www.gloucester.gov.uk/about-the-council/data-protection-and-freedom-of-information/data-protection/" target="_self" class="pcg-footer-navigation__link pcg-contrast__link">How we use your information</a>
</li>
<li>
<a href="https://www.gloucester.gov.uk/sitemap/" target="_self" class="pcg-footer-navigation__link pcg-contrast__link">Sitemap</a>
</li>
<li>
<a href="https://www.gloucester.gov.uk/accessibility/" target="_self" class="pcg-footer-navigation__link pcg-contrast__link">Accessibility</a>
</li>
<li>
<a href="https://www.gloucester.gov.uk/cookies/" target="_self" class="pcg-footer-navigation__link pcg-contrast__link">Cookies</a>
</li>
<li>
<a href="https://www.gloucester.gov.uk/about-the-council/consultations-and-feedback/compliments-comments-and-complaints/" target="" class="pcg-footer-navigation__link pcg-contrast__link">Make a comment, complaint or compliment</a>
</li>
</ul>
</nav>
</div>
</div>
</footer>
[% PROCESS '_footer_main_nav.html' %]
[% PROCESS '_footer_extra_powered_by.html' %]
1 change: 1 addition & 0 deletions templates/web/gloucester/footer_extra_js.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[% PROCESS 'footer_extra_js_base.html' highways=0 roadworks=0 validation=0 cobrand_js=0 %]
Empty file.
5 changes: 5 additions & 0 deletions templates/web/gloucester/header_extra.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<link rel="icon" type="image/png" sizes="32x32" href="/cobrands/gloucester/images/favicon.ico">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap" rel="stylesheet">
[% INCLUDE 'tracking_code.html' %]
2 changes: 2 additions & 0 deletions templates/web/gloucester/header_logo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<a href="https://www.gloucester.gov.uk/" id="site-logo">Gloucester City council</a>
<a href="/" id="report-cta" title="[%- loc('Report a problem') -%]">[%- loc('Report') -%]</a>
1 change: 1 addition & 0 deletions templates/web/gloucester/site-name.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Gloucester City Council FixMyStreet
5 changes: 5 additions & 0 deletions templates/web/gloucester/tracking_code.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[% IF c.config.BASE_URL == "https://www.fixmystreet.com" %]

<!-- TODO: Add tracking code here -->

[% END %]
112 changes: 112 additions & 0 deletions web/cobrands/gloucester/_variables.scss
Original file line number Diff line number Diff line change
@@ -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;
Loading