From d7ea16b79d6dd9fe65c4550edf393bbf8fd9d04d Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Tue, 24 Apr 2012 15:49:12 +0100 Subject: New style map Barnet Cobrand Work in Progress Also, pull out map positioning JS to a separate file to make cobrands a bit more modular. --- perllib/FixMyStreet/Cobrand/Barnet.pm | 8 + templates/web/barnet/bromley-footer.html | 49 ++++ templates/web/barnet/bromley-header.html | 94 ++++++++ templates/web/barnet/footer.html | 45 +++- templates/web/barnet/header.html | 142 ++++++----- templates/web/fixmystreet/header.html | 1 + web/cobrands/barnet/_colours.scss | 9 + web/cobrands/barnet/barnet.scss | 17 ++ web/cobrands/barnet/base.scss | 6 + web/cobrands/barnet/img/barnet-footer-logo.gif | Bin 0 -> 5262 bytes web/cobrands/barnet/img/barnet-logo.gif | Bin 0 -> 6372 bytes web/cobrands/barnet/img/browsealoud.gif | Bin 0 -> 3109 bytes web/cobrands/barnet/img/directgov.gif | Bin 0 -> 3316 bytes web/cobrands/barnet/img/nav-arrow-active.gif | Bin 0 -> 3831 bytes web/cobrands/barnet/img/nav-bg-active.gif | Bin 0 -> 153 bytes web/cobrands/barnet/img/social1-facebook.gif | Bin 0 -> 499 bytes web/cobrands/barnet/img/social2-twitter.gif | Bin 0 -> 876 bytes web/cobrands/barnet/img/social3-youtube.gif | Bin 0 -> 1017 bytes web/cobrands/barnet/img/social4-flickr.gif | Bin 0 -> 670 bytes web/cobrands/barnet/layout.scss | 312 +++++++++++++++++++++++++ web/cobrands/barnet/position_map.js | 14 ++ web/cobrands/bromley/_colours.scss | 5 +- web/cobrands/bromley/base.scss | 53 +++++ web/cobrands/bromley/layout.scss | 124 +++++++++- web/cobrands/fixmystreet/fixmystreet.js | 12 +- web/cobrands/fixmystreet/position_map.js | 13 ++ 26 files changed, 829 insertions(+), 75 deletions(-) create mode 100644 templates/web/barnet/bromley-footer.html create mode 100644 templates/web/barnet/bromley-header.html create mode 100644 web/cobrands/barnet/_colours.scss create mode 100644 web/cobrands/barnet/barnet.scss create mode 100644 web/cobrands/barnet/base.scss create mode 100644 web/cobrands/barnet/img/barnet-footer-logo.gif create mode 100644 web/cobrands/barnet/img/barnet-logo.gif create mode 100644 web/cobrands/barnet/img/browsealoud.gif create mode 100644 web/cobrands/barnet/img/directgov.gif create mode 100644 web/cobrands/barnet/img/nav-arrow-active.gif create mode 100644 web/cobrands/barnet/img/nav-bg-active.gif create mode 100644 web/cobrands/barnet/img/social1-facebook.gif create mode 100644 web/cobrands/barnet/img/social2-twitter.gif create mode 100644 web/cobrands/barnet/img/social3-youtube.gif create mode 100644 web/cobrands/barnet/img/social4-flickr.gif create mode 100644 web/cobrands/barnet/layout.scss create mode 100644 web/cobrands/barnet/position_map.js create mode 100644 web/cobrands/fixmystreet/position_map.js diff --git a/perllib/FixMyStreet/Cobrand/Barnet.pm b/perllib/FixMyStreet/Cobrand/Barnet.pm index 6f115ec63..eceb656b3 100644 --- a/perllib/FixMyStreet/Cobrand/Barnet.pm +++ b/perllib/FixMyStreet/Cobrand/Barnet.pm @@ -9,6 +9,14 @@ sub council_area { return 'Barnet'; } sub council_name { return 'Barnet Council'; } sub council_url { return 'barnet'; } +sub path_to_web_templates { + my $self = shift; + return [ + FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify, + FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify + ]; +} + sub disambiguate_location { my $self = shift; return { diff --git a/templates/web/barnet/bromley-footer.html b/templates/web/barnet/bromley-footer.html new file mode 100644 index 000000000..619a6826f --- /dev/null +++ b/templates/web/barnet/bromley-footer.html @@ -0,0 +1,49 @@ + +

+ Powered by +

+ + + + + + + + + + + + + diff --git a/templates/web/barnet/bromley-header.html b/templates/web/barnet/bromley-header.html new file mode 100644 index 000000000..50b0f8fa1 --- /dev/null +++ b/templates/web/barnet/bromley-header.html @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] + + + + + + + [%# ie_wrapper is to prevent a horizontal scrollbar in IE7, it appears (from Bromley site) %] +
+ +
+ + + + + + + + +
+ +
+
+ + +
+ [% IF c.user_exists %] +

+ [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] + [% loc('sign out') %] +

+ [% END %] +
+ +

Reporting a problem in Bromley’s streets or parks

+ +
+
+ + diff --git a/templates/web/barnet/footer.html b/templates/web/barnet/footer.html index 32c6b5f7b..aa29c2495 100644 --- a/templates/web/barnet/footer.html +++ b/templates/web/barnet/footer.html @@ -1,7 +1,37 @@ -
- -
-
+
+

+ Powered by +

+
+
+ + + + + + + +
- - - + + - \ No newline at end of file + diff --git a/templates/web/barnet/header.html b/templates/web/barnet/header.html index 955473090..f8b501b70 100644 --- a/templates/web/barnet/header.html +++ b/templates/web/barnet/header.html @@ -1,60 +1,98 @@ - - - - - + + + + + + + + + + + + + + + + - - + + --> - - - - - - - [% INCLUDE 'common_header_tags.html' %] - - - -
-
- -
London Borough of Barnet
- - -
-
- -
-
- - \ No newline at end of file + + + + + + + + [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] + + + + + + +
+
+ +
+
+ +
+
+
+ + +
+ [% IF c.user_exists %] +

+ [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] + [% loc('sign out') %] +

+ [% END %] +
+ +
+
+ + diff --git a/templates/web/fixmystreet/header.html b/templates/web/fixmystreet/header.html index 6be57891a..cfd13415d 100644 --- a/templates/web/fixmystreet/header.html +++ b/templates/web/fixmystreet/header.html @@ -19,6 +19,7 @@ + [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] diff --git a/web/cobrands/barnet/_colours.scss b/web/cobrands/barnet/_colours.scss new file mode 100644 index 000000000..2f5ccc42b --- /dev/null +++ b/web/cobrands/barnet/_colours.scss @@ -0,0 +1,9 @@ +/* COLOURS */ + +$primary: #E9E9EA; +$primary_b: #000000; +$primary_text: #3E3D44; + +$contrast1: #E1E3E4; +$contrast1_dark: darken(#E1E3E4, 10%); +$contrast2: #AA8D11; diff --git a/web/cobrands/barnet/barnet.scss b/web/cobrands/barnet/barnet.scss new file mode 100644 index 000000000..34b2d79ce --- /dev/null +++ b/web/cobrands/barnet/barnet.scss @@ -0,0 +1,17 @@ +/* Parts of barnet's main CSS needed for its header/footer and adjusted (see + * bottom) to not be affected by main FixMyStreet CSS. Not very sustainable; + * perhaps we should wrap all council CSS within a SCSS #council ID? Hmm. + */ + +@import "compass"; + +#column_nav li { list-style: none ;} + +#content ol.big-numbers li { + padding: 0 0 0 2.5em; +} + +#front-howto #front_stats div big, +ol.big-numbers > li::before { + color: #C0E8E8; +} diff --git a/web/cobrands/barnet/base.scss b/web/cobrands/barnet/base.scss new file mode 100644 index 000000000..44954d909 --- /dev/null +++ b/web/cobrands/barnet/base.scss @@ -0,0 +1,6 @@ +@import "../fixmystreet/_h5bp"; +@import "./_colours"; +@import "../fixmystreet/_mixins"; +@import "compass"; + +@import "../fixmystreet/_base"; diff --git a/web/cobrands/barnet/img/barnet-footer-logo.gif b/web/cobrands/barnet/img/barnet-footer-logo.gif new file mode 100644 index 000000000..afba1cca2 Binary files /dev/null and b/web/cobrands/barnet/img/barnet-footer-logo.gif differ diff --git a/web/cobrands/barnet/img/barnet-logo.gif b/web/cobrands/barnet/img/barnet-logo.gif new file mode 100644 index 000000000..86e0f4ee8 Binary files /dev/null and b/web/cobrands/barnet/img/barnet-logo.gif differ diff --git a/web/cobrands/barnet/img/browsealoud.gif b/web/cobrands/barnet/img/browsealoud.gif new file mode 100644 index 000000000..4fbb3eded Binary files /dev/null and b/web/cobrands/barnet/img/browsealoud.gif differ diff --git a/web/cobrands/barnet/img/directgov.gif b/web/cobrands/barnet/img/directgov.gif new file mode 100644 index 000000000..1c9dd22e2 Binary files /dev/null and b/web/cobrands/barnet/img/directgov.gif differ diff --git a/web/cobrands/barnet/img/nav-arrow-active.gif b/web/cobrands/barnet/img/nav-arrow-active.gif new file mode 100644 index 000000000..89ff9d0b3 Binary files /dev/null and b/web/cobrands/barnet/img/nav-arrow-active.gif differ diff --git a/web/cobrands/barnet/img/nav-bg-active.gif b/web/cobrands/barnet/img/nav-bg-active.gif new file mode 100644 index 000000000..0d2ec9873 Binary files /dev/null and b/web/cobrands/barnet/img/nav-bg-active.gif differ diff --git a/web/cobrands/barnet/img/social1-facebook.gif b/web/cobrands/barnet/img/social1-facebook.gif new file mode 100644 index 000000000..41b404df0 Binary files /dev/null and b/web/cobrands/barnet/img/social1-facebook.gif differ diff --git a/web/cobrands/barnet/img/social2-twitter.gif b/web/cobrands/barnet/img/social2-twitter.gif new file mode 100644 index 000000000..17f368536 Binary files /dev/null and b/web/cobrands/barnet/img/social2-twitter.gif differ diff --git a/web/cobrands/barnet/img/social3-youtube.gif b/web/cobrands/barnet/img/social3-youtube.gif new file mode 100644 index 000000000..eeb6ba356 Binary files /dev/null and b/web/cobrands/barnet/img/social3-youtube.gif differ diff --git a/web/cobrands/barnet/img/social4-flickr.gif b/web/cobrands/barnet/img/social4-flickr.gif new file mode 100644 index 000000000..300e75da0 Binary files /dev/null and b/web/cobrands/barnet/img/social4-flickr.gif differ diff --git a/web/cobrands/barnet/layout.scss b/web/cobrands/barnet/layout.scss new file mode 100644 index 000000000..1f43168d6 --- /dev/null +++ b/web/cobrands/barnet/layout.scss @@ -0,0 +1,312 @@ +@import "_colours"; +@import "../fixmystreet/_layout"; + +// So that map appears underneath the header +.wrapper { + position: relative; +} +.ie6, .ie7 { + .wrapper { + padding-top: 1em; + } +} + +#front-main { + background: $primary; + @include border-radius(1em 1em 0 0); + margin-bottom: 1em; + padding-top: 0; + // layout sets this because base has it slightly lighter + h2 { + color: $primary_text; + } +} + +#front_intro { + float: left; + margin-right: 3em; +} + +#front_recent { + margin-left: 3em; +} + +.content { + width: auto; +} + +.nav-wrapper { + display: none; +} + +.mappage .content { + margin-top: 6em; +} + +.frontpage .content { + margin: 0; + @include box-shadow(none); +} +.ie6, .ie7, .ie8 { + .frontpage .content { + border: none; + } +} + +#content .container h1 { + border-bottom: none; + font-size: 2em; + margin-bottom: 0.5em; +} + +/* +.mappage #content .container h1 { + margin-left: 0; +} +*/ + +#content h1.big-green-banner { + font-size: 1em; + margin-left: -2em; +} + +/* barnet styles */ + +.clear { + clear: both; +} + +.container { + padding: 0 1em; +} + +#site-header { + display: none; +} + +#side-form { + width: 30em; +} + +#report-a-problem-sidebar { + left: 33.5em; + top: 7em; +} + +.general-sidebar-notes { + left: 31.75em; + p { + margin-bottom: 0 !important; + } +} + +#barnet-wrapper { + width: 100%; + display: table; + caption-side: bottom; +} + +body {font-size: 77%; font-family: Arial, Helvetica, sans-serif; color: #3e3d44; padding: 0; margin: 0; line-height: 1.5; background: #e9e9ea;} +body > html {font-size: 12px;} + +#barnet-wrapper {padding: 0; margin: 20px auto; width: 960px; background: #fff;} +#ie_wrapper {display: block; padding: 20px 25px 25px;} +#page {float: left; width: 100%;} + +#mast {clear: both;} + +#mast .pseudoH1 {margin: 0 0 0 -3px; padding: 0; background: url(img/barnet-logo.gif) no-repeat top left; width: 240px; height: 38px; float: left;} +#mast .pseudoH1 a, #mast .pseudoH1 a:link, #mast .pseudoH1 a:visited, #mast .pseudoH1 a:hover, #mast .pseudoH1 a:active {display: block; width: 240px; height: 38px; padding: 0; background: url(img/barnet-logo.gif) no-repeat top left;} +#mast .pseudoH1 span {position: absolute; margin-top: -13000px; top: -13000px;} + +#mast .mast_links {float: right; display: inline; margin: 0; padding: 10px 0 0; list-style: none; overflow: hidden;} + +#mast #search {clear: both; float: right; margin: 8px 0 0; background: #e1e3e4; border-top: 6px solid #bddadc; border-bottom: 2px solid #c8cacb; width: 100%; padding: 3px 0 2px; height: 21px;} + +/* ############################################################## */ + +#content {margin: 0; width: 910px; overflow: hidden; min-height: 350px;} +#content.withWidth {margin: 0 0 0 232px; width: 446px; overflow: hidden; float: left; display: inline;} +#content.fullWidth {width: 678px;} +#content.home {margin-top: 18px;} + +.mappage #content.withWidth {margin: 0 0 0 0px; width: auto; overflow: hidden; float: left; display: inline;} +.mappage #content.fullWidth {width: 900px;} + +#breadcrumb {font-size: .9em; color: #5c6267; padding: 6px 0; margin: 0 0 0 232px;} +#breadcrumb.full {margin: 0;} +#breadcrumb ul {margin: 0; padding: 0; list-style: none;} +#breadcrumb ul li {margin: 0; padding: 0 4px 0 0; display: inline;} +#breadcrumb ul li a:link, #breadcrumb ul li a:visited, #breadcrumb ul li a:hover, #breadcrumb ul li a:active {color: #5c6267; background: url(../css_img/bcArrow.gif) no-repeat right center; padding: 0 10px 0 0; font-weight: normal;} +#breadcrumb ul li span {font-weight: normal; color: #5c6267;} + +#content h1 {margin: 0 0 20px; font-size: 1.8em; border-bottom: 6px solid #bed9dd; font-family: Georgia, Times, 'Times New Roman', serif; color: #5d6167;} +#content h1 span {padding: 6px 7px 3px; border: 1px solid #eff1f2; border-bottom: 0 none; display: block;} +#content h2 {font-size: 1.4em; margin: 18px 0 10px; clear: left;} +#content h2.signin {font-size: 1.2em; color: #fff; background: #000; padding: 3px 10px; margin-bottom: 0;} +#content h3 {margin: 18px 0 10px; font-size: 1.2em;} +#content h3.links-heading {float: left;} +#content h3#pagenavbox {margin-top: 12px; padding-top: 18px; border-top: 1px solid #e1e1e1;} +#content h4 {margin: 18px 0 10px; font-size: 1.1em;} + +#content p {margin: 0 0 10px;} +#content p.summary {font-size: 1.1em; line-height: 1.5;} +#content p.date {margin: 0 0 10px; font-size: .9em; color: #666;} +#content p.faq {margin: 0 0 9px;} +#content p.page_down {margin: 0 0 10px; padding-left: 20px; background: url(../css_img/icon_download.gif) no-repeat 0 1px;} +#content p.news {margin: 0; font-size: 1.1em;} +#content p.small {font-size: .9em;} +#content p.note {margin: 0; font-size: .9em; color: #666;} +#content p.details {margin: 5px 0; padding: 0; font-size: .9em; color: #666;} +#content p.links-top {float: right; margin-top: 5px; margin-left: 18px;} + +#content table {margin: 18px 0; width: 100%;} +#content table tr {border-width: 0 1px 1px 0; border-style: solid; border-color: #fff; background: #EFF1F2;} +#content table td {border-width: 0 1px 1px 0; border-style: solid; border-color: #fff; background: #EFF1F2; padding: 5px} +#content table th {border-width: 0 1px 1px 0; border-style: solid; border-color: #fff; background: #E1E3E4; font-weight: bold; font-size: 1em; line-height: 1.5;} +#content table caption {font-size: 1.1em;} + +#content address {font-style: normal; background: url(../css_img/icon_email.gif) no-repeat 0 4px; padding: 3px 0 15px 20px;} + +#content ul li {padding: 0 0 6px;} +#content ol li {padding: 0 0 6px;} + +#content a.icon img {float: left; height: 16px; margin: 0 10px 0 0; width: 16px;} + +/* ############################################################## */ + +#column_nav {width: 214px; float: left; display: inline; padding: 0; margin: -35px 0 0 -910px; border-right: 3px solid #fff;} +body.mappage #column_nav { display: none; } + + +#column_nav .navigation {background: #fff; margin: 0 0 4px;} +#column_nav h2 {font-size: 1.2em; padding: 0; height: 29px; margin: 0; border-radius: 0 0 3px 3px; background: url(img/nav-bg-active.gif) left bottom repeat-x; border-top: 6px solid #bddadc;} +#column_nav #nav1 h2 {border-radius: 0 0 0 3px;} +#column_nav h2 a {color: #fff; padding: 3px 10px 0 26px; display: block; background: url(img/nav-arrow.gif) 8px 7px no-repeat;} +#column_nav .active h2 a {background: url(img/nav-arrow-active.gif) 8px 8px no-repeat;} +#column_nav ul {margin: 0 0 0 4px; padding: 8px 7px 4px; border-width: 0 1px 1px; border-color: #e1e1e1; border-style: solid; border-radius: 3px; list-style: none; background: #fff; background: -moz-linear-gradient(top, #ffffff 0%, #f7f9f8 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#f7f9f8)); background: -webkit-linear-gradient(top, #ffffff 0%,#f7f9f8 100%); background: -o-linear-gradient(top, #ffffff 0%,#f7f9f8 100%); background: -ms-linear-gradient(top, #ffffff 0%,#f7f9f8 100%); background: linear-gradient(top, #ffffff 0%,#f7f9f8 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f7f9f8',GradientType=0);} +#column_nav ul li {margin: 0; padding: 2px 4px; border-bottom: 1px solid #bfc0c1; color: #333; font-size: .9em;} +#column_nav ul li.lastItem {border-bottom: none;} +#column_nav ul li a:link, #column_nav ul li a:visited, #column_nav ul li a:hover, #column_nav ul li a:active {display: block; color: #333; font-weight: normal;} +#column_nav ul li a:hover, #column_nav ul li a:active {text-decoration: none; color: #0090a2;} + +/* ############################################################## */ + +#footer {clear: both; margin: 10px 0 0; padding: 15px 0 0; text-align: left;} +#footer p {border-top: 1px solid #dadadb; border-bottom: 1px solid #dadadb; margin: 0 0 5px; color: #5d6167; float: left; display: inline; height: 24px; padding: 8px 0 2px; width: 551px;} +#footer p a {color: #5d6167; font-weight: normal; padding: 0 2px;} +#footer p.assocLinks {float: right; display: inline; padding: 5px 0; width: 359px;} +#footer p.assocLinks a {float: left; display: inline; margin: 0 0 0 8px; padding: 0; background-position: center top; background-repeat: no-repeat; width: 24px; height: 24px;} +#footer p.assocLinks a:active, #footer p.assocLinks a:hover, #footer p.assocLinks a:focus {background-position: center bottom;} +#footer a#goto_browsealoud {background-image: url(img/browsealoud.gif); width: 95px; height: 25px; margin-top: 1px;} +#footer a#goto_directgov {background-image: url(img/directgov.gif); width: 90px; margin: 0 0 0 22px;} +#footer a#share_facebook {background-image: url(img/social1-facebook.gif); margin: 0 0 0 24px;} +#footer a#share_twitter {background-image: url(img/social2-twitter.gif);} +#footer a#share_youtube {background-image: url(img/social3-youtube.gif);} +#footer a#share_flickr {background-image: url(img/social4-flickr.gif);} +#footer a#share_sharethis {background-image: url(img/social5-sharethis.gif);} +#bottomBar {background: url(img/barnet-footer-logo.gif) 771px 12px no-repeat #21aaaa; display: block; width: 100%; height: 56px; border-top: 6px solid #bddadc;} + +#poweredby {margin: 0 auto; padding: 0 0 18px; display: block; width: 910px; text-align: right; color: #999;} +#poweredby a {font-weight: normal; color: #999;} + +/* +// Don't want gap that normal site has +body { + .table-cell { + .content { + margin-left: -20px; + margin-top: -120px; + } + } +} + +.container { + width: 446px; + padding-left: 232px; +} + +.wrapper { + width: 960px; +} + +// Don't want FixMyStreet logo on desktop, and we have a skip to content in +// Bromley header +#site-header { + display: none; +} + +#site-logo { + display: none; +} +#user-meta { + display: none; +} + +// Currently hiding, but do want some internal navigation somewhere at the end +.nav-wrapper { + display: none; +} + +// White background, so no shadow or margin needed. + +// Perhaps fix map location (should be in central?) +.ie6 #map_box, .ie7 #map_box { + right: -32em; +} + +.general-sidebar-notes, +#report-a-problem-sidebar { + position: static; + width: auto; + @include box-shadow(rgba(0, 0, 0, 0), 0, 0, 0); + .sidebar-tips, + .sidebar-notes { + font-size:1em; + } +} + +.ie7 .big-green-banner { + right: 0; +} + +// Pull OpenLayers navigation down a bit +#fms_pan_zoom { + top: 0.5em !important; +} + +// Fix location of aside sidebar +body.twothirdswidthpage { + .content { + aside { + @include box-shadow(none); + } + .sticky-sidebar { + aside { + position: absolute; + top: 0; + } + } + } +} +@media only screen and (min-width: 48em) and (max-width: 61em) { + body.twothirdswidthpage { + .content { + .sticky-sidebar { + top: auto; + } + } + } +} + +// So as not to interfere with the Bromley footer, make the fixed nav static. +.shadow-wrap { + position: static; + padding-top: 0; + margin-bottom: 1em; + ul#key-tools { + border-top: none; + border-bottom: 1px solid $primary; + } +} + */ diff --git a/web/cobrands/barnet/position_map.js b/web/cobrands/barnet/position_map.js new file mode 100644 index 000000000..95e6717ee --- /dev/null +++ b/web/cobrands/barnet/position_map.js @@ -0,0 +1,14 @@ +function position_map_box() { + var map_pos = 'absolute', map_height = '100%'; + if ($('html').hasClass('ie6')) { + map_pos = 'absolute'; + map_height = $(window).height(); + } + $('#map_box').prependTo('.wrapper').css({ + zIndex: 0, position: map_pos, + top: $('.wrapper').top, left: $('.wrapper').left, + right: $('.wrapper').right, bottom: $('.wrapper').bottom, + width: '100%', height: map_height, + margin: 0 + }); +} diff --git a/web/cobrands/bromley/_colours.scss b/web/cobrands/bromley/_colours.scss index c0376274e..e178c9db2 100644 --- a/web/cobrands/bromley/_colours.scss +++ b/web/cobrands/bromley/_colours.scss @@ -1,8 +1,9 @@ /* COLOURS */ -$primary: rgb(76,120,168); +$primary: rgb(91,120,147); $primary_b: #000000; $primary_text: #ffffff; -$contrast1: #00BD08; +$contrast1: rgb(91,120,147); +$contrast1_dark: darken(rgb(91,120,147), 10%); $contrast2: #AA8D11; diff --git a/web/cobrands/bromley/base.scss b/web/cobrands/bromley/base.scss index 4594f832f..9c5ff2b0f 100644 --- a/web/cobrands/bromley/base.scss +++ b/web/cobrands/bromley/base.scss @@ -5,3 +5,56 @@ @import "../fixmystreet/_base"; +a, a:visited { + color: #369; + &:hover, &:active { + color: #369; + } +} + +h1.main { + color: $primary; + text-align: center; + margin: 0.5em 0; +} + +// Want a white header, and logo is slightly bigger +#site-header { + @include background(linear-gradient(#ddd, #fff 10%, #fff)); + height: 4em; +} + +// Colour tab to match colour scheme +#nav-link { + width: 50px; + height: 48px; + background: url('/cobrands/bromley/tab-blue.png') 0 0 no-repeat; +} + +// Change logo to logo of council +#site-logo { + display: block; + width: 80px; + height: 44px; + top: 0.9em; + background: url('/cobrands/bromley/bromley-logo.s.jpg') 0 0 no-repeat; +} + +#problems-nav { + border-bottom:0.25em solid $primary; + ul li a { + text-transform: none; + &.active { + background: $primary; + color: #fff; + } + } +} + +.big-green-banner { + text-transform: none; +} + +#form_sign_in { + margin-top: 1em; +} diff --git a/web/cobrands/bromley/layout.scss b/web/cobrands/bromley/layout.scss index 3dc34c6c7..f773b47f1 100644 --- a/web/cobrands/bromley/layout.scss +++ b/web/cobrands/bromley/layout.scss @@ -1,11 +1,131 @@ @import "_colours"; @import "../fixmystreet/_layout"; -body { - background: #fff; +body { background: #9b9b9b url('http://www.bromley.gov.uk/site/styles/css_img/repeater.gif') repeat-x; } +#bromley-wrapper { background: #fff url('http://www.bromley.gov.uk/site/styles/css_img/header-corners.gif') center 110px no-repeat; margin: 1px auto 0; padding: 0 15px; width: 955px;} +.offline #bromley-wrapper { padding: 0 15px 20px; } + +// So that map appears underneath the header +.wrapper { + position: relative; +} +.ie6, .ie7 { + .wrapper { + padding-top: 1em; + } } #front-main { background: $primary; + @include border-radius(1em 1em 0 0); + margin-bottom: 1em; + padding-top: 0; + // layout sets this because base has it slightly lighter + h2 { + color: $primary_text; + } +} + +// Don't want gap that normal site has +body.frontpage { + .table-cell { + .content { + margin-top: 0; + } + } +} + +// Don't want FixMyStreet logo on desktop, and we have a skip to content in +// Bromley header +#site-header { + display: none; +} + +#user-meta { + display: none; +} + +// Currently hiding, but do want some internal navigation somewhere at the end +.nav-wrapper { + display: none; +} + +// White background, so no shadow or margin needed. +.content { + margin: 0; + @include box-shadow(none); +} +.ie6, .ie7, .ie8 { + .content { + border: none; + } +} + +// As map can scroll and isn't at the top, give it an edge +#map_box { + border: solid 1px #999; + top: 1em; + right: 0em; + margin: 0; +} + +// Perhaps fix map location (should be in central?) +.ie6 #map_box, .ie7 #map_box { + right: -32em; +} + +.general-sidebar-notes, +#report-a-problem-sidebar { + position: static; + width: auto; + @include box-shadow(rgba(0, 0, 0, 0), 0, 0, 0); + .sidebar-tips, + .sidebar-notes { + font-size:1em; + } +} + +.ie7 .big-green-banner { + right: 0; +} + +// Pull OpenLayers navigation down a bit +#fms_pan_zoom { + top: 0.5em !important; +} + +// Fix location of aside sidebar +body.twothirdswidthpage { + .content { + aside { + @include box-shadow(none); + } + .sticky-sidebar { + aside { + position: absolute; + top: 0; + } + } + } +} +@media only screen and (min-width: 48em) and (max-width: 61em) { + body.twothirdswidthpage { + .content { + .sticky-sidebar { + top: auto; + } + } + } +} + +// So as not to interfere with the Bromley footer, make the fixed nav static. +.shadow-wrap { + position: static; + padding-top: 0; + margin-bottom: 1em; + ul#key-tools { + border-top: none; + border-bottom: 1px solid $primary; + } } diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index 0db8334fb..ffbf2952f 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -128,17 +128,7 @@ $(function(){ } else { // Make map full screen on non-mobile sizes. $html.removeClass('mobile'); - var map_pos = 'fixed', map_height = '100%'; - if ($html.hasClass('ie6')) { - map_pos = 'absolute'; - map_height = $(window).height(); - } - $('#map_box').prependTo('.wrapper').css({ - zIndex: 0, position: map_pos, - top: 0, left: 0, right: 0, bottom: 0, - width: '100%', height: map_height, - margin: 0 - }); + position_map_box(); if (typeof fixmystreet !== 'undefined') { fixmystreet.state_map = 'full'; } diff --git a/web/cobrands/fixmystreet/position_map.js b/web/cobrands/fixmystreet/position_map.js new file mode 100644 index 000000000..b2aaefe8c --- /dev/null +++ b/web/cobrands/fixmystreet/position_map.js @@ -0,0 +1,13 @@ +function position_map_box() { + var map_pos = 'fixed', map_height = '100%'; + if ($('html').hasClass('ie6')) { + map_pos = 'absolute'; + map_height = $(window).height(); + } + $('#map_box').prependTo('.wrapper').css({ + zIndex: 0, position: map_pos, + top: 0, left: 0, right: 0, bottom: 0, + width: '100%', height: map_height, + margin: 0 + }); +} -- cgit v1.2.3 From f7c0d73e473cebe58a0acd0aca31e3e19c55fc0c Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Tue, 24 Apr 2012 15:51:01 +0100 Subject: ignore barnet css files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 055e181dd..b55a7046f 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ tags /web/css/main.css /web/cobrands/fixmystreet/*.css /web/cobrands/bromley/*.css +/web/cobrands/barnet/*.css /local /web/cobrands/fixmystreet/compass_app_log.txt -- cgit v1.2.3 From e30675a347a9112904f9648a127c8d2a6b91309a Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Wed, 25 Apr 2012 18:49:15 +0100 Subject: sort out around sidebar --- web/cobrands/barnet/layout.scss | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/web/cobrands/barnet/layout.scss b/web/cobrands/barnet/layout.scss index 1f43168d6..ad60890df 100644 --- a/web/cobrands/barnet/layout.scss +++ b/web/cobrands/barnet/layout.scss @@ -31,10 +31,6 @@ margin-left: 3em; } -.content { - width: auto; -} - .nav-wrapper { display: none; } @@ -59,15 +55,25 @@ margin-bottom: 0.5em; } -/* -.mappage #content .container h1 { - margin-left: 0; +.shadow-wrap { + position: static; + padding-top: 0; + margin-bottom: 1em; + ul#key-tools { + border-top: none; + border-bottom: 1px solid $primary; + } + ul#key-tools.singleton { + li a { + padding-right: 4em; + } + } } -*/ #content h1.big-green-banner { - font-size: 1em; + font-size: 1.4em; margin-left: -2em; + background: #e1e3e4 url(/cobrands/fixmystreet/images/sprite.png) right -2192px no-repeat } /* barnet styles */ @@ -147,7 +153,7 @@ body > html {font-size: 12px;} #content h3 {margin: 18px 0 10px; font-size: 1.2em;} #content h3.links-heading {float: left;} #content h3#pagenavbox {margin-top: 12px; padding-top: 18px; border-top: 1px solid #e1e1e1;} -#content h4 {margin: 18px 0 10px; font-size: 1.1em;} +/*#content h4 {margin: 18px 0 10px; font-size: 1.1em;}*/ #content p {margin: 0 0 10px;} #content p.summary {font-size: 1.1em; line-height: 1.5;} @@ -168,8 +174,10 @@ body > html {font-size: 12px;} #content address {font-style: normal; background: url(../css_img/icon_email.gif) no-repeat 0 4px; padding: 3px 0 15px 20px;} +/* #content ul li {padding: 0 0 6px;} #content ol li {padding: 0 0 6px;} +*/ #content a.icon img {float: left; height: 16px; margin: 0 10px 0 0; width: 16px;} @@ -300,13 +308,4 @@ body.twothirdswidthpage { } // So as not to interfere with the Bromley footer, make the fixed nav static. -.shadow-wrap { - position: static; - padding-top: 0; - margin-bottom: 1em; - ul#key-tools { - border-top: none; - border-bottom: 1px solid $primary; - } -} */ -- cgit v1.2.3 From cea39933bc5627afc627e6f356687b4902d6ba18 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Wed, 25 Apr 2012 19:09:30 +0100 Subject: remove unrequired barnet styles --- web/cobrands/barnet/layout.scss | 130 ---------------------------------------- 1 file changed, 130 deletions(-) diff --git a/web/cobrands/barnet/layout.scss b/web/cobrands/barnet/layout.scss index ad60890df..f997445f7 100644 --- a/web/cobrands/barnet/layout.scss +++ b/web/cobrands/barnet/layout.scss @@ -146,41 +146,6 @@ body > html {font-size: 12px;} #breadcrumb ul li a:link, #breadcrumb ul li a:visited, #breadcrumb ul li a:hover, #breadcrumb ul li a:active {color: #5c6267; background: url(../css_img/bcArrow.gif) no-repeat right center; padding: 0 10px 0 0; font-weight: normal;} #breadcrumb ul li span {font-weight: normal; color: #5c6267;} -#content h1 {margin: 0 0 20px; font-size: 1.8em; border-bottom: 6px solid #bed9dd; font-family: Georgia, Times, 'Times New Roman', serif; color: #5d6167;} -#content h1 span {padding: 6px 7px 3px; border: 1px solid #eff1f2; border-bottom: 0 none; display: block;} -#content h2 {font-size: 1.4em; margin: 18px 0 10px; clear: left;} -#content h2.signin {font-size: 1.2em; color: #fff; background: #000; padding: 3px 10px; margin-bottom: 0;} -#content h3 {margin: 18px 0 10px; font-size: 1.2em;} -#content h3.links-heading {float: left;} -#content h3#pagenavbox {margin-top: 12px; padding-top: 18px; border-top: 1px solid #e1e1e1;} -/*#content h4 {margin: 18px 0 10px; font-size: 1.1em;}*/ - -#content p {margin: 0 0 10px;} -#content p.summary {font-size: 1.1em; line-height: 1.5;} -#content p.date {margin: 0 0 10px; font-size: .9em; color: #666;} -#content p.faq {margin: 0 0 9px;} -#content p.page_down {margin: 0 0 10px; padding-left: 20px; background: url(../css_img/icon_download.gif) no-repeat 0 1px;} -#content p.news {margin: 0; font-size: 1.1em;} -#content p.small {font-size: .9em;} -#content p.note {margin: 0; font-size: .9em; color: #666;} -#content p.details {margin: 5px 0; padding: 0; font-size: .9em; color: #666;} -#content p.links-top {float: right; margin-top: 5px; margin-left: 18px;} - -#content table {margin: 18px 0; width: 100%;} -#content table tr {border-width: 0 1px 1px 0; border-style: solid; border-color: #fff; background: #EFF1F2;} -#content table td {border-width: 0 1px 1px 0; border-style: solid; border-color: #fff; background: #EFF1F2; padding: 5px} -#content table th {border-width: 0 1px 1px 0; border-style: solid; border-color: #fff; background: #E1E3E4; font-weight: bold; font-size: 1em; line-height: 1.5;} -#content table caption {font-size: 1.1em;} - -#content address {font-style: normal; background: url(../css_img/icon_email.gif) no-repeat 0 4px; padding: 3px 0 15px 20px;} - -/* -#content ul li {padding: 0 0 6px;} -#content ol li {padding: 0 0 6px;} -*/ - -#content a.icon img {float: left; height: 16px; margin: 0 10px 0 0; width: 16px;} - /* ############################################################## */ #column_nav {width: 214px; float: left; display: inline; padding: 0; margin: -35px 0 0 -910px; border-right: 3px solid #fff;} @@ -214,98 +179,3 @@ body.mappage #column_nav { display: none; } #footer a#share_flickr {background-image: url(img/social4-flickr.gif);} #footer a#share_sharethis {background-image: url(img/social5-sharethis.gif);} #bottomBar {background: url(img/barnet-footer-logo.gif) 771px 12px no-repeat #21aaaa; display: block; width: 100%; height: 56px; border-top: 6px solid #bddadc;} - -#poweredby {margin: 0 auto; padding: 0 0 18px; display: block; width: 910px; text-align: right; color: #999;} -#poweredby a {font-weight: normal; color: #999;} - -/* -// Don't want gap that normal site has -body { - .table-cell { - .content { - margin-left: -20px; - margin-top: -120px; - } - } -} - -.container { - width: 446px; - padding-left: 232px; -} - -.wrapper { - width: 960px; -} - -// Don't want FixMyStreet logo on desktop, and we have a skip to content in -// Bromley header -#site-header { - display: none; -} - -#site-logo { - display: none; -} -#user-meta { - display: none; -} - -// Currently hiding, but do want some internal navigation somewhere at the end -.nav-wrapper { - display: none; -} - -// White background, so no shadow or margin needed. - -// Perhaps fix map location (should be in central?) -.ie6 #map_box, .ie7 #map_box { - right: -32em; -} - -.general-sidebar-notes, -#report-a-problem-sidebar { - position: static; - width: auto; - @include box-shadow(rgba(0, 0, 0, 0), 0, 0, 0); - .sidebar-tips, - .sidebar-notes { - font-size:1em; - } -} - -.ie7 .big-green-banner { - right: 0; -} - -// Pull OpenLayers navigation down a bit -#fms_pan_zoom { - top: 0.5em !important; -} - -// Fix location of aside sidebar -body.twothirdswidthpage { - .content { - aside { - @include box-shadow(none); - } - .sticky-sidebar { - aside { - position: absolute; - top: 0; - } - } - } -} -@media only screen and (min-width: 48em) and (max-width: 61em) { - body.twothirdswidthpage { - .content { - .sticky-sidebar { - top: auto; - } - } - } -} - -// So as not to interfere with the Bromley footer, make the fixed nav static. - */ -- cgit v1.2.3 From 79887eeb1f6312adf8a10c62c08c5d9bbd02097a Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Mon, 30 Apr 2012 15:31:34 +0100 Subject: map display fixes for ie6 --- web/cobrands/barnet/layout.scss | 27 +++++++++++++++++++++++---- web/cobrands/barnet/position_map.js | 4 ++-- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/web/cobrands/barnet/layout.scss b/web/cobrands/barnet/layout.scss index f997445f7..b8806b2a9 100644 --- a/web/cobrands/barnet/layout.scss +++ b/web/cobrands/barnet/layout.scss @@ -86,8 +86,9 @@ padding: 0 1em; } -#site-header { - display: none; +#site-header, +#site-logo { + display: none !important; } #side-form { @@ -136,8 +137,23 @@ body > html {font-size: 12px;} #content.fullWidth {width: 678px;} #content.home {margin-top: 18px;} -.mappage #content.withWidth {margin: 0 0 0 0px; width: auto; overflow: hidden; float: left; display: inline;} -.mappage #content.fullWidth {width: 900px;} +.mappage { + #content.withWidth {margin: 0 0 0 0px; width: auto; overflow: hidden; float: left; display: inline;} + #content.fullWidth {width: 900px;} +} + +/* IE6 ignore the second #foo.bar rule so we have to fudge it another way */ +.ie6 { + .mappage { + .wrapper { + margin: 0 0 0 -232px; + overflow: hidden; + float: left; + display: inline; + width: 900px; + } + } +} #breadcrumb {font-size: .9em; color: #5c6267; padding: 6px 0; margin: 0 0 0 232px;} #breadcrumb.full {margin: 0;} @@ -149,6 +165,9 @@ body > html {font-size: 12px;} /* ############################################################## */ #column_nav {width: 214px; float: left; display: inline; padding: 0; margin: -35px 0 0 -910px; border-right: 3px solid #fff;} +.ie6 #column_nav { + margin: -590px 0 0 0px; +} body.mappage #column_nav { display: none; } diff --git a/web/cobrands/barnet/position_map.js b/web/cobrands/barnet/position_map.js index 95e6717ee..3a8d8c078 100644 --- a/web/cobrands/barnet/position_map.js +++ b/web/cobrands/barnet/position_map.js @@ -2,13 +2,13 @@ function position_map_box() { var map_pos = 'absolute', map_height = '100%'; if ($('html').hasClass('ie6')) { map_pos = 'absolute'; - map_height = $(window).height(); + map_height = $('.wrapper').height(); } $('#map_box').prependTo('.wrapper').css({ zIndex: 0, position: map_pos, top: $('.wrapper').top, left: $('.wrapper').left, right: $('.wrapper').right, bottom: $('.wrapper').bottom, - width: '100%', height: map_height, + width: '900px', height: map_height, margin: 0 }); } -- cgit v1.2.3 From b8ba95273cf08dd58dbe3d82dd179ccc42bf15bc Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Mon, 30 Apr 2012 17:33:07 +0100 Subject: remove redundant includes --- templates/web/barnet/header.html | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/templates/web/barnet/header.html b/templates/web/barnet/header.html index f8b501b70..c03dfa432 100644 --- a/templates/web/barnet/header.html +++ b/templates/web/barnet/header.html @@ -15,21 +15,6 @@ - -- cgit v1.2.3 From aa6f96db95a7f8a6a41a4bf56303cc8ae5860a6e Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Mon, 30 Apr 2012 17:33:36 +0100 Subject: put powered-by link in a sensible place --- templates/web/barnet/footer.html | 6 +++--- web/cobrands/barnet/layout.scss | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/templates/web/barnet/footer.html b/templates/web/barnet/footer.html index aa29c2495..9cb07245c 100644 --- a/templates/web/barnet/footer.html +++ b/templates/web/barnet/footer.html @@ -1,7 +1,7 @@ -
-

- Powered by +

+ Powered by

+
diff --git a/web/cobrands/barnet/layout.scss b/web/cobrands/barnet/layout.scss index b8806b2a9..da3788100 100644 --- a/web/cobrands/barnet/layout.scss +++ b/web/cobrands/barnet/layout.scss @@ -113,6 +113,10 @@ caption-side: bottom; } +#barnet-powered-by { + clear: both; +} + body {font-size: 77%; font-family: Arial, Helvetica, sans-serif; color: #3e3d44; padding: 0; margin: 0; line-height: 1.5; background: #e9e9ea;} body > html {font-size: 12px;} -- cgit v1.2.3 From ec6cfcfa2408d80385ae58f6199fdca1edebe7ea Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Mon, 30 Apr 2012 18:14:30 +0100 Subject: remove gap at the top of the map --- web/cobrands/barnet/position_map.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/cobrands/barnet/position_map.js b/web/cobrands/barnet/position_map.js index 3a8d8c078..08ad60a85 100644 --- a/web/cobrands/barnet/position_map.js +++ b/web/cobrands/barnet/position_map.js @@ -6,8 +6,8 @@ function position_map_box() { } $('#map_box').prependTo('.wrapper').css({ zIndex: 0, position: map_pos, - top: $('.wrapper').top, left: $('.wrapper').left, - right: $('.wrapper').right, bottom: $('.wrapper').bottom, + top: 0, left: $('.wrapper').left, + right: 0, bottom: $('.wrapper').bottom, width: '900px', height: map_height, margin: 0 }); -- cgit v1.2.3 From c8ad45cee4deb74b188dfe0e51bd0f2c4b1241af Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Mon, 30 Apr 2012 18:15:10 +0100 Subject: fix position of sidebar on report page --- web/cobrands/barnet/layout.scss | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/cobrands/barnet/layout.scss b/web/cobrands/barnet/layout.scss index da3788100..ec6fd1487 100644 --- a/web/cobrands/barnet/layout.scss +++ b/web/cobrands/barnet/layout.scss @@ -91,14 +91,16 @@ display: none !important; } -#side-form { - width: 30em; -} #report-a-problem-sidebar { - left: 33.5em; + left: 30em; top: 7em; } +.ie6 { + #report-a-problem-sidebar { + left: 30em; + } +} .general-sidebar-notes { left: 31.75em; -- cgit v1.2.3 From 3d3896616e41c1d08775ecbcacb30714277bb81b Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Mon, 30 Apr 2012 18:38:57 +0100 Subject: sort out position of nav on ie6 --- web/cobrands/barnet/layout.scss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/cobrands/barnet/layout.scss b/web/cobrands/barnet/layout.scss index ec6fd1487..d2eae77fd 100644 --- a/web/cobrands/barnet/layout.scss +++ b/web/cobrands/barnet/layout.scss @@ -171,9 +171,14 @@ body > html {font-size: 12px;} /* ############################################################## */ #column_nav {width: 214px; float: left; display: inline; padding: 0; margin: -35px 0 0 -910px; border-right: 3px solid #fff;} + .ie6 #column_nav { - margin: -590px 0 0 0px; + float: none; + position: absolute; + top: 85px; + margin: 0 0 0 0px; } + body.mappage #column_nav { display: none; } -- cgit v1.2.3 From c689b24b5d5b667f51ea35cd41c40935cf53f856 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Tue, 1 May 2012 10:58:56 +0100 Subject: fix frontpage display in ie6, plus a few other tweaks --- web/cobrands/barnet/layout.scss | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/web/cobrands/barnet/layout.scss b/web/cobrands/barnet/layout.scss index d2eae77fd..264b904bb 100644 --- a/web/cobrands/barnet/layout.scss +++ b/web/cobrands/barnet/layout.scss @@ -31,12 +31,44 @@ margin-left: 3em; } +body.fullwidthpage { + .content { + width: 52em; + } +} +.ie6 { + body.fullwidthpage { + #front-main { + margin-top: -4em; + } + #front-howto, + #front-recently { + width: 26em; + } + .container { + padding: 0; + } + .content { + margin-left: 0px; + width: 55em; + } + div.img { + margin-top: -3.3em; + } + } +} + .nav-wrapper { display: none; } -.mappage .content { - margin-top: 6em; +.mappage { + .content { + margin-top: 6em; + } + #breadcrumb { + margin-left: 0px; + } } .frontpage .content { @@ -103,7 +135,7 @@ } .general-sidebar-notes { - left: 31.75em; + left: 30.2em; p { margin-bottom: 0 !important; } -- cgit v1.2.3 From 2d88725407a845076497156e4764a56a09af2024 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Tue, 1 May 2012 12:25:13 +0100 Subject: remove extend from twothirdswidth as not required --- web/cobrands/fixmystreet/_layout.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/web/cobrands/fixmystreet/_layout.scss b/web/cobrands/fixmystreet/_layout.scss index 687b3dbcc..6d6ad8a78 100644 --- a/web/cobrands/fixmystreet/_layout.scss +++ b/web/cobrands/fixmystreet/_layout.scss @@ -304,7 +304,6 @@ body.fullwidthpage { } // two thirds width page, also has option for a sidebar which can be sticky or not body.twothirdswidthpage { - @extend .fullwidthpage; .content { width:40em; position: relative; -- cgit v1.2.3 From 7082deb9b308fd3410c33181947efa2bde3d8a47 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Tue, 1 May 2012 12:59:59 +0100 Subject: working breadcrumbs --- templates/web/barnet/header.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/templates/web/barnet/header.html b/templates/web/barnet/header.html index c03dfa432..6918d4408 100644 --- a/templates/web/barnet/header.html +++ b/templates/web/barnet/header.html @@ -53,8 +53,18 @@ -- cgit v1.2.3 From 15b6b1c5c21dde73be1f6936cc4fbdf37cbd370f Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Tue, 1 May 2012 14:42:27 +0100 Subject: add in FMS header --- templates/web/barnet/header.html | 3 +++ web/cobrands/barnet/layout.scss | 2 ++ 2 files changed, 5 insertions(+) diff --git a/templates/web/barnet/header.html b/templates/web/barnet/header.html index 6918d4408..661b4633d 100644 --- a/templates/web/barnet/header.html +++ b/templates/web/barnet/header.html @@ -69,6 +69,9 @@
+

+ FixMyStreet +

+
+ [% IF c.user_exists %] +

+ [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] + [% loc('sign out') %] +

+ [% END %] +
+

FixMyStreet

+
-
- [% IF c.user_exists %] -

- [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] - [% loc('sign out') %] -

- [% END %] -
-
diff --git a/web/cobrands/barnet/layout.scss b/web/cobrands/barnet/layout.scss index 6a777708f..78456b101 100644 --- a/web/cobrands/barnet/layout.scss +++ b/web/cobrands/barnet/layout.scss @@ -118,6 +118,33 @@ body.twothirdswidthpage { background: #e1e3e4 url(/cobrands/fixmystreet/images/sprite.png) right -2192px no-repeat } +body.frontpage { + #user-meta { + p { + top: 1em; + color: $primary_text; + a { + background: none; + } + } + } +} +#user-meta { + float: right; + p { + @include box-shadow(none); + color: $primary_text; + position: relative; + background: none; + a { + color: $primary_text; + background: none; + } + a:hover { + background: $primary; + } + } +} /* barnet styles */ .clear { -- cgit v1.2.3 From fe376eaf753ea63c09527a0ba12ceeadd3c9ae5b Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Wed, 2 May 2012 17:04:04 +0100 Subject: user-meta position for ie6 --- web/cobrands/barnet/layout.scss | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/web/cobrands/barnet/layout.scss b/web/cobrands/barnet/layout.scss index 78456b101..1828fe8ac 100644 --- a/web/cobrands/barnet/layout.scss +++ b/web/cobrands/barnet/layout.scss @@ -145,6 +145,27 @@ body.frontpage { } } } +.ie6 { + #user-meta { + float: none; + p { + position: absolute; + margin-top: 35px; + margin-right: 20px; + right: 0px; + left: auto; + } + + } + .mappage { + #user-meta { + p { + margin-right: -100px; + } + } + } +} + /* barnet styles */ .clear { -- cgit v1.2.3 From c6f5184225f46d95894583d100a22045abb63f82 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Wed, 2 May 2012 18:10:56 +0100 Subject: bromley -> barnet --- templates/web/barnet/footer.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/web/barnet/footer.html b/templates/web/barnet/footer.html index 9cb07245c..9114a071e 100644 --- a/templates/web/barnet/footer.html +++ b/templates/web/barnet/footer.html @@ -9,14 +9,14 @@
diff --git a/web/cobrands/barnet/img/fms-logo.png b/web/cobrands/barnet/img/fms-logo.png new file mode 100644 index 000000000..23bea6b0f Binary files /dev/null and b/web/cobrands/barnet/img/fms-logo.png differ -- cgit v1.2.3 From 902f1732363a91570d9a14871ad5894f97fb0233 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Thu, 3 May 2012 16:43:08 +0100 Subject: correct fixed tag on problem page --- perllib/FixMyStreet/Cobrand/Barnet.pm | 26 ++++++++++++++++++++++++++ web/cobrands/barnet/layout.scss | 10 ++++++++++ 2 files changed, 36 insertions(+) diff --git a/perllib/FixMyStreet/Cobrand/Barnet.pm b/perllib/FixMyStreet/Cobrand/Barnet.pm index 31b61aa62..13731a66c 100644 --- a/perllib/FixMyStreet/Cobrand/Barnet.pm +++ b/perllib/FixMyStreet/Cobrand/Barnet.pm @@ -28,5 +28,31 @@ sub disambiguate_location { }; } +sub generate_problem_banner { + my ( $self, $problem ) = @_; + + my $banner = {}; + if ( $problem->is_open && time() - $problem->lastupdate_local->epoch > 8 * 7 * 24 * 60 * 60 ) + { + $banner->{id} = 'unknown'; + $banner->{text} = _('Unknown'); + } + if ($problem->is_fixed) { + $banner->{id} = 'fixed'; + $banner->{text} = _('Fixed'); + } + if ($problem->is_closed) { + $banner->{id} = 'closed'; + $banner->{text} = _('Closed'); + } + + if ( grep { $problem->state eq $_ } ( 'investigating', 'in progress', 'planned' ) ) { + $banner->{id} = 'progress'; + $banner->{text} = _('In progress'); + } + + return $banner; +} + 1; diff --git a/web/cobrands/barnet/layout.scss b/web/cobrands/barnet/layout.scss index 749f3dfa5..fc528108a 100644 --- a/web/cobrands/barnet/layout.scss +++ b/web/cobrands/barnet/layout.scss @@ -213,3 +213,13 @@ ol.big-numbers > li::before { color: #C0E8E8; } +.banner { + p { + top: -2em; + } + p#fixed { + padding-top: 4em; + background: #00BD08; + } +} + -- cgit v1.2.3 From 36c1174b4678648ae05a56ebfaeeaf9f8aa716c4 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Thu, 3 May 2012 17:09:36 +0100 Subject: sort out file loading order to stop blocking --- templates/web/barnet/header.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/templates/web/barnet/header.html b/templates/web/barnet/header.html index 37d63a777..87e869d29 100644 --- a/templates/web/barnet/header.html +++ b/templates/web/barnet/header.html @@ -23,16 +23,15 @@ - - - - [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] - + + + [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] + -- cgit v1.2.3 From e0f2fa194580a9345060532a72f1445f0688ba3b Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Thu, 3 May 2012 17:10:29 +0100 Subject: fix incorrect paths --- templates/web/barnet/footer.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/web/barnet/footer.html b/templates/web/barnet/footer.html index 693c36d1a..7982ad530 100644 --- a/templates/web/barnet/footer.html +++ b/templates/web/barnet/footer.html @@ -9,14 +9,14 @@ - - - -
- - diff --git a/templates/web/barnet/bromley-header.html b/templates/web/barnet/bromley-header.html deleted file mode 100644 index 50b0f8fa1..000000000 --- a/templates/web/barnet/bromley-header.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] - - - - - - - [%# ie_wrapper is to prevent a horizontal scrollbar in IE7, it appears (from Bromley site) %] -
- -
- - - - - - - - -
- -
-
- - -
- [% IF c.user_exists %] -

- [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] - [% loc('sign out') %] -

- [% END %] -
- -

Reporting a problem in Bromley’s streets or parks

- -
-
- - -- cgit v1.2.3 From 7ae1d738b3983df3708b02211fef84b6b04074dd Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Thu, 17 May 2012 18:27:44 +0100 Subject: use is_council flag in std faq templates as well --- templates/web/default/faq/faq-en-gb.html | 6 +++--- templates/web/fixmystreet/faq/faq-en-gb.html | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/web/default/faq/faq-en-gb.html b/templates/web/default/faq/faq-en-gb.html index ed9d53c24..e85ffe853 100755 --- a/templates/web/default/faq/faq-en-gb.html +++ b/templates/web/default/faq/faq-en-gb.html @@ -25,11 +25,11 @@ or clearing, such as:
What isn’t FixMyStreet for?
-
FixMyStreet is not a way of getting in touch with [% c.cobrand.moniker == 'southampton' ? 'the' : 'your' %] council for all +
FixMyStreet is not a way of getting in touch with [% c.cobrand.is_council ? 'the' : 'your' %] council for all issues – please use FixMyStreet only for problems such as the above. We often route problem reports via cleansing services or highways and so using FixMyStreet for other matters may result in a delay in your report getting - to the right department. You will need to contact [% c.cobrand.moniker == 'southampton' ? 'the' : 'your' %] council + to the right department. You will need to contact [% c.cobrand.is_council ? 'the' : 'your' %] council directly for problems such as:
  • Anti-social behaviour @@ -51,7 +51,7 @@ with a map of that area. You can view problems already reported in that area, or report ones of your own simply by clicking on the map at the location of the problem.
How are the problems solved?
-
They are reported to the [% IF c.cobrand.moniker != 'southampton' %]relevant[% END %] council by email. The +
They are reported to the [% IF !c.cobrand.is_council %]relevant[% END %] council by email. The council can then resolve the problem the way they normally would. Alternatively, you can discuss the problem on the website with others[% IF c.cobrand.moniker != 'southampton' %], and then together lobby the council to fix it, or fix it directly yourselves[% END %].
diff --git a/templates/web/fixmystreet/faq/faq-en-gb.html b/templates/web/fixmystreet/faq/faq-en-gb.html index fe899d3a2..984e747fd 100755 --- a/templates/web/fixmystreet/faq/faq-en-gb.html +++ b/templates/web/fixmystreet/faq/faq-en-gb.html @@ -36,11 +36,11 @@ or clearing
, such as:
What isn’t FixMyStreet for?
-
FixMyStreet is not a way of getting in touch with [% c.cobrand.moniker == 'southampton' ? 'the' : 'your' %] council for all +
FixMyStreet is not a way of getting in touch with [% c.cobrand.is_council ? 'the' : 'your' %] council for all issues – please use FixMyStreet only for problems such as the above. We often route problem reports via cleansing services or highways and so using FixMyStreet for other matters may result in a delay in your report getting - to the right department. You will need to contact [% c.cobrand.moniker == 'southampton' ? 'the' : 'your' %] council + to the right department. You will need to contact [% c.cobrand.is_council ? 'the' : 'your' %] council directly for problems such as:
  • Anti-social behaviour @@ -62,7 +62,7 @@ with a map of that area. You can view problems already reported in that area, or report ones of your own simply by clicking on the map at the location of the problem.
How are the problems solved?
-
They are reported to the [% IF c.cobrand.moniker != 'southampton' %]relevant[% END %] council by email. The +
They are reported to the [% IF !c.cobrand.is_council %]relevant[% END %] council by email. The council can then resolve the problem the way they normally would. Alternatively, you can discuss the problem on the website with others[% IF c.cobrand.moniker != 'southampton' %], and then together lobby the council to fix it, or fix it directly yourselves[% END %].
-- cgit v1.2.3 From b50e91710b4dc37fb5f9e3ec28233d34c6413c25 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Fri, 18 May 2012 11:15:27 +0100 Subject: put in barnet example places and add barnet to disambiguation --- perllib/FixMyStreet/Cobrand/Barnet.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/perllib/FixMyStreet/Cobrand/Barnet.pm b/perllib/FixMyStreet/Cobrand/Barnet.pm index 60fdb6da6..b3876a2c6 100644 --- a/perllib/FixMyStreet/Cobrand/Barnet.pm +++ b/perllib/FixMyStreet/Cobrand/Barnet.pm @@ -22,6 +22,7 @@ sub disambiguate_location { my $self = shift; return { %{ $self->SUPER::disambiguate_location() }, + town => 'Barnet', centre => '51.612832,-0.218169', span => '0.0563,0.09', bounds => [ '51.584682,-0.263169', '51.640982,-0.173169' ], @@ -98,5 +99,9 @@ sub council_rss_alert_options { return ( \@options, @reported_to_options ? \@reported_to_options : undef ); } + +sub example_places { + return [ 'N11 1NP', 'Wood St' ]; +} 1; -- cgit v1.2.3 From 69284dad6f9b645eff9abe84b09463c0bf32fc24 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Fri, 18 May 2012 12:15:55 +0100 Subject: Work much better if reporting pin is clicked/dragged outside council boundary --- perllib/FixMyStreet/Cobrand/UKCouncils.pm | 9 ++++++- web/js/map-OpenLayers.js | 45 +++++++++++++++++++++---------- 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index b012be48e..9c2899c21 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -60,9 +60,16 @@ sub council_check { return 1; } my $url = 'http://www.fixmystreet.com/'; - $url .= 'alert' if $context eq 'alert'; + if ( $context eq 'alert' ) { + $url .= 'alert'; + } else { + $url .= 'around'; + } $url .= '?pc=' . URI::Escape::uri_escape( $self->{c}->req->param('pc') ) if $self->{c}->req->param('pc'); + $url .= '?latitude=' . URI::Escape::uri_escape( $self->{c}->req->param('latitude') ) + . '&longitude=' . URI::Escape::uri_escape( $self->{c}->req->param('longitude') ) + if $self->{c}->req->param('latitude'); my $error_msg = "That location is not covered by " . $self->council_name . ". Please visit the main FixMyStreet site."; return ( 0, $error_msg ); diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index 20c2ea720..4e728e5f8 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -7,6 +7,32 @@ function fixmystreet_update_pin(lonlat) { ); document.getElementById('fixmystreet.latitude').value = lonlat.lat || lonlat.y; document.getElementById('fixmystreet.longitude').value = lonlat.lon || lonlat.x; + + $.getJSON('/report/new/ajax', { + latitude: $('#fixmystreet\\.latitude').val(), + longitude: $('#fixmystreet\\.longitude').val() + }, function(data) { + if (data.error) { + if (!$('#side-form-error').length) { + $('
').insertAfter($('#side-form')); + } + $('#side-form-error').html('

Reporting a problem

' + data.error + '

').show(); + $('#side-form').hide(); + return; + } + $('#side-form, #site-logo').show(); + $('#councils_text').html(data.councils_text); + $('#form_category_row').html(data.category); + if ( data.extra_name_info ) { + // there might be a first name field on some cobrands + var lb = $('#form_first_name').prev() || $('#form_name').prev(); + lb.before(data.extra_name_info); + } + }); + + if (!$('#side-form-error').is(':visible')) { + $('#side-form, #site-logo').show(); + } } function fixmystreet_activate_drag() { @@ -421,7 +447,6 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, { fixmystreet.markers.addFeatures( markers ); fixmystreet_activate_drag(); } - fixmystreet_update_pin(lonlat); // check to see if markers are visible. We click the // link so that it updates the text in case they go // back @@ -429,23 +454,15 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, { fixmystreet.state_pins_were_hidden = true; $('#hide_pins_link').click(); } + + // Store pin location in form fields, and check coverage of point + fixmystreet_update_pin(lonlat); + + // Already did this first time map was clicked, so no need to do it again. if (fixmystreet.page == 'new') { return; } - $.getJSON('/report/new/ajax', { - latitude: $('#fixmystreet\\.latitude').val(), - longitude: $('#fixmystreet\\.longitude').val() - }, function(data) { - if (data.error) { - // XXX If they then click back and click somewhere in the area, this error will still show. - $('#side-form').html('

Reporting a problem

' + data.error + '

'); - return; - } - $('#councils_text').html(data.councils_text); - $('#form_category_row').html(data.category); - }); - $('#side-form, #site-logo').show(); fixmystreet.map.updateSize(); // might have done, and otherwise Firefox gets confused. /* For some reason on IOS5 if you use the jQuery show method it * doesn't display the JS validation error messages unless you do this -- cgit v1.2.3 From aa59f68fcb9b26673662033c4c2d72835420ab4a Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Fri, 18 May 2012 12:38:33 +0100 Subject: do not zoom out too far onby default on around page on mobile as it gets very cluttered --- web/js/map-OpenLayers.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index 4e728e5f8..35020e1f7 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -82,7 +82,11 @@ function fixmystreet_onload() { var bounds = area.getDataExtent(); if (bounds) { var center = bounds.getCenterLonLat(); - fixmystreet.map.setCenter(center, fixmystreet.map.getZoomForExtent(bounds), false, true); + var z = fixmystreet.map.getZoomForExtent(bounds); + if ( z < 13 && $('html').hasClass('mobile') ) { + z = 13; + } + fixmystreet.map.setCenter(center, z, false, true); } }); } @@ -177,7 +181,14 @@ function fixmystreet_onload() { if ( fixmystreet.zoomToBounds ) { var bounds = fixmystreet.markers.getDataExtent(); - if (bounds) { fixmystreet.map.zoomToExtent( bounds ); } + if (bounds) { + var center = bounds.getCenterLonLat(); + var z = fixmystreet.map.getZoomForExtent(bounds); + if ( z < 13 && $('html').hasClass('mobile') ) { + z = 13; + } + fixmystreet.map.setCenter(center, z); + } } $('#hide_pins_link').click(function(e) { -- cgit v1.2.3