diff options
Diffstat (limited to 'web/cobrands/hackney')
-rw-r--r-- | web/cobrands/hackney/_colours.scss | 51 | ||||
-rw-r--r-- | web/cobrands/hackney/assets.js | 246 | ||||
-rw-r--r-- | web/cobrands/hackney/base.scss | 222 | ||||
-rw-r--r-- | web/cobrands/hackney/hackney-search-icon.png | bin | 0 -> 464 bytes | |||
-rw-r--r-- | web/cobrands/hackney/images/hackney-logo-white.png | bin | 0 -> 18214 bytes | |||
-rw-r--r-- | web/cobrands/hackney/layout.scss | 143 |
6 files changed, 662 insertions, 0 deletions
diff --git a/web/cobrands/hackney/_colours.scss b/web/cobrands/hackney/_colours.scss new file mode 100644 index 000000000..464733a40 --- /dev/null +++ b/web/cobrands/hackney/_colours.scss @@ -0,0 +1,51 @@ +/* COLOURS */ + +$menu-image: 'menu-black'; + +// Primary +$white: #fff; +$green: #00b341; +$grey: #666664; + + +// Secondary +$yellow: #ffc845; +$blue: #0072ce; +$pale_green: #f2f7f0; +$alt_green: #328b15; +$light_green: #84bd00; +$dark_green: #00664f; +$teal :#1e98a7; +$black: #000; +$red: #be3a34; + +$primary: $green; +$primary_b: #000; +$primary_text: $black; + +$base_bg: $white; +$base_fg: $black; + +$link-color: $blue; +$link-visited_color: $dark-green; +$link-hover-color: $green; + +$nav_background_colour: $black; +$nav_colour: $white; +$nav_hover_background_colour: $black; + +$col_click_map: $green; + +$header-top-border: false; + +$montserrat: 'Montserrat', Arial, sans-serif; + +$heading-font: $montserrat; +$body-font: $montserrat; +$meta-font: $montserrat; + +$search-help-alignment: left; +$search-help-background: #fff3f3; +$search-help-header-font-size-desktop: 1.25em; +$search-help-margin: 0 -1em; +$search-help-margin-desktop: 0 -1em; diff --git a/web/cobrands/hackney/assets.js b/web/cobrands/hackney/assets.js new file mode 100644 index 000000000..9941594f0 --- /dev/null +++ b/web/cobrands/hackney/assets.js @@ -0,0 +1,246 @@ +(function(){ + +if (!fixmystreet.maps) { + return; +} + +/** These layers are from the Hackney WFS feed, for non-Alloy categories: */ +var wfs_defaults = { + http_options: { + url: "https://map.hackney.gov.uk/geoserver/wfs", + params: { + SERVICE: "WFS", + VERSION: "1.1.0", + REQUEST: "GetFeature", + SRSNAME: "urn:ogc:def:crs:EPSG::27700" + } +}, + asset_type: 'spot', + max_resolution: 2.388657133579254, + asset_id_field: 'id', + attributes: {}, + geometryName: 'geom', + srsName: "EPSG:27700", + strategy_class: OpenLayers.Strategy.FixMyStreet, + body: "Hackney Council", + asset_item: "item" +}; + + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "greenspaces:park_bin", + } + }, + asset_category: "Overflowing bin", + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "amenity:public_toilet", + } + }, + asset_category: ["Public toilets", "Toilets"], + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "parking:pay_display_machine_liberator", + } + }, + asset_category: "Pay & Display Machines", + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "recycling:estate_recycling_bin", + } + }, + asset_category: "Bin Contamination", + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "amenity:sport_facility", + } + }, + asset_category: "Sport Area", + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "greenspaces:park_bench", + } + }, + asset_category: "Park Furniture (bench)", + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "greenspaces:park_bin", + } + }, + asset_category: "Park Furniture (bin)", + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "greenspaces:park_picnic_bench", + } + }, + asset_category: "Park Furniture (picnic bench)", + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "transport:bike_hangar_scheme", + } + }, + asset_category: "Cycle Hangars", + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "greenspaces:park_bench", + } + }, + asset_category: "Benches", + attributes: {} +}); + + +/** These layers are served directly from Alloy: */ + +// View all layers with something like: +// curl https://tilma.staging.mysociety.org/resource-proxy/proxy.php\?https://hackney.assets/ | jq '.results[] | .layer.code, ( .layer.styles[] | { id, name } ) ' +var layers = [ + { + "categories": ["Street Lighting", "Lamposts"], + "item_name": "street light", + "layer_name": "Street Lights", + "styleid": "5d308d57fe2ad8046c67cdb5", + "layerid": "layers_streetLightingAssets" + }, + { + "categories": ["Illuminated Bollards", "Non-illuminated Bollards"], + "item_name": "bollard", + "layer_name": "Bollards", + "styleid": "5d308d57fe2ad8046c67cdb9", + "layerid": "layers_streetLightingAssets" + }, + { + "categories": ["Benches"], + "item_name": "bench", + "layer_name": "Bench", + "styleid": "5e8b16f0ca31500f60b3f589", + "layerid": "layers_bench_5e8b15f0ca31500f60b3f568" + }, + { + "categories": ["Potholes"], + "item_name": "road", + "layer_name": "Carriageway", + "styleid": "5d53d28bfe2ad80fc4573184", + "layerid": "layers_carriageway_5d53cc74fe2ad80c3403b77d" + }, + { + "categories": ["Road Markings / Lines"], + "item_name": "road", + "layer_name": "Markings", + "styleid": "5d308dd7fe2ad8046c67da33", + "layerid": "layers_highwayAssets" + }, + { + "categories": ["Pavement"], + "item_name": "pavement", + "layer_name": "Footways", + "styleid": "5d308dd6fe2ad8046c67da2a", + "layerid": "layers_highwayAssets" + }, + { + "categories": ["Cycle Tracks"], + "item_name": "cycle track", + "layer_name": "Cycle Tracks", + "styleid": "5d308dd6fe2ad8046c67da29", + "layerid": "layers_highwayAssets" + }, + { + "categories": ["Drains and gutters"], + "item_name": "drain", + "layer_name": "Gullies", + "styleid": "5d308dd6fe2ad8046c67da2e", + "layerid": "layers_highwayAssets" + }, + { + "categories": ["Verges"], + "item_name": "verge", + "layer_name": "Verges", + "styleid": "5d308dd7fe2ad8046c67da36", + "layerid": "layers_highwayAssets" + }, + { + "categories": ["Road Hump Fault / Damage"], + "item_name": "road hump", + "layer_name": "Traffic Calming", + "styleid": "5d308dd7fe2ad8046c67da35", + "layerid": "layers_highwayAssets" + }, + { + "categories": ["Broken or Faulty Barrier Gates"], + "item_name": "barrier gate", + "layer_name": "Gates", + "styleid": "5d308dd6fe2ad8046c67da2c", + "layerid": "layers_highwayAssets" + }, + { + "categories": ["Belisha Beacon"], + "item_name": "beacon", + "layer_name": "Belisha Beacon", + "styleid": "5d308d57fe2ad8046c67cdb6", + "layerid": "layers_streetLightingAssets" + }, + { + "categories": ["Loose or Damaged Kerb Stones"], + "item_name": "kerb", + "layer_name": "Kerbs", + "styleid": "5d308dd6fe2ad8046c67da30", + "layerid": "layers_highwayAssets" + } +]; + +var hackney_defaults = $.extend(true, {}, fixmystreet.alloyv2_defaults, { + class: OpenLayers.Layer.NCCVectorAsset, + protocol_class: OpenLayers.Protocol.AlloyV2, + http_options: { + base: "https://tilma.staging.mysociety.org/resource-proxy/proxy.php?https://hackney.assets/${layerid}/${x}/${y}/${z}/cluster?styleIds=${styleid}" + }, + non_interactive: false, + body: "Hackney Council", + attributes: { + asset_resource_id: function() { + return this.fid; + } + } +}); + +fixmystreet.alloy_add_layers(hackney_defaults, layers); + +})(); diff --git a/web/cobrands/hackney/base.scss b/web/cobrands/hackney/base.scss new file mode 100644 index 000000000..4bc3fc8b1 --- /dev/null +++ b/web/cobrands/hackney/base.scss @@ -0,0 +1,222 @@ +@import "../sass/h5bp"; +@import "./_colours"; +@import "../sass/mixins"; + +@import "../sass/base"; + + +#site-header { + box-shadow: + 0 0 0 6px $white, + 0 0 0 10px $dark-green, + 0 0 0 13px $white, + 0 0 0 16px $green, + 0 0 0 19px $white, + 0 0 0 21px $light-green; +} + +#site-logo { + background: transparent url('images/hackney-logo-white.png') 0 50% no-repeat; + background-size: 200px 36px; + width: 200px; + &:focus { + outline: 4px solid $yellow; + } +} + +.nav-menu--mysoc { + a { + color: $primary_text; + background-color: $primary; + } +} + +#front-main { + background-color: $white; + margin: 0; + padding: 1em; + text-align: inherit; + + h1 { + color: $black; + } + + #postcodeForm { + margin: 0; + padding: 0; + background: transparent; + color: inherit; + + div { + border: none; + background: transparent; + position: relative; + background: #fff; + box-shadow: 1px 1px 5px 1px rgba(104, 104, 104, 0.4); + + input#pc { + box-sizing: border-box; + padding: 10px 22px; + } + + input#sub { + width: 0; + padding-left: 50px; + overflow: hidden; + @include flex(0 0 auto); + background: $black url('hackney-search-icon.png') no-repeat 50% 50%; + background-size: 25px 25px; + color: $black; + &:hover, + &:focus { + background: $dark-green url('hackney-search-icon.png') no-repeat 50% 50%; + background-size: 25px 25px; + color: $dark_green; + } + &:focus { + outline: 4px solid $yellow; + } + } + } + } + + a#geolocate_link { + background: transparent; + display: block; + padding: 0; + margin-top: 0.5em; + font-family: inherit; + font-size: 1em; + border-radius: 0; + color: $dark_green; + + &:hover { + background: transparent; + text-decoration: underline; + } + } + + .form-hint { + color: inherit; + } +} + +.hackney-footer { + background-color: $dark_green; + color: #fff; + padding: 1em 0; +} + +.hackney-footer__logo { + background: transparent url('images/hackney-logo-white.png') 0 50% no-repeat; + background-size: 200px 36px; + width: 200px; + height: 54px; + text-indent: -999999px; + display: inline-block; + &:focus { + outline: 4px solid $yellow; + } +} + +a.platform-logo { + color: #fff; +} + +#front_stats { + background-color: $dark_green; + color: #fff; +} + +.green-btn, +.btn { + border-radius: 4px; + font-size: 1.1875em; + font-weight: 400; + line-height: 1.4375em; + vertical-align: top; + display: inline-block; + position: relative; + border: 1px solid $dark_green; + box-shadow: inset #003d2f 0 -2px 0 0; + &:hover { + background: none; + background-color: #005a30; + color: #fff !important; + } + + &:focus { + border-color:#ffdd00; + color:#0b0c0c !important; + background: none; + background-color:#ffdd00; + box-shadow: 0 2px 0#0b0c0c; + } +} + +.btn--primary, +.btn-primary, +.green-btn { + background: $dark_green; + border: 2px solid transparent; + color: #ffffff; + box-shadow: 0 2px 0 #002d18; +} + +textarea.form-control, +.dropzone, +input.form-control { + border: 2px solid #0b0c0c; + border-radius: 0; + box-shadow: none; + &:focus { + outline: 3px solid#ffdd00; + outline-offset: 0; + box-shadow: inset 0 0 0 2px; + } +} + +label, legend, .label { + font-weight: 300; +} + +.big-green-banner { + background-color: $dark_green; + text-transform: none; +} + +div.form-error, p.form-error { + color: $red; + background-color: transparent; + padding: 0; + width: 100%; + + a { + color: $red; + text-decoration: underline; + } +} + + +input.form-error, textarea.form-error, +select.form-error { + border-color: $red; + border-radius: 0 !important; +} + +.box-warning { + background-color: rgba(164, 214, 94, 0.5); +} + +.dz-clickable:hover, .dz-drag-hover { + border-color: $light-green; +} + +.dz-clickable:hover .dz-message u, .dz-drag-hover .dz-message u { + color: $green; +} + +.sso-staff-sign-in { + font-size: 0.9em; + margin: 1em 0; +} diff --git a/web/cobrands/hackney/hackney-search-icon.png b/web/cobrands/hackney/hackney-search-icon.png Binary files differnew file mode 100644 index 000000000..99305f24a --- /dev/null +++ b/web/cobrands/hackney/hackney-search-icon.png diff --git a/web/cobrands/hackney/images/hackney-logo-white.png b/web/cobrands/hackney/images/hackney-logo-white.png Binary files differnew file mode 100644 index 000000000..3a41df786 --- /dev/null +++ b/web/cobrands/hackney/images/hackney-logo-white.png diff --git a/web/cobrands/hackney/layout.scss b/web/cobrands/hackney/layout.scss new file mode 100644 index 000000000..8b6fa6278 --- /dev/null +++ b/web/cobrands/hackney/layout.scss @@ -0,0 +1,143 @@ +@import "_colours"; +@import "../sass/layout"; + +#main-nav { + display: block; // remove flex so nav touches top of parent + min-height: 0; // no vertical align, so no need for a height + margin-top: 0; // don't bother overlapping the border + height: auto; + margin-top: 0.5em; + .frontpage & { + margin-top: 1em; + } + .ie9 & { + position: static; + float: $right; + + & > * { + position: static; + -ms-transform: none; + } + } + + a { + font-weight: 600; + } +} + +.nav-menu--mysoc { + padding: 0em 0.5em; + margin-#{$left}: 0.25em; + background-color: $primary; + @include border-radius(0 0 0.375em 0.375em); + a { + background-color: transparent; + color: $primary_text; + text-transform: uppercase; + font-size: 0.6875em; + padding: 1.3em 0.7em 1em; + &:hover { + color: #fff; + background-color: transparent; + } + } +} + +body.frontpage { + #site-logo { + margin: 0.5em 0 0.5em; + width: 200px; + height: 54px; + background: transparent url('images/hackney-logo-white.png') 0 50% no-repeat; + background-size: 200px 36px; + } +} + +#site-header { + padding: 4px 0; + margin-bottom: 2em; + .mappage & { + margin-bottom: 0; + } +} + +#front-main { + background-color: $white; + padding: 50px 0; + border-bottom: 3px solid $light_green; + label { + font-size: 18px; + font-weight: 600; + } + + h1 { + font-size: 40px; + font-weight: 600; + } + + #postcodeForm { + overflow: visible; + margin: 0; + + div { + margin: 0; + } + } + + #front-main-container { + padding: 0 1em; + } +} + +ol.big-numbers>li:before { + color: $dark_green; +} + +.nav-menu--main span { + color: $light_green; + font-weight: 600; +} + +#front_stats { + border-color: $dark_green; + big { + color: $dark_green; + } +} + +.nav-menu--main a.report-a-problem-btn { + background-color: transparent; + color: white; + &:hover, + &:active, + &:focus { + background-color: transparent; + color: white; + } +} + +#front-howto h2, +#front-recently h2 { + font-weight: 600; +} + +#front_stats { + background-color: transparent; +} + +.big-green-banner { + background-color: $dark_green; +} + +.footer-powered-by { + position: relative; + top: -40px; + right: 0; + text-align: right; + +} + +a.platform-logo { + text-align: left; + +}
\ No newline at end of file |