aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/make_css3
-rw-r--r--perllib/FixMyStreet/Cobrand/Stevenage.pm36
-rw-r--r--templates/web/stevenage/footer.html62
-rw-r--r--templates/web/stevenage/header.html60
-rw-r--r--web/cobrands/stevenage/_colours.scss9
-rw-r--r--web/cobrands/stevenage/base.scss7
-rw-r--r--web/cobrands/stevenage/config.rb25
-rw-r--r--web/cobrands/stevenage/layout.scss60
8 files changed, 261 insertions, 1 deletions
diff --git a/bin/make_css b/bin/make_css
index 9d033b5dc..4494c92e7 100755
--- a/bin/make_css
+++ b/bin/make_css
@@ -18,10 +18,11 @@ compass compile --output-style compressed $DIRECTORY/cobrands/fixmystreet
compass compile --output-style compressed $DIRECTORY/cobrands/bromley
compass compile --output-style compressed $DIRECTORY/cobrands/barnet
compass compile --output-style compressed $DIRECTORY/cobrands/zurich
+compass compile --output-style compressed $DIRECTORY/cobrands/stevenage
compass compile --output-style compressed $DIRECTORY/cobrands/default
# The rest are plain sass
-for scss in `find $DIRECTORY -name "*.scss" -exec dirname {} \; | uniq | grep -v "cobrands/\(fixmystreet\|bromley\|barnet\|default\|zurich\)"`
+for scss in `find $DIRECTORY -name "*.scss" -exec dirname {} \; | uniq | grep -v "cobrands/\(fixmystreet\|bromley\|barnet\|stevenage\|default\|zurich\)"`
do
sass --scss --update --style compressed $scss
done
diff --git a/perllib/FixMyStreet/Cobrand/Stevenage.pm b/perllib/FixMyStreet/Cobrand/Stevenage.pm
new file mode 100644
index 000000000..9b36a13d5
--- /dev/null
+++ b/perllib/FixMyStreet/Cobrand/Stevenage.pm
@@ -0,0 +1,36 @@
+package FixMyStreet::Cobrand::Barnet;
+use parent 'FixMyStreet::Cobrand::UKCouncils';
+
+use strict;
+use warnings;
+
+sub council_id { return 2347; }
+sub council_area { return 'Stevenage'; }
+sub council_name { return 'Stevenage Council'; }
+sub council_url { return 'stevenage'; }
+
+sub path_to_web_templates {
+ my $self = shift;
+ return [
+ FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify,
+ FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify
+ ];
+}
+
+sub disambiguate_location {
+ my $self = shift;
+ return {
+ %{ $self->SUPER::disambiguate_location() },
+ town => 'Stevenage',
+ centre => '51.904330,-0.189364',
+ span => '0.063112,0.087585',
+ bounds => [ 51.869319, -0.234382, 51.932431, -0.146796 ],
+ };
+}
+
+sub example_places {
+ return [ 'SG1 1HN', 'Lyton Way' ];
+}
+
+1;
+
diff --git a/templates/web/stevenage/footer.html b/templates/web/stevenage/footer.html
new file mode 100644
index 000000000..c45c3c536
--- /dev/null
+++ b/templates/web/stevenage/footer.html
@@ -0,0 +1,62 @@
+ [% IF pagefooter %]
+ <footer role="content-info">
+ <div class="tablewrapper bordered">
+ <div id="footer-mobileapps">
+ <h4>Mobile apps</h4>
+
+ <ul>
+ <li><a class="m-app-iphone" href="http://itunes.apple.com/gb/app/fixmystreet/id297456545">iPhone</a></li>
+ <li><a class="m-app-droid" href="https://market.android.com/details?id=com.android.fixmystreet">Android</a></li>
+ <li><a class="m-app-nokia" href="http://store.ovi.com/content/107557">Nokia</a></li>
+ </ul>
+ </div>
+
+ <div id="footer-help">
+ <ul>
+ <li>
+ <h4>[% loc('Are you a developer?') %]</h4>
+ <p>[% loc('Would you like to contribute to FixMyStreet? Our code is open source and <a href="http://github.com/mysociety/fixmystreet">available on GitHub</a>.') %]</p>
+ </li>
+ <li>
+ <h4>[% loc('Are you from a council?') %]</h4>
+ <p>[% loc('Would you like better integration with FixMyStreet? <a href="http://www.mysociety.org/for-councils/fixmystreet/">Find out about FixMyStreet for councils</a>.') %]</p>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <p><a href="/privacy">Privacy and cookies</a></p>
+ </footer>
+ [% END %]
+ </div><!-- .content role=main -->
+ </div><!-- .container -->
+ </div><!-- .table-cell -->
+
+ <div class="nav-wrapper">
+ <div class="nav-wrapper-2">
+ <div id="main-nav" role="navigation">
+ <ul id="mysoc-menu">
+ <li><a id="mysoc-logo" href="http://www.mysociety.org/">mySociety</a></li>[%
+ %]<li><a href="http://mysociety.org/donate/">Donate</a></li>[%
+ %]<li><a href="http://www.mysociety.org/projects/">Our Sites</a></li>
+ </ul>
+
+ <ul id="main-menu">
+ <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn"
+ >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/my' %]span[% ELSE %]a href="/my"[% END
+ %]>[% loc("Your reports") %]</[% c.req.uri.path == '/my' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/reports' %]span[% ELSE %]a href="/reports"[% END
+ %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END
+ %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END
+ %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+
+<!-- [% INCLUDE 'debug_footer.html' %] -->
+ </div> <!-- .wrapper -->
+</body>
+</html>
diff --git a/templates/web/stevenage/header.html b/templates/web/stevenage/header.html
new file mode 100644
index 000000000..5fd4f2c98
--- /dev/null
+++ b/templates/web/stevenage/header.html
@@ -0,0 +1,60 @@
+<!doctype html>
+<!--[if lt IE 7]><html class="no-js ie6 oldie" lang="[% lang_code %]"><![endif]-->
+<!--[if IE 7]> <html class="no-js ie7 oldie" lang="[% lang_code %]"><![endif]-->
+<!--[if IE 8]> <html class="no-js ie8 oldie" lang="[% lang_code %]"><![endif]-->
+<!--[if IE 9]> <html class="no-js ie9 oldie" lang="[% lang_code %]"><![endif]-->
+<!--[if gt IE 9]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]-->
+ <head>
+ <meta name="viewport" content="initial-scale=1.0">
+
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
+ <meta name="HandHeldFriendly" content="true">
+ <meta name="mobileoptimized" content="0">
+
+ <link rel="stylesheet" href="[% version('/cobrands/fixmystreet/base.css') %]">
+ <link rel="stylesheet" href="[% version('/cobrands/fixmystreet/layout.css') %]" media="(min-width:48em)">
+ [% extra_css %]
+ <!--[if (lt IE 9) & (!IEMobile)]>
+ <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]">
+ <![endif]-->
+
+ <script src="[% version('/js/modernizr.custom.js') %]" charset="utf-8"></script>
+ <script src="[% version('/cobrands/fixmystreet/position_map.js') %]" charset="utf-8"></script>
+ [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js', site_title = 'Stevenage: FixMyStreet' %]
+ [% extra_js %]
+
+ [% IF c.req.uri.host == 'osm.fixmystreet.com' %]
+ <link rel="canonical" href="http://www.fixmystreet.com[% c.req.uri.path_query %]">
+ [% END %]
+
+ [% INCLUDE 'tracking_code.html' %]
+
+ </head>
+ <body class="[% bodyclass | html IF bodyclass %]">
+
+ <div class="wrapper">
+ <div class="table-cell">
+ <header id="site-header" role="banner">
+ <div class="container">
+ <a href="/" id="site-logo">FixMyStreet</a>
+ <a href="#main-nav" id="nav-link">Main Navigation</a>
+ </div>
+ </header>
+
+ <div id="user-meta">
+ [% IF c.user_exists %]
+ <p>
+ [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %]
+ <a href="/auth/sign_out">[% loc('sign out') %]</a>
+ </p>
+ [% ELSE %]
+ <!-- <a href="/auth">[% loc('Sign in') %]</a> -->
+ [% END %]
+ </div>
+
+ [% pre_container_extra %]
+
+ <div class="container">
+ <div class="content[% " $mainclass" | html IF mainclass %]" role="main">
+
+ <!-- [% INCLUDE 'debug_header.html' %] -->
diff --git a/web/cobrands/stevenage/_colours.scss b/web/cobrands/stevenage/_colours.scss
new file mode 100644
index 000000000..b6ac44f0b
--- /dev/null
+++ b/web/cobrands/stevenage/_colours.scss
@@ -0,0 +1,9 @@
+/* COLOURS */
+
+$primary: #005E38;
+$primary_b: #000000;
+$primary_text: #222222;
+
+$contrast1: #6688ff;
+$contrast1_dark: darken(#6688ff, 10%);
+$contrast2: #AA8D11;
diff --git a/web/cobrands/stevenage/base.scss b/web/cobrands/stevenage/base.scss
new file mode 100644
index 000000000..4594f832f
--- /dev/null
+++ b/web/cobrands/stevenage/base.scss
@@ -0,0 +1,7 @@
+@import "../fixmystreet/_h5bp";
+@import "./_colours";
+@import "../fixmystreet/_mixins";
+@import "compass";
+
+@import "../fixmystreet/_base";
+
diff --git a/web/cobrands/stevenage/config.rb b/web/cobrands/stevenage/config.rb
new file mode 100644
index 000000000..cab97b18f
--- /dev/null
+++ b/web/cobrands/stevenage/config.rb
@@ -0,0 +1,25 @@
+# Require any additional compass plugins here.
+
+# Set this to the root of your project when deployed:
+http_path = "/"
+css_dir = ""
+sass_dir = ""
+images_dir = ""
+javascripts_dir = ""
+
+# You can select your preferred output style here (can be overridden via the command line):
+# output_style = :expanded or :nested or :compact or :compressed
+
+# To enable relative paths to assets via compass helper functions. Uncomment:
+# relative_assets = true
+
+# To disable debugging comments that display the original location of your selectors. Uncomment:
+# line_comments = false
+
+# If you prefer the indented syntax, you might want to regenerate this
+# project again passing --syntax sass, or you can uncomment this:
+# preferred_syntax = :sass
+# and then run:
+# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
+
+line_comments = false # by Compass.app
diff --git a/web/cobrands/stevenage/layout.scss b/web/cobrands/stevenage/layout.scss
new file mode 100644
index 000000000..93a3f7120
--- /dev/null
+++ b/web/cobrands/stevenage/layout.scss
@@ -0,0 +1,60 @@
+@import "_colours";
+@import "../fixmystreet/_layout";
+
+/*
+Note: The fact that the below has to override the CSS, though it is for the
+default template, is a sign that the CSS is not best organised. It needs
+refactoring, and making more maintainable through the use of SMACSS, OOCSS
+and similar.
+*/
+
+body {
+ background: #6688ff;
+}
+
+#front-main {
+ color: $primary_text;
+ background: $primary;
+ // layout sets this because base has it slightly lighter
+ h2 {
+ color: $primary_text;
+ }
+ a#geolocate_link {
+ color: $primary_text;
+ }
+}
+
+.nav-wrapper {
+ .nav-wrapper-2 {
+ border-top: 4px solid $primary;
+ @include border-image(none);
+ }
+}
+body.mappage {
+ .nav-wrapper {
+ .nav-wrapper-2 {
+ background: $contrast1;
+ }
+ }
+}
+
+#main-nav {
+ ul {
+ li {
+ a, span {
+ color: #000;
+ }
+ }
+ &#main-menu {
+ li {
+ a:hover {
+ background: $primary;
+ }
+ }
+ }
+ &#mysoc-menu {
+ background: $primary;
+ }
+ }
+}
+