aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2017-01-05 15:17:16 +0000
committerDave Arter <davea@mysociety.org>2018-04-03 12:44:23 +0100
commite277f9bc21c405516051edf5c968feeac4220c41 (patch)
tree2d307574344f6833b9ba6f8c4cc10d13b8572526
parentc25cdf13034e347588522f8eab3959ab39c558ee (diff)
[Buckinghamshire] Add initial cobrand
-rw-r--r--perllib/FixMyStreet/Cobrand/Buckinghamshire.pm48
-rw-r--r--templates/web/buckinghamshire/around/intro.html2
-rw-r--r--templates/web/buckinghamshire/footer.html44
-rw-r--r--templates/web/buckinghamshire/front/footer-marketing.html0
-rw-r--r--templates/web/buckinghamshire/header_logo.html2
-rw-r--r--templates/web/buckinghamshire/report/new/councils_extra_text.html1
-rw-r--r--web/cobrands/buckinghamshire/_colours.scss39
-rw-r--r--web/cobrands/buckinghamshire/_fonts.scss15
-rw-r--r--web/cobrands/buckinghamshire/base.scss95
-rw-r--r--web/cobrands/buckinghamshire/img/bucks-logo.pngbin0 -> 8520 bytes
-rw-r--r--web/cobrands/buckinghamshire/img/footer-bg.pngbin0 -> 28072 bytes
-rw-r--r--web/cobrands/buckinghamshire/layout.scss157
12 files changed, 403 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
new file mode 100644
index 000000000..be090ce17
--- /dev/null
+++ b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
@@ -0,0 +1,48 @@
+package FixMyStreet::Cobrand::Buckinghamshire;
+use parent 'FixMyStreet::Cobrand::UKCouncils';
+
+use strict;
+use warnings;
+
+sub council_area_id { return 2217; }
+sub council_area { return 'Buckinghamshire'; }
+sub council_name { return 'Buckinghamshire County Council'; }
+sub council_url { return 'buckinghamshire'; }
+
+sub example_places {
+ return ( 'HP19 7QF', "Walton Road" );
+}
+
+sub disambiguate_location {
+ my $self = shift;
+ my $string = shift;
+
+ my $town = 'Buckinghamshire';
+
+ return {
+ %{ $self->SUPER::disambiguate_location() },
+ town => $town,
+ centre => '51.7852948471218,-0.812140044990842',
+ span => '0.596065946222112,0.664092167105497',
+ bounds => [ 51.4854160129405, -1.1406945585036, 52.0814819591626, -0.476602391398098 ],
+ };
+}
+
+sub pin_colour {
+ my ( $self, $p, $context ) = @_;
+ return 'grey' if $p->state eq 'not responsible';
+ return 'green' if $p->is_fixed || $p->is_closed;
+ return 'red' if $p->state eq 'confirmed';
+ return 'yellow';
+}
+
+sub contact_email {
+ my $self = shift;
+ return join( '@', 'pjparfitt', 'buckscc.gov.uk' );
+}
+
+sub send_questionnaires {
+ return 0;
+}
+
+1;
diff --git a/templates/web/buckinghamshire/around/intro.html b/templates/web/buckinghamshire/around/intro.html
new file mode 100644
index 000000000..01d7c654f
--- /dev/null
+++ b/templates/web/buckinghamshire/around/intro.html
@@ -0,0 +1,2 @@
+<h1>Report a problem on a street</h1>
+<p>Report a problem on a street in Buckinghamshire or look at and discuss problems that have already been reported.</p>
diff --git a/templates/web/buckinghamshire/footer.html b/templates/web/buckinghamshire/footer.html
new file mode 100644
index 000000000..c85530e8f
--- /dev/null
+++ b/templates/web/buckinghamshire/footer.html
@@ -0,0 +1,44 @@
+ </div><!-- .content role=main -->
+ </div><!-- .container -->
+ </div><!-- .table-cell -->
+
+ <div class="nav-wrapper">
+ <div class="container">
+ <div id="main-nav" role="navigation">
+ <ul class="nav-menu nav-menu--main">
+ <li><[% IF c.req.uri.path == '/'
+ %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn"
+ >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/my'
+ %]span[% ELSE %]a href="/my"[% END
+ %]>[% loc("Your reports") %]</[% c.req.uri.path == '/my' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/reports/Buckinghamshire'
+ %]span[% ELSE %]a href="/reports/Buckinghamshire"[% END
+ %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports/Buckinghamshire' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/alert'
+ %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END
+ %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/faq'
+ %]span[% ELSE %]a href="/faq"[% END
+ %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li>[%
+ %]<li class="nav-menu__item--privacy"><[% IF c.req.uri.path == '/privacy'
+ %]span[% ELSE %]a href="/privacy"[% END
+ %]>[% loc("Privacy") %]</[% c.req.uri.path == '/privacy' ? 'span' : 'a' %]></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div> <!-- .wrapper -->
+
+ [% IF pagefooter %]
+ <div class="bucks_footer">
+ <footer role="contentinfo" class="clearfix">
+ [% INCLUDE 'front/footer-marketing.html' %]
+ </footer>
+ </div>
+ [% END %]
+
+ [% INCLUDE 'common_footer_tags.html' %]
+
+</body>
+</html>
diff --git a/templates/web/buckinghamshire/front/footer-marketing.html b/templates/web/buckinghamshire/front/footer-marketing.html
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/templates/web/buckinghamshire/front/footer-marketing.html
diff --git a/templates/web/buckinghamshire/header_logo.html b/templates/web/buckinghamshire/header_logo.html
new file mode 100644
index 000000000..2808d8782
--- /dev/null
+++ b/templates/web/buckinghamshire/header_logo.html
@@ -0,0 +1,2 @@
+ <a href="http://www.buckscc.gov.uk/" id="site-logo"><strong>Buckinghamshire</strong> County Council</a>
+ <a href="/" id="report-cta" title="[%- loc('Report a problem') -%]">[%- loc('Report') -%]</a>
diff --git a/templates/web/buckinghamshire/report/new/councils_extra_text.html b/templates/web/buckinghamshire/report/new/councils_extra_text.html
new file mode 100644
index 000000000..87f9ae8ab
--- /dev/null
+++ b/templates/web/buckinghamshire/report/new/councils_extra_text.html
@@ -0,0 +1 @@
+Do not use this to <a href="/faq#emergencies">report emergencies outside of working hours</a>.
diff --git a/web/cobrands/buckinghamshire/_colours.scss b/web/cobrands/buckinghamshire/_colours.scss
new file mode 100644
index 000000000..4525989ad
--- /dev/null
+++ b/web/cobrands/buckinghamshire/_colours.scss
@@ -0,0 +1,39 @@
+/* LAYOUT */
+
+// If you are wanting a right-to-left layout, uncomment the following line.
+// $direction: right;
+
+/* COLOURS */
+
+$menu-image: 'menu-black';
+
+$bucks_green: #97c34b;
+$bucks_dark_green: #547f35;
+
+
+$g1: #2e3137;
+$g2: #676973;
+$g6: #eaeaea;
+$g7: #f1f1f1;
+$b3: #0d45a0;
+$b4: #74a9ff;
+
+$primary: $bucks_dark_green;
+$primary_b: $g1;
+$primary_text: $g1;
+
+$base_bg: white;
+$base_fg: $g1;
+
+$map_nav_bg: #fff;
+$nav_fg: #000;
+$nav_fg_hover: #eee;
+
+$col_click_map: $g1;
+$col_click_map_dark: darken($g1, 10%);
+
+$col_fixed_label: #00BD08;
+$col_fixed_label_dark: #4B8304;
+
+$header-top-border-width: 5px;
+$header-top-border: 5px solid $bucks_green;
diff --git a/web/cobrands/buckinghamshire/_fonts.scss b/web/cobrands/buckinghamshire/_fonts.scss
new file mode 100644
index 000000000..3bbde2244
--- /dev/null
+++ b/web/cobrands/buckinghamshire/_fonts.scss
@@ -0,0 +1,15 @@
+$bold-font-family: "Helvetica Neue Bold", "Helvetica Neue", Helvetica, sans-serif;
+$normal-font-family: "Helvetica Neue", Helvetica, sans-serif;
+
+%bold-font {
+ font-family: $bold-font-family;
+ font-weight: bold !important; // !important to ensure it doesn't get overridden, as we can't guarantee placement order in resulting CSS
+}
+%normal-font {
+ font-family: $normal-font-family;
+ font-weight: normal;
+}
+
+$heading-font: $bold-font-family;
+$body-font: $normal-font-family;
+$meta-font: $normal-font-family;
diff --git a/web/cobrands/buckinghamshire/base.scss b/web/cobrands/buckinghamshire/base.scss
new file mode 100644
index 000000000..2baf738bc
--- /dev/null
+++ b/web/cobrands/buckinghamshire/base.scss
@@ -0,0 +1,95 @@
+@import "../sass/h5bp";
+@import "./_colours";
+@import "./_fonts";
+@import "../sass/mixins";
+
+@import "../sass/base";
+
+// Put the logo in place, and reveal the text alongside it
+#site-logo {
+ @extend %normal-font;
+
+ background: url(/cobrands/buckinghamshire/img/bucks-logo.png) 0 50% no-repeat;
+ background-size: 37px;
+ text-indent: 0;
+ padding-left: 47px;
+ padding-right: 7em;
+ line-height: 1.3em;
+ font-size: 0.875em;
+ margin: 9px 0;
+ color: black;
+ width: auto;
+ height: 37px;
+
+ strong {
+ display: block;
+ @extend %bold-font;
+ }
+}
+
+#report-cta {
+ border-color: #ddd;
+}
+
+#site-header {
+ border-bottom: solid 5px $g6;
+}
+
+.nav-menu {
+ a:hover, span.hover {
+ color: $bucks_green;
+ }
+}
+
+// Set the default font colour everywhere
+body, .content {
+ color: $g1;
+}
+
+// Make sure the numbers on the front page have the correct font weight
+#front-howto {
+ #front_stats {
+ color: white;
+
+ div {
+ @extend %bold-font;
+ }
+ }
+}
+
+// FAQ/privacy pages should have correctly-weighted headers
+dl dt {
+ @extend %bold-font;
+}
+
+
+#front-main {
+ text-align: left;
+
+ h1 {
+ font-size: 1.75em;
+ }
+
+ #postcodeForm {
+ color: white;
+ margin-top: 1em;
+ }
+}
+
+p, dd, aside {
+ a, a:visited, a:hover {
+ color: $b3;
+ }
+}
+
+a#geolocate_link {
+ color: $b3;
+}
+
+label {
+ @extend %bold-font;
+}
+
+#map #drag .square-map__tile {
+ position: static;
+}
diff --git a/web/cobrands/buckinghamshire/img/bucks-logo.png b/web/cobrands/buckinghamshire/img/bucks-logo.png
new file mode 100644
index 000000000..fab2eb153
--- /dev/null
+++ b/web/cobrands/buckinghamshire/img/bucks-logo.png
Binary files differ
diff --git a/web/cobrands/buckinghamshire/img/footer-bg.png b/web/cobrands/buckinghamshire/img/footer-bg.png
new file mode 100644
index 000000000..536770146
--- /dev/null
+++ b/web/cobrands/buckinghamshire/img/footer-bg.png
Binary files differ
diff --git a/web/cobrands/buckinghamshire/layout.scss b/web/cobrands/buckinghamshire/layout.scss
new file mode 100644
index 000000000..4a37bb183
--- /dev/null
+++ b/web/cobrands/buckinghamshire/layout.scss
@@ -0,0 +1,157 @@
+@import "_colours";
+@import "_fonts";
+
+$header-top-border: false; // There is, but we want to do it ourselves
+
+@import "../sass/layout";
+
+#site-header {
+ border-top-width: 10px;
+ border-bottom: none;
+ margin-bottom: 4em; // Push content past abs. positioned nav
+}
+
+// Don't want larger logo on mappage.
+body.frontpage, body.twothirdswidthpage, body.fullwidthpage, body.authpage {
+ // Display the BCC logo and header correctly
+ #site-logo {
+ background-size: 60px;
+ text-indent: 80px;
+ padding-left: 0;
+ line-height: 92px;
+ font-size: 24px;
+ margin: 0;
+ height: 92px;
+ strong {
+ display: inline;
+ }
+ }
+
+ .nav-wrapper {
+ margin-top: 102px; // 92px image header + 10px top border
+ border-bottom: solid 5px $g6;
+ border-top: solid 5px $g6;
+ }
+
+ #main-nav {
+ float: left;
+ min-height: 0;
+ }
+
+ .nav-menu {
+ a, span {
+ display: inline-block; // So the chevrons appear correctly
+ font-size: 1.2em;
+ padding: 0.5em 0.75em;
+ margin: 0;
+ }
+ }
+}
+
+// Stop the 'report a problem' button being red on non-map pages
+.nav-menu--main a.report-a-problem-btn {
+ color: $b3;
+ background-color: transparent;
+}
+.nav-menu--main a.report-a-problem-btn:hover {
+ background-color: transparent;
+}
+
+.nav-menu {
+ span {
+ color: $g1;
+ }
+ a {
+ text-decoration: underline;
+ color: $b3;
+ &:hover {
+ text-decoration: underline;
+ background-color: transparent;
+ color: $g1;
+ }
+ }
+}
+
+// Put FAQ side nav at correct vertical position
+body.twothirdswidthpage .content .sticky-sidebar aside {
+ top: 14.5em;
+}
+
+#front-main {
+ background-color: white;
+ text-align: left;
+ padding-top: 40px;
+
+ #postcodeForm {
+ margin-top: 0;
+
+ div {
+ margin: 0;
+ }
+ }
+
+ a#geolocate_link {
+ color: $b3;
+ }
+
+ h1 {
+ font-size: 2.5em;
+ }
+
+ h1 + p {
+ font-size: 1.5em;
+ line-height: 1.25em;
+ max-width: 640px;
+ }
+}
+
+body.mappage {
+ // Mappage header is 10px top border, 50px logo (7px 37px 6px), 4px bottom border
+ #site-header {
+ height: 50px;
+ border-bottom: solid 4px $g6;
+ }
+ #site-logo {
+ margin: 7px 0 6px;
+ }
+
+ #main-nav {
+ margin-top: 10px;
+ min-height: 50px;
+ }
+
+ .nav-menu {
+ z-index: 10; // Clickable
+
+ a, span {
+ font-size: 1.1em;
+ padding: 0.5em;
+ }
+ a.report-a-problem-btn {
+ color: white;
+ background-color: $bucks_dark_green;
+ padding: 0.25em;
+ margin: 0.25em;
+ &:hover {
+ background-color: lighten($bucks_green, 5%);
+ };
+ }
+ }
+
+ .big-green-banner {
+ display: block;
+ background-color: $bucks_green;
+ text-transform: none;
+ }
+}
+
+.bucks_footer {
+ background: url(/cobrands/buckinghamshire/img/footer-bg.png) right bottom no-repeat;
+ background-size: contain;
+ min-height: 160px;
+}
+
+// Set the default font colour everywhere
+body, .content {
+ color: $g1;
+}