diff --git a/perllib/FixMyStreet/Cobrand/NottinghamshirePolice.pm b/perllib/FixMyStreet/Cobrand/NottinghamshirePolice.pm new file mode 100644 index 00000000000..74b360bbe88 --- /dev/null +++ b/perllib/FixMyStreet/Cobrand/NottinghamshirePolice.pm @@ -0,0 +1,76 @@ +=head1 NAME + +FixMyStreet::Cobrand::NottinghamshirePolice - code specific to the Nottinghamshire Police cobrand. + +=head1 SYNOPSIS + +=head1 DESCRIPTION + +=cut + +package FixMyStreet::Cobrand::NottinghamshirePolice; +use base 'FixMyStreet::Cobrand::UKCouncils'; + +use strict; +use warnings; + +use Moo; + +=head2 Defaults + +=over 4 + +=cut + +sub council_area_id { [ 2236, 2565 ] } +sub council_area { 'Nottinghamshire'; } +sub council_name { 'Nottinghamshire Police' } +sub council_url { 'nottinghamshirepolice' } + +sub disambiguate_location { + my $self = shift; + my $string = shift; + + my $town = "Nottinghamshire"; + + return { + %{ $self->SUPER::disambiguate_location() }, + town => $town, + centre => '53.1337083457641,-1.00642123965732', + span => '0.713104976883301,0.678328244170235', + bounds => [ 52.7894115139395, -1.34459045070673, 53.5025164908228, -0.666262206536495 ], + }; +} + +sub enter_postcode_text { 'Enter a Nottinghamshire postcode, street name or area' } + +sub privacy_policy_url { + 'https://www.nottinghamshire.pcc.police.uk/Document-Library/Public-Information/Policies-and-Procedures/People/Privacy-Notice-OPCCN-Feb-2023.pdf' +} + +=item * Never allows anonymous reports. + +=cut + +sub allow_anonymous_reports { 0 } + +=item * Users with a notts.police.uk email can always be found in the admin. + +=cut + +sub admin_user_domain { 'notts.police.uk' } + +=head2 pin_colour + +Yellow for open, green for closed or fixed. + +=cut + +sub pin_colour { + my ( $self, $p ) = @_; + + return 'green' if $p->is_fixed || $p->is_closed; + return 'yellow'; +} + +1; diff --git a/templates/email/nottinghamshirepolice/_email_color_overrides.html b/templates/email/nottinghamshirepolice/_email_color_overrides.html new file mode 100644 index 00000000000..2d0a5ac7c72 --- /dev/null +++ b/templates/email/nottinghamshirepolice/_email_color_overrides.html @@ -0,0 +1,23 @@ +[% + +blue = '#1d1a3a' +blue_pale = '#bec7d6' +red = '#b72c5d' + +body_background_color = blue_pale +body_text_color = color_black + +header_background_color = blue +header_text_color = color_white + +secondary_column_background_color = color_white + +button_background_color = red +button_text_color = color_white +link_text_color = '#00e' + +logo_file = 'logo.png' +logo_width = "265" # pixel measurement, but without 'px' suffix +logo_height = "80" # pixel measurement, but without 'px' suffix + +%] diff --git a/templates/web/nottinghamshirepolice/footer_extra.html b/templates/web/nottinghamshirepolice/footer_extra.html new file mode 100644 index 00000000000..ad1ddef980f --- /dev/null +++ b/templates/web/nottinghamshirepolice/footer_extra.html @@ -0,0 +1,128 @@ + +
diff --git a/templates/web/nottinghamshirepolice/front/footer-marketing.html b/templates/web/nottinghamshirepolice/front/footer-marketing.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/templates/web/nottinghamshirepolice/front/pre-columns.html b/templates/web/nottinghamshirepolice/front/pre-columns.html new file mode 100644 index 00000000000..74c00fbbbc4 --- /dev/null +++ b/templates/web/nottinghamshirepolice/front/pre-columns.html @@ -0,0 +1,11 @@ + diff --git a/templates/web/nottinghamshirepolice/header_extra.html b/templates/web/nottinghamshirepolice/header_extra.html new file mode 100644 index 00000000000..a26651cb8de --- /dev/null +++ b/templates/web/nottinghamshirepolice/header_extra.html @@ -0,0 +1,5 @@ + + + + + diff --git a/templates/web/nottinghamshirepolice/site-name.html b/templates/web/nottinghamshirepolice/site-name.html new file mode 100644 index 00000000000..23d2e6b2917 --- /dev/null +++ b/templates/web/nottinghamshirepolice/site-name.html @@ -0,0 +1 @@ +Inmediate Justice \ No newline at end of file diff --git a/web/cobrands/nottinghamshirepolice/_variables.scss b/web/cobrands/nottinghamshirepolice/_variables.scss new file mode 100644 index 00000000000..cf26030f6ca --- /dev/null +++ b/web/cobrands/nottinghamshirepolice/_variables.scss @@ -0,0 +1,129 @@ +// Styling based on https://preview-pcc-nottinghamshire.cloud.contensis.com/Preview/1/news/more-officers-take-to-the-streets-to-tackle-antisocial-behaviour-and-serious-violence + +// If you are wanting a right-to-left layout, uncomment the following line. +// $direction: right; + +/* COLOURS */ +$blue-1000: rgb(0, 0, 37); // Active state navbar +$blue-900: rgb(29, 26, 58); //For navbar and secondary buttons +$blue-500: rgb(23, 33, 128); // Background sections +$blue-400: rgb(46, 49, 146); // Blue cards +$blue-300: rgb(78, 188, 246); // Focus outline colour +$grey-bg: rgb(247, 247, 249); +$grey: rgb(211, 213, 222); // Input borders +$black: rgb(29, 26, 58); +$white: #fff; +$red: rgb(183, 44, 93); // Use for buttons and errors. Example here: https://preview-pcc-nottinghamshire.cloud.contensis.com/Preview/1/news/more-officers-take-to-the-streets-to-tackle-antisocial-behaviour-and-serious-violence +$pink: rgb(169, 16, 177); + +$error_color: $red; + +$green: #016200; //For buttons and links +$green-600: #065325; // Hover effect buttons + +$grey-100: #f5f5f57a; //Background for most sections the website +$grey-200: #f5f5f5; // Background for banners + +$yellow: #e2ca76; // For info boxes body with no title and tags +$yellow-400: #eee3ba; // body for info boxes with title tag + +$primary: $red; +$primary_b: $black; +$primary_text: $white; +$primary_link_color: rgb(0, 0, 238); +$primary_link_hover_color: rgb(0, 0, 238); +$primary_link_hover_decoration: underline; +$link-color: rgb(0, 0, 238); // Browser link colour +$link-text-decoration: none; +$link-hover-text-decoration: underline; +$link-hover-color: rgb(0, 0, 238); + +$focus-bg-top: $yellow; +$focus-bg-bottom: $yellow; +$focus-text: $black; + +$button-padding-top: 1rem; +$button-padding-bottom: 1rem; +$button-padding-left: 1.5rem; +$button-padding-right: 1.5rem; + +$button-border-radius: 0.25rem; +$button-primary-bg-top: $primary; +$button-primary-bg-bottom: $primary; +$button-primary-border: $primary; +$button-primary-text: $primary_text; +$button-primary-hover-bg-bottom:$pink; +$button-primary-hover-bg-top:$pink; +$button-primary-hover-border:$pink; +$button-primary-hover-text: $primary_text; +$button-primary-focus-bg-bottom: $primary; +$button-primary-focus-bg-top: $primary; +$button-primary-focus-border: $primary; +$button-primary-focus-text: $primary_text; + +$button-secondary-bg-top: $white; +$button-secondary-bg-bottom: $white; +$button-secondary-border: $blue-900; +$button-secondary-text: $blue-900; +$button-secondary-hover-bg-bottom: $blue-900; +$button-secondary-hover-bg-top: $blue-900; +$button-secondary-hover-border: $blue-900; +$button-secondary-hover-text: $primary_text; +$button-secondary-focus-bg-bottom: $white; +$button-secondary-focus-bg-top: $white; +$button-secondary-focus-border: $blue-900; +$button-secondary-focus-text: $blue-900; + +$base_bg: $white; +$base_fg: $black; + +$error_color: $red; + +// FONTS +$arial-font: Arial, Helvetica, sans-serif; + +$heading-font: "Manrope", sans-serif; +$body-font: $arial-font; +$meta-font: $arial-font; + +// HEADER +$mappage-header-height: 7.5rem; +$header-top-border-width: 0; +$nav_background_colour: $blue-900; +$nav_colour: $white; +$nav_hover_background_colour: $blue-1000; + +// FRONTPAGE +// Mobile +$front-main-color: $primary_b; +$front-main-background: $grey-100; +$postcodeform-background: $white; +$postcodeform-color: $primary_b; + +// Desktop +$front-main-background-desktop: $blue-900; +$front-main-container-background-desktop: $grey-bg; +$front-main-color-desktop: $primary_b; +$postcodeform-color-desktop: $black; + +$geolocation-link-border: $primary; +$geolocation-link: $primary; +$geolocation-link-background-color: $white; + +// Colour used for front page 'how to report a problem' steps +$col_big_numbers: $primary_b; +$layout_front_stats_color: $primary_b; +$col_click_map: $primary; + +$mappage-sidebar-width: 32em; +$mobile-sticky-sidebar-button-menu-image: "menu-white"; +$sticky-sidebar-link-color: $primary; + +$container-max-width: 90rem; + +@mixin nott-focus-state { + &:focus { + outline: $blue-300 solid 0.25rem; + outline-offset: 0.1rem; + } +} diff --git a/web/cobrands/nottinghamshirepolice/base.scss b/web/cobrands/nottinghamshirepolice/base.scss new file mode 100644 index 00000000000..aa9b27ad286 --- /dev/null +++ b/web/cobrands/nottinghamshirepolice/base.scss @@ -0,0 +1,205 @@ +@import "../sass/h5bp"; +@import "./_variables"; +@import "../sass/mixins"; +@import "../sass/base"; +@import "../fixmystreet-uk-councils/societyworks-footer"; + +html { + body, p { + font-size: 1.25rem; + } +} + +// GENERAL COMPONENTS +h1, h2, h3 { + font-family: $heading-font; +} + +/* BUTTONS */ +.btn-primary, +.btn--primary, +.postcode-form-box div input#sub, +#report-cta { + @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,$focus-bg-bottom: $button-primary-focus-bg-bottom, $focus-bg-top: $button-primary-focus-bg-top, $focus-border: $button-primary-focus-border, $focus-text: $button-primary-focus-text); + border-radius: $button-border-radius; + @include button-size(); + text-decoration: none; // For #report-cta + font-size: 1.25rem; + @include nott-focus-state; +} + +.btn--secondary, +.btn-secondary, +.nav-menu a.btn-secondary, +a#geolocate_link, +.my-account-buttons a{ + @include button-variant($bg-top: $button-secondary-bg-top, $bg-bottom: $button-secondary-bg-bottom, $border: $button-secondary-border, $text: $button-secondary-text, $hover-bg-bottom: $button-secondary-hover-bg-bottom, $hover-bg-top: $button-secondary-hover-bg-top, $hover-border: $button-secondary-hover-border, $hover-text: $button-secondary-hover-text,$focus-bg-bottom: $button-secondary-focus-bg-bottom, $focus-bg-top: $button-secondary-focus-bg-top, $focus-border: $button-secondary-focus-border, $focus-text: $button-secondary-focus-text); + @include button-size(); + border-width: 0.125rem; + border-radius: $button-border-radius; + text-decoration: none; // For .my-account-buttons + font-size: 1.25rem; + @include nott-focus-state; +} + +input[type="text"], +textarea, +.postcode-form-box div, +.form-control { + border: 2px solid $grey; + border-radius: 0.25rem; + @include nott-focus-state; +} + +a, +.nav-menu span { + @include nott-focus-state; +} + +.site-message { + border: 0.3rem solid $blue-900; + border-radius: 0.5rem; + + :first-child { + margin-top: 0; + } +} + +// HEADER +.nav-menu a, +.nav-menu a:visited { + background-color: $blue-900; + border-bottom: none; + color: $primary_text; + font-weight: 700; +} + +.nav-menu span { + background-color: $blue-1000; + color: $primary_text; + border-bottom: none; + font-weight: 700; +} + +#site-logo { + background-size: 9.0625rem; + height: 5.5rem; + width: 16.5rem; + @include svg-background-image("/cobrands/nottinghamshirepolice/images/logo"); +} + +// FOOTER +footer.main-footer { + background-color: $blue-900; + color: $primary_text; + padding-top: 4rem; + a { + color: $primary_text; + &:hover { + color: rgb(253, 168, 209); + } + } + + .main-content { + display: flex; + flex-flow: column wrap; + -webkit-box-align: center; + align-items: center; + flex-wrap: wrap; + -webkit-box-pack: justify; + justify-content: space-between; + padding-bottom: 4rem; + gap: 5rem; + + .first-column { + display: flex; + flex-flow: column wrap; + -webkit-box-align: start; + align-items: start; + -webkit-box-pack: center; + justify-content: center; + -webkit-box-align: center; + align-items: center; + color: rgb(255, 255, 255); + gap: 2.5rem; + + .social-container { + display: flex; + flex-wrap: wrap; + gap: 1rem; + } + } + } + + .list-wrapper { + display: flex; + flex-flow: column wrap; + -webkit-box-pack: center; + justify-content: center; + -webkit-box-align: center; + align-items: center; + color: rgb(255, 255, 255); + gap: 2.5rem; + } + + ul { + display: flex; + flex-flow: column wrap; + -webkit-box-pack: center; + justify-content: center; + -webkit-box-align: center; + align-items: center; + list-style: none; + margin: 0px; + padding: 0px; + text-align: center; + } + + li { + list-style: none; + + &.contact-wrapper { + display: flex; + flex-flow: column wrap; + } + + &.default { + display: flex; + margin-bottom: 1.5rem; + } + + &.opening-hours { + font-size: 1.25rem; + line-height: 1.6; + font-weight: bold; + } + } + + .section-title { + font-family: $heading-font; + font-optical-sizing: auto; + font-style: normal; + font-size: 1.5rem; + line-height: 1.333; + font-weight: bold; + margin-bottom: 2.5rem; + display: inline-block; + } + + .credits { + text-align: center; + } +} + +// HOMEPAGE +a#geolocate_link { + margin-top: 1rem; +} + +.postcode-form-box div { + border-radius: 0.3rem; +} + +#front-main-container { + box-sizing: border-box; +} diff --git a/web/cobrands/nottinghamshirepolice/images/favicon.png b/web/cobrands/nottinghamshirepolice/images/favicon.png new file mode 100644 index 00000000000..9b81363fc52 Binary files /dev/null and b/web/cobrands/nottinghamshirepolice/images/favicon.png differ diff --git a/web/cobrands/nottinghamshirepolice/images/inmediate-justice-logo.png b/web/cobrands/nottinghamshirepolice/images/inmediate-justice-logo.png new file mode 100644 index 00000000000..d0c99f7a3b6 Binary files /dev/null and b/web/cobrands/nottinghamshirepolice/images/inmediate-justice-logo.png differ diff --git a/web/cobrands/nottinghamshirepolice/images/logo.png b/web/cobrands/nottinghamshirepolice/images/logo.png new file mode 100644 index 00000000000..398ebf97612 Binary files /dev/null and b/web/cobrands/nottinghamshirepolice/images/logo.png differ diff --git a/web/cobrands/nottinghamshirepolice/images/logo.svg b/web/cobrands/nottinghamshirepolice/images/logo.svg new file mode 100644 index 00000000000..f59bbba3e20 --- /dev/null +++ b/web/cobrands/nottinghamshirepolice/images/logo.svg @@ -0,0 +1,2 @@ + + diff --git a/web/cobrands/nottinghamshirepolice/layout.scss b/web/cobrands/nottinghamshirepolice/layout.scss new file mode 100644 index 00000000000..8ebb09c4be6 --- /dev/null +++ b/web/cobrands/nottinghamshirepolice/layout.scss @@ -0,0 +1,61 @@ +@import "_variables"; +@import "../sass/layout"; + +#site-logo { + background-size: contain; + height: $mappage-header-height; + width: 16.5rem; +} + +.postcode-form-box { + overflow: visible; // Doesn't cover the outline when focusing elements +} + +// GENERAL + +.alertpage { + p { + max-width: 59.5rem; + } +} + +// HEADER +.nav-menu--main a, .nav-menu--main span { + padding: 1em; +} + +.nav-menu--main span, +.nav-menu--main span.report-a-problem-btn:hover { + background-color: $blue-1000; + color: $primary_text; + text-decoration: none; +} + +// FOOTER +footer.main-footer { + padding-top: 5rem; + .main-content { + gap: 2.5rem; + flex-direction: row; + -webkit-box-align: start; + align-items: start; + padding-bottom: 7.5rem; + } + + .list-wrapper { + -webkit-box-align: start; + align-items: start; + } + + ul { + -webkit-box-align: start; + align-items: start; + text-align: start; + } +} + +// HOMEPAGE + +#front-main { + padding-bottom: 4rem; +}