diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet/base.scss | 24 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 40 |
2 files changed, 49 insertions, 15 deletions
diff --git a/web/cobrands/fixmystreet/base.scss b/web/cobrands/fixmystreet/base.scss index e846cfe1b..1bcfd58df 100644 --- a/web/cobrands/fixmystreet/base.scss +++ b/web/cobrands/fixmystreet/base.scss @@ -860,6 +860,13 @@ a:hover.button-left { } } } +.list-a { + @extend .issue-list-a; + a { + padding:0.5em 1em; + font-weight:bold; + } +} //display:table fixes .ie6, .ie7 { .issue-list-a { @@ -1020,8 +1027,15 @@ table.nicetable { } } - - +.promo { + @extend .full-width; + background:$contrast1; + padding:1em; + margin-bottom:1em; + a, a:hover { + color:#fff; + } +} // this is a bit of a hack to get some differentation between desk and mobile .desk-only { @@ -1034,6 +1048,12 @@ table.nicetable { visibility: hidden; } +// hide anything with this class if js is NOT working +.no-js .hidden-nojs { + display: none !important; + visibility: hidden; +} + /* Front page */ #front-main { diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index c035fe32a..a6ae9be21 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -75,23 +75,24 @@ function tabs(elem) $(function(){ + $('html').removeClass('no-js').addClass('js'); + //add mobile class if small screen if(Modernizr.mq('only screen and (max-width:48em)')) { $('html').addClass('mobile'); } else { - - // Make map full screen on non-mobile sizes. - // temp: exclude ie6 as it doesn't like the height part of this - if(!$('html').hasClass('ie6')){ - $('#map_box').prependTo('.wrapper').css({ - zIndex: 0, position: 'fixed', - top: 0, left: 0, right: 0, bottom: 0, - width: '100%', height: '100%', - margin: 0 - }).data('size', 'full'); + // Make map full screen on non-mobile sizes. + // temp: exclude ie6 as it doesn't like the height part of this + if(!$('html').hasClass('ie6')){ + $('#map_box').prependTo('.wrapper').css({ + zIndex: 0, position: 'fixed', + top: 0, left: 0, right: 0, bottom: 0, + width: '100%', height: '100%', + margin: 0 + }).data('size', 'full'); + } } - } //heightfix the desktop .content div if(Modernizr.mq('only screen and (min-width:48em)')) { if (!($('body').hasClass('frontpage'))){ @@ -99,8 +100,6 @@ $(function(){ } } - $('html').removeClass('no-js').addClass('js'); - $('#pc').focus(); $('input[type=submit]').removeAttr('disabled'); @@ -301,4 +300,19 @@ $(function(){ $('.form-focus-trigger').on('focus', function(){ $('.form-focus-hidden').fadeIn(500); }); + + /* + * Show on click - pretty generic + */ + $('.hideshow-trigger').on('click', function(e){ + e.preventDefault(); + var href = $(this).attr('href'), + //stupid IE sometimes adds the full uri into the href attr, so trim + start = href.indexOf('#'), + target = href.slice(start, href.length); + + $(target).removeClass('hidden-js'); + + $(this).hide(); + }); }); |