diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/cheshireeast/_colours.scss | 44 | ||||
-rw-r--r-- | web/cobrands/cheshireeast/assets.js | 91 | ||||
-rw-r--r-- | web/cobrands/cheshireeast/base.scss | 161 | ||||
-rw-r--r-- | web/cobrands/cheshireeast/images/cec-navbar-logo-white.png | bin | 0 -> 2490 bytes | |||
-rw-r--r-- | web/cobrands/cheshireeast/js.js | 18 | ||||
-rw-r--r-- | web/cobrands/cheshireeast/layout.scss | 80 | ||||
-rw-r--r-- | web/cobrands/fixmystreet-uk-councils/council_validation_rules.js | 1 | ||||
-rw-r--r-- | web/cobrands/sass/_base.scss | 2 | ||||
-rw-r--r-- | web/cobrands/sass/_layout.scss | 2 |
9 files changed, 397 insertions, 2 deletions
diff --git a/web/cobrands/cheshireeast/_colours.scss b/web/cobrands/cheshireeast/_colours.scss new file mode 100644 index 000000000..363214bd0 --- /dev/null +++ b/web/cobrands/cheshireeast/_colours.scss @@ -0,0 +1,44 @@ +/* COLOURS */ + +$menu-image: 'menu-white'; + +$mappage-header-height: 107px; +$container-max-width: 1170px; + +$white: #fff; +$green: #206c49; +$gold: #ffa100; + +$heading-color: #333333; + +$text_black: #0B0C0C; +$text_grey: #6F777B; + +$link-color: #2e3191; +$link-text-decoration: none; +$link-hover-color: #2e3191; +$link-hover-text-decoration: none; +$link-visited-color: #2e3191; +$link-focus-color: #2e3191; + +$col_button: #00823B; +$col_button_hover: $green; + +$primary: $white; +$primary_b: $green; +$primary_text: $text_black; + +$base_bg: $white; +$base_fg: $text_black; + +$nav_background_colour: $green; +$nav_colour: $white; +$nav_hover_background_colour: darken($green, 10%); + +$col_click_map: $green; + +$header-top-border: false; + +$heading-font: 'Open Sans', sans-serif; +$body-font: 'Open Sans', sans-serif; +$meta-font: $body-font; diff --git a/web/cobrands/cheshireeast/assets.js b/web/cobrands/cheshireeast/assets.js new file mode 100644 index 000000000..1b1c254e3 --- /dev/null +++ b/web/cobrands/cheshireeast/assets.js @@ -0,0 +1,91 @@ +(function(){ + +if (!fixmystreet.maps) { + return; +} + +var defaults = { + wfs_url: "https://tilma.mysociety.org/mapserver/cheshireeast", + max_resolution: 4.777314267158508, + min_resolution: 0.5971642833948135, + attributes: { + central_asset_id: 'central_as', + site_code: 'site_code' + }, + geometryName: 'msGeometry', + srsName: "EPSG:27700", + body: "Cheshire East Council", + strategy_class: OpenLayers.Strategy.FixMyStreet +}; + +var streetlight_select = $.extend({ + label: "${feature_id}", + labelOutlineColor: "white", + labelOutlineWidth: 3, + labelYOffset: 65, + fontSize: '15px', + fontWeight: 'bold' +}, fixmystreet.assets.style_default_select.defaultStyle); + +var streetlight_stylemap = new OpenLayers.StyleMap({ + 'default': fixmystreet.assets.style_default, + 'select': new OpenLayers.Style(streetlight_select) +}); + +var labeled_defaults = $.extend(true, {}, defaults, { + select_action: true, + stylemap: streetlight_stylemap, + asset_type: 'spot', + asset_id_field: 'central_as', + actions: { + asset_found: function(asset) { + var id = asset.attributes.feature_id || ''; + if (id !== '') { + var asset_name = this.fixmystreet.asset_item; + $('.category_meta_message').html('You have selected ' + asset_name + ' <b>' + id + '</b>'); + } else { + $('.category_meta_message').html(this.fixmystreet.asset_item_message); + } + }, + asset_not_found: function() { + $('.category_meta_message').html(this.fixmystreet.asset_item_message); + } + } +}); + +fixmystreet.assets.add(labeled_defaults, { + wfs_feature: 'StreetLights', + filter_key: 'feature_gr', + filter_value: 'LCOL', + asset_group: 'Street lights', + asset_item: 'street light', + asset_item_message: 'You can pick a <b class="asset-spot">street light</b> from the map »' +}); + +var road_defaults = $.extend(true, {}, defaults, { + stylemap: fixmystreet.assets.stylemap_invisible, + always_visible: true, + non_interactive: true +}); + +fixmystreet.assets.add(road_defaults, { + wfs_feature: 'AdoptedRoads', + usrn: { + attribute: 'site_code', + field: 'site_code' + } +}); + +fixmystreet.assets.add(road_defaults, { + wfs_feature: 'UnAdoptedRoads', + road: true, + all_categories: true, + no_asset_msg_id: '#js-not-council-road', + // The functions assume allow when found, disallow when not found, so we want the reverse + actions: { + found: fixmystreet.message_controller.road_not_found, + not_found: fixmystreet.message_controller.road_found + } +}); + +})(); diff --git a/web/cobrands/cheshireeast/base.scss b/web/cobrands/cheshireeast/base.scss new file mode 100644 index 000000000..8e771f0ad --- /dev/null +++ b/web/cobrands/cheshireeast/base.scss @@ -0,0 +1,161 @@ +@import "../sass/h5bp"; +@import "./_colours"; +@import "../sass/mixins"; +@import "../sass/base"; + +body { + line-height: 1.429em; +} + +p { + margin: 0 0 10px 0; +} + +h1, h2, h3, h4, h5, h6 { + margin: 20px 0 10px 0; + padding: 0; + font-weight: normal !important; + font-style: normal !important; + color: #333; +} +h1 { font-size: 2.218em; line-height: 40px; margin: 16px 0 20px 0; } +h2 { font-size: 1.869em; line-height: 35px; } +h3 { font-size: 1.521em; line-height: 30px; } +h4 { font-size: 1.281em; line-height: 27px; } +h5 { font-size: 1.15em; line-height: 25px; } + +ul, ol { + margin: 0 0 20px 25px; + padding: 0; +} +ul li { + list-style: disc; +} +li { + margin-bottom: 10px; + line-height: 20px; +} + +div.form-error, p.form-error { + color: $white; + background-color: #aa272f; + font-weight: bold; + letter-spacing: 0.06em; +} + +.report_meta_info, +.council_sent_info { + font-size: inherit; +} + +/* Font overrides */ + +#front-main { + text-align: left; +} + +/* Colour overrides */ + +a, +.fake-link { + &:active, &:focus { + background-color: #e8ffd3; + outline: 3px solid #ffa100; + } +} + +.content a[href], +.fake-link { + border-bottom: 1px solid #a6a7da; + &:hover { + border-bottom: 1px solid #2e3191; + transition: border-color 0.5s; + } +} + +.btn-primary, +.green-btn, +.btn--primary { + border: none; + background: $col_button; + + &:focus, + &:hover, + &:active { + background: $col_button_hover; + } +} + +.box-warning { + background-color: #ecf3ec; +} + +#front-main a#geolocate_link { + color: #2e3191; + background: transparent; + border-bottom: 1px solid #a6a7da; + padding: 0; + margin-top: 0.5em; + font-size: inherit; + &:hover { + background: transparent; + border-bottom: 1px solid #2e3191; + transition: border-color 0.5s; + } +} + +/* Front page */ +#front-main { + #postcodeForm { + div { + input#sub { + background: $green; + } + } + } +} + +/* Header/footer */ + +#site-logo { + width: 148px; + height: 67px; + padding: 1em 0; + background: url(/cobrands/cheshireeast/images/cec-navbar-logo-white.png) 0 50% no-repeat; + background-size: 148px 67px; +} + +#site-header { + border-bottom: solid 8px $gold; +} + +.ce-footer { + padding: 20px; + background-color: $green; + border-top: solid 10px $gold; + ul { + margin: 0; + } + li { + list-style: none; + margin: 0 0 15px; + } + li:last-child { + margin: 0; + } + a, a:link, a:visited, a:hover, a:active, a:focus { + border-bottom: 1px solid #cacaca; + color: #fff; + background-color: transparent; + font-weight: 700; + } + a:hover, a:active, a:focus { + border-bottom: 1px solid #fff; + } +} + +.nav-menu a { + border-bottom: 1px solid #999; + background-color: $white; + color: $link-color; +} diff --git a/web/cobrands/cheshireeast/images/cec-navbar-logo-white.png b/web/cobrands/cheshireeast/images/cec-navbar-logo-white.png Binary files differnew file mode 100644 index 000000000..3ebff87d6 --- /dev/null +++ b/web/cobrands/cheshireeast/images/cec-navbar-logo-white.png diff --git a/web/cobrands/cheshireeast/js.js b/web/cobrands/cheshireeast/js.js new file mode 100644 index 000000000..499a3903b --- /dev/null +++ b/web/cobrands/cheshireeast/js.js @@ -0,0 +1,18 @@ +(function(){ + +if (!fixmystreet.maps) { + return; +} + +var org_id = '1451'; +var body = "Cheshire East Council"; +fixmystreet.assets.add(fixmystreet.roadworks.layer_future, { + http_options: { params: { organisation_id: org_id } }, + body: body +}); +fixmystreet.assets.add(fixmystreet.roadworks.layer_planned, { + http_options: { params: { organisation_id: org_id } }, + body: body +}); + +})(); diff --git a/web/cobrands/cheshireeast/layout.scss b/web/cobrands/cheshireeast/layout.scss new file mode 100644 index 000000000..71861e13f --- /dev/null +++ b/web/cobrands/cheshireeast/layout.scss @@ -0,0 +1,80 @@ +@import "_colours"; + +@import "../sass/layout"; + +body { + background-image: linear-gradient(to bottom, $white, #f3f3f3); +} +footer { + margin-top: 0; // So no sign of above gradient at bottom above footer +} + +#site-header + .container { + background-color: $white; +} + +body.frontpage .content { + margin: 0 -1em; +} + +#front-main { + background-color: transparent; + padding: 0; +} +#front-main-container { + background-color: $white; + padding: 1em; +} +#front-main #postcodeForm div { + margin: 0; + width: 30em; +} +#front-main a#geolocate_link { + color: #2e3191; + &:hover { + text-decoration: none; + } +} + +.ce-footer { + ul { + display: flex; + justify-content: space-between; + } + li { + margin: 0; + } +} + +body.mappage { + #site-header { + box-sizing: border-box; // count padding as part of height, so border-bottom is visible + } + + .ce-footer { + display: none; + } +} + +.general-notes { + font-size: inherit; +} + +/*body.twothirdswidthpage .content .sticky-sidebar aside { + top: 10em; +} +*/ + +/* +#site-logo { + width: 208px; + height: 80px; + padding: 24px 0; + background-position: 8px 50%; + background-size: 200px 80px; +} +*/ + +#front_stats big { + color: $green; +} diff --git a/web/cobrands/fixmystreet-uk-councils/council_validation_rules.js b/web/cobrands/fixmystreet-uk-councils/council_validation_rules.js index 3f350a82f..3498c9a68 100644 --- a/web/cobrands/fixmystreet-uk-councils/council_validation_rules.js +++ b/web/cobrands/fixmystreet-uk-councils/council_validation_rules.js @@ -21,6 +21,7 @@ body_validation_rules = { } }, 'Buckinghamshire County Council': confirm_validation_rules, + 'Cheshire East Council': confirm_validation_rules, 'Hounslow Borough Council': confirm_validation_rules, 'Lincolnshire County Council': confirm_validation_rules, 'Northamptonshire County Council': { diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss index 4a0f0b168..624293d81 100644 --- a/web/cobrands/sass/_base.scss +++ b/web/cobrands/sass/_base.scss @@ -2465,7 +2465,7 @@ a#geolocate_link.loading, .btn--geolocate.loading { padding-#{$left}: 24px; // Close up space between this and #rss_local - margin-top: -1em; + margin-top: -0.5em; } .confirmation-header { diff --git a/web/cobrands/sass/_layout.scss b/web/cobrands/sass/_layout.scss index aafb6656a..2d3592e77 100644 --- a/web/cobrands/sass/_layout.scss +++ b/web/cobrands/sass/_layout.scss @@ -814,7 +814,7 @@ textarea.form-error { // More general notes .general-notes { - font-size: 0.75em; + font-size: 0.9em; } // Frontpage |