diff options
-rw-r--r-- | perllib/FixMyStreet/TestMech.pm | 2 | ||||
-rw-r--r-- | templates/web/base/report/_item.html | 2 | ||||
-rw-r--r-- | templates/web/fixmystreet-uk-councils/report/_item-with-pin.html | 6 | ||||
-rw-r--r-- | templates/web/greenwich/reports/_list-entry.html | 5 | ||||
-rw-r--r-- | templates/web/oxfordshire/reports/_list-entry.html | 5 | ||||
-rw-r--r-- | templates/web/zerotb/report/_item.html | 2 | ||||
-rw-r--r-- | templates/web/zurich/report/_item.html | 4 | ||||
-rw-r--r-- | web/cobrands/angus/layout.scss | 3 | ||||
-rw-r--r-- | web/cobrands/fixamingata/layout.scss | 3 | ||||
-rw-r--r-- | web/cobrands/fixmystreet.com/layout.scss | 3 | ||||
-rw-r--r-- | web/cobrands/sass/_base.scss | 17 | ||||
-rw-r--r-- | web/js/fixmystreet.js | 12 |
12 files changed, 34 insertions, 30 deletions
diff --git a/perllib/FixMyStreet/TestMech.pm b/perllib/FixMyStreet/TestMech.pm index f3ee7787b..2ad820d1f 100644 --- a/perllib/FixMyStreet/TestMech.pm +++ b/perllib/FixMyStreet/TestMech.pm @@ -423,7 +423,7 @@ sub extract_problem_list { my $mech = shift; my $result = scraper { - process 'ul.item-list--reports li a h4', 'problems[]', 'TEXT'; + process 'ul.item-list--reports li a h3', 'problems[]', 'TEXT'; }->scrape( $mech->response ); return $result->{ problems } || []; diff --git a/templates/web/base/report/_item.html b/templates/web/base/report/_item.html index 6ae43f798..704dfd29c 100644 --- a/templates/web/base/report/_item.html +++ b/templates/web/base/report/_item.html @@ -3,7 +3,7 @@ [% IF problem.photo %] <img class="img" height="60" width="90" src="[% problem.photos.first.url_fp %]" alt=""> [% END %] - <h4>[% problem.title | html %]</h4> + <h3 class="item-list__heading">[% problem.title | html %]</h3> <small> [%- IF c.cobrand.moniker != 'fixamingata' %] [%# Default: %] [%- prettify_dt( problem.confirmed, 1 ) %] diff --git a/templates/web/fixmystreet-uk-councils/report/_item-with-pin.html b/templates/web/fixmystreet-uk-councils/report/_item-with-pin.html deleted file mode 100644 index b36dac3b6..000000000 --- a/templates/web/fixmystreet-uk-councils/report/_item-with-pin.html +++ /dev/null @@ -1,6 +0,0 @@ -<li class="item-list__item item-list__item--with-pin [% c.cobrand.pin_colour(problem) %]"> - <a href="[% c.uri_for('/report', problem.id ) %]" class="[% problem.category %]"> - <h3>[% problem.title | html %]</h3> - <p>Reported [%- prettify_dt( problem.confirmed, 1 ) %]</p> - </a> -</li> diff --git a/templates/web/greenwich/reports/_list-entry.html b/templates/web/greenwich/reports/_list-entry.html index b24ef2260..43d3d6265 100644 --- a/templates/web/greenwich/reports/_list-entry.html +++ b/templates/web/greenwich/reports/_list-entry.html @@ -1 +1,4 @@ -[% INCLUDE 'report/_item-with-pin.html' %] +[% INCLUDE 'report/_item.html' + no_fixed = 1 + item_extra_class = 'item-list__item--with-pin ' _ c.cobrand.pin_colour(problem) +%] diff --git a/templates/web/oxfordshire/reports/_list-entry.html b/templates/web/oxfordshire/reports/_list-entry.html index b24ef2260..43d3d6265 100644 --- a/templates/web/oxfordshire/reports/_list-entry.html +++ b/templates/web/oxfordshire/reports/_list-entry.html @@ -1 +1,4 @@ -[% INCLUDE 'report/_item-with-pin.html' %] +[% INCLUDE 'report/_item.html' + no_fixed = 1 + item_extra_class = 'item-list__item--with-pin ' _ c.cobrand.pin_colour(problem) +%] diff --git a/templates/web/zerotb/report/_item.html b/templates/web/zerotb/report/_item.html index e12c9e1fa..8562fe607 100644 --- a/templates/web/zerotb/report/_item.html +++ b/templates/web/zerotb/report/_item.html @@ -1,5 +1,5 @@ <li class="item-list__item item-list--reports__item"> <a href="[% c.uri_for('/report', problem.id ) %]"> - <h4>[% problem.title | html %]</h4> + <h3 class="item-list__heading">[% problem.title | html %]</h3> </a> </li> diff --git a/templates/web/zurich/report/_item.html b/templates/web/zurich/report/_item.html index a4d274a8e..560cbac51 100644 --- a/templates/web/zurich/report/_item.html +++ b/templates/web/zurich/report/_item.html @@ -4,9 +4,9 @@ <img class="img" height="60" width="90" src="[% problem.photos.first.url_fp %]" alt=""> [% END %] [% IF problem.state != 'unconfirmed' %] - <h4>[% problem.title | html %]</h4> + <h3 class="item-list__heading">[% problem.title | html %]</h3> [% ELSE %] - <h4><em>[% loc('Awaiting moderation') %]</em></h4> + <h3 class="item-list__heading"><em>[% loc('Awaiting moderation') %]</em></h3> [% END %] <small>[% prettify_dt( problem.created, 'zurich' ) %] [%- IF dist %], [% dist %]km[% END %] diff --git a/web/cobrands/angus/layout.scss b/web/cobrands/angus/layout.scss index f83583c64..cb358679d 100644 --- a/web/cobrands/angus/layout.scss +++ b/web/cobrands/angus/layout.scss @@ -1,7 +1,6 @@ @import "_colours"; @import "_fonts"; @import "../sass/layout"; -@import "../sass/report_list_pins"; $max_page_width: 1200px; @@ -460,4 +459,4 @@ body.mappage { .big-green-banner { display: block; -}
\ No newline at end of file +} diff --git a/web/cobrands/fixamingata/layout.scss b/web/cobrands/fixamingata/layout.scss index e8cbdab5e..442874360 100644 --- a/web/cobrands/fixamingata/layout.scss +++ b/web/cobrands/fixamingata/layout.scss @@ -61,7 +61,8 @@ noindex:-o-prefocus, #site-header { font-family: sans-serif; } -h3, h4 { +h3, h4, +.item-list__heading { font-weight: bold; } diff --git a/web/cobrands/fixmystreet.com/layout.scss b/web/cobrands/fixmystreet.com/layout.scss index 81c3b3d54..14eccfd1e 100644 --- a/web/cobrands/fixmystreet.com/layout.scss +++ b/web/cobrands/fixmystreet.com/layout.scss @@ -59,7 +59,8 @@ noindex:-o-prefocus, #site-header { font-family: sans-serif; } -h3, h4 { +h3, h4, +.item-list__heading { font-weight: bold; } diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss index e03bec486..59af6a71f 100644 --- a/web/cobrands/sass/_base.scss +++ b/web/cobrands/sass/_base.scss @@ -903,7 +903,7 @@ input.final-submit { margin-bottom: 0.5em; } -.item-list__item--link { +%item-list__item--link { padding: 0; a { color: #222222; @@ -917,11 +917,11 @@ input.final-submit { } .item-list--wards__item { - @extend .item-list__item--link; + @extend %item-list__item--link; } .item-list--reports__item { - @extend .item-list__item--link; + @extend %item-list__item--link; a { @include clearfix; padding: flip(0 0 0 1em, 0 1em 0 0); @@ -932,16 +932,19 @@ input.final-submit { height: auto; margin-#{$left}: 1em; } - h4 { - padding-top: 0.25em; - margin: 0; - } small { color: #666; display: block; padding: 0.25em 0; } } +.item-list__heading { + font-size: 1em; + font-weight: normal; + line-height: 1.5; + padding-top: 0.25em; + margin: 0; +} .item-list__item--empty p { margin: 0; diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js index 312a3e294..07c1a1a6b 100644 --- a/web/js/fixmystreet.js +++ b/web/js/fixmystreet.js @@ -136,12 +136,12 @@ $(function(){ // Geolocation if (geo_position_js.init()) { - var link = '<a href="#LINK" id="geolocate_link">… ' + translation_strings.geolocate + '</a>'; - $('form[action="/alert/list"]').append(link.replace('LINK','alert/list')); + var link = '<a href="LINK" id="geolocate_link">… ' + translation_strings.geolocate + '</a>'; + $('form[action="/alert/list"]').append(link.replace('LINK','/alert/list')); if ($('body.frontpage').length) { - $('#postcodeForm').after(link.replace('LINK','around')); + $('#postcodeForm').after(link.replace('LINK','/around')); } else{ - $('#postcodeForm').append(link.replace('LINK','around')); + $('#postcodeForm').append(link.replace('LINK','/around')); } $('#geolocate_link').click(function(e) { var $link = $(this); @@ -157,8 +157,8 @@ $(function(){ $link.find('img').remove(); var latitude = pos.coords.latitude; var longitude = pos.coords.longitude; - var page = $link.attr('href').substr(1); - location.href = '/' + page + '?latitude=' + latitude + ';longitude=' + longitude; + var page = $link.attr('href'); + location.href = page + '?latitude=' + latitude + ';longitude=' + longitude; }, function(err) { $link.find('img').remove(); if (err.code == 1) { // User said no |