diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-06-04 17:16:04 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-06-04 17:16:04 +0100 |
commit | 266abeeeb3b7240892339ef9d77133acd59c0d5e (patch) | |
tree | a8746c7c8533c171272b5bed23f798b2193bc314 | |
parent | 4379bb9ab94a4dafa91c7be61ebfb01e78cf6b8e (diff) |
Update EHA front page.
-rw-r--r-- | templates/web/default/index-steps.html | 2 | ||||
-rw-r--r-- | templates/web/default/index.html | 6 | ||||
-rw-r--r-- | templates/web/emptyhomes/front/stats.html | 1 | ||||
-rw-r--r-- | templates/web/emptyhomes/index.html | 58 | ||||
-rw-r--r-- | web/cobrands/emptyhomes/app.png | bin | 0 -> 32982 bytes | |||
-rw-r--r-- | web/cobrands/emptyhomes/css.css | 74 | ||||
-rw-r--r-- | web/cobrands/emptyhomes/street-r.jpeg | bin | 0 -> 109683 bytes |
7 files changed, 134 insertions, 7 deletions
diff --git a/templates/web/default/index-steps.html b/templates/web/default/index-steps.html index 6fae921b7..431791c20 100644 --- a/templates/web/default/index-steps.html +++ b/templates/web/default/index-steps.html @@ -33,8 +33,10 @@ [% END %] </ol> +[% IF c.cobrand.moniker != 'emptyhomes' %] <section class="full-width"> [% INCLUDE "front/stats.html" %] [% TRY %][% INCLUDE "front/tips.html" %][% CATCH file %][% END %] </section> +[% END %] diff --git a/templates/web/default/index.html b/templates/web/default/index.html index b42cb7d60..37bdd8c1e 100644 --- a/templates/web/default/index.html +++ b/templates/web/default/index.html @@ -5,22 +5,16 @@ [% END %] <p id="expl"> - [% IF c.cobrand.moniker == 'emptyhomes' %] - <strong>[% loc('Report Empty Homes') %]</strong> - [% ELSE %] [% subhead = c.cobrand.moniker == 'southampton' ? '' : loc('(like graffiti, fly tipping, broken paving slabs, or street lighting)'); %] - <strong>[% loc('Report, view, or discuss local problems') %]</strong> - [% IF subhead != ' ' %] <small>[% subhead %]</small> [% END %] - [% END %] </p> [% TRY %][% INCLUDE 'front/news.html' %][% CATCH file %][% END %] diff --git a/templates/web/emptyhomes/front/stats.html b/templates/web/emptyhomes/front/stats.html index f6aacf859..0dc03336f 100644 --- a/templates/web/emptyhomes/front/stats.html +++ b/templates/web/emptyhomes/front/stats.html @@ -4,4 +4,5 @@ <div id="front_stats"> <div>[% tprintf( loc("<big>%s</big> reports"), stats ) | comma %]</div> <div><a href="/local/">[% loc('Find latest local and national news') %]</a></div> + <div id="eha-app-link"><a href="https://itunes.apple.com/gb/app/empty-homes-spotter/id482550587?mt=8">Get the Empty Homes Spotter App for iPhone</a></div> </div> diff --git a/templates/web/emptyhomes/index.html b/templates/web/emptyhomes/index.html new file mode 100644 index 000000000..9aff01ab3 --- /dev/null +++ b/templates/web/emptyhomes/index.html @@ -0,0 +1,58 @@ +[% INCLUDE 'header.html', title = '' %] + +<div class="grid-50"> + <h1 class="bl"> + <small>[% loc('Report, view, or discuss local problems') %]</small> + </h1> + + [% IF error %] + <p class="error">[% error %]</p> + [% END %] + + [% PROCESS 'around/postcode_form.html' %] + + <div class="grid-50"> + [% INCLUDE 'front/stats.html' %] + </div> + +[% + recent_photos = c.cobrand.recent_photos('front', 3); + probs = c.cobrand.recent(); +%] +[% IF probs.size || recent_photos.size %] + <div class="grid-50"> + <h2 class="bl"><small>[% loc('Recently reported problems') %]</small></h2> + [% IF recent_photos.size %] + <p id="front_photos"> + [% FOREACH p IN recent_photos; + photo = p.get_photo_params; + %] + <a href="/report/[% p.id %]"><img border="0" height="100" + src="[% photo.url_tn %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a> + [% END %] + </p> + [% END %] + + [% IF probs.size %] + <ul id="nearby_lists"> + [% FOREACH p IN probs %] + <li> + <a href="/report/[% p.id %]">[% p.title | html %]</a> + <small>[% prettify_dt( p.confirmed, 1 ) %]</small> + </li> + [% END %] + </ul> + [% END %] + </div> +[% END %] + +</div> + +<div class="grid-50"> + <div id="eha_steps"> + [% INCLUDE 'index-steps.html', + question = c.cobrand.enter_postcode_text %] + </div> +</div> + +[% INCLUDE 'footer.html' %] diff --git a/web/cobrands/emptyhomes/app.png b/web/cobrands/emptyhomes/app.png Binary files differnew file mode 100644 index 000000000..8f422b08d --- /dev/null +++ b/web/cobrands/emptyhomes/app.png diff --git a/web/cobrands/emptyhomes/css.css b/web/cobrands/emptyhomes/css.css index 9c8c1c32d..829986f59 100644 --- a/web/cobrands/emptyhomes/css.css +++ b/web/cobrands/emptyhomes/css.css @@ -199,17 +199,38 @@ a:hover, a:active { background-color: inherit; } +#mysociety #front_stats { + display: block; +} #mysociety #front_stats div { vertical-align: middle; background-color: #fe6500; color: #000000; padding: 0.5em; - width: 7em; + width: auto; + display: block; + margin-bottom: 0.5em; } #mysociety #front_stats div a { color: #000000; background-color: inherit; } +#mysociety #front_stats div big { + display: inline; +} + +#mysociety #front_stats div#eha-app-link { + padding-top: 16px; + padding-left: 120px; + color: #fe6500; + background-color: #fff; + background-image: url("/cobrands/emptyhomes/app.png"); + background-repeat: no-repeat; +} +#mysociety #front_stats div#eha-app-link a { + color: #fe6500; + background-color: #000; +} #mysociety #problem_form { clear: both; @@ -244,3 +265,54 @@ a:hover, a:active { .channel4 > li:first-child + li { margin-bottom: 1em; } + +/* Front page how to report big */ + +#eha_steps { + background-image: url("/cobrands/emptyhomes/street-r.jpeg"); + background-repeat: no-repeat; + padding: 0.5em 2% 0.5em 8%; +} +#eha_steps h2 { + color: #000; + background-color: #fe6500; + margin-top: 0; + margin-bottom: 0.4em; +} +#eha_steps ol { + list-style-position: inside; + padding: 0 0 0 40%; + margin: 0; +} +#eha_steps li { + color: #fff; + background-color: #000; + padding: 0.25em; + margin-bottom: 0.5em; +} + +.bl { + color: #fff; + background-color: #000; +} + +/* Noddy half grid */ + +.grid-50 { + float: right; + width: 48%; + margin-right: 2%; +} +.grid-50:first-child { + margin-right: 0; +} +.grid-50 > h2:first-child { + margin-top: 0; +} +@media all and (max-width: 50em) { + #mysociety .grid-50 { + float: none; + width: auto; + } +} + diff --git a/web/cobrands/emptyhomes/street-r.jpeg b/web/cobrands/emptyhomes/street-r.jpeg Binary files differnew file mode 100644 index 000000000..722738de8 --- /dev/null +++ b/web/cobrands/emptyhomes/street-r.jpeg |