14 |
--------------------------------------------------------------------------------
/js/plugins.js:
--------------------------------------------------------------------------------
1 | // Avoid `console` errors in browsers that lack a console.
2 | (function() {
3 | var method;
4 | var noop = function noop() {};
5 | var methods = [
6 | 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
7 | 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
8 | 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
9 | 'timeStamp', 'trace', 'warn'
10 | ];
11 | var length = methods.length;
12 | var console = (window.console = window.console || {});
13 |
14 | while (length--) {
15 | method = methods[length];
16 |
17 | // Only stub undefined methods.
18 | if (!console[method]) {
19 | console[method] = noop;
20 | }
21 | }
22 | }());
23 |
24 | // Place any jQuery/helper plugins in here.
25 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2012 Code for Africa
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/_includes/modules/center-search.html:
--------------------------------------------------------------------------------
1 |
Find out if you are sharing an ID number with someone else
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | If you find a match here, you should visit the nearest IEBC office.
21 |
22 |
23 |
Embed this tool
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | 
3 |
4 | ### _Enabling citizens to get to the ballot box informed and ready._
5 |
6 | GotToVote started off as a simple experiment to make data otherwise locked in government, useful to the general public.
7 |
8 | When the Independent Electoral & Boundaries Commission released voter registration centres locations information in the 2013 Kenyan Elections, they made it available as a PDF on their otherwise always unavailable website. The Code4Kenya fellows then set out in 24hrs to create an experiment that was so simple and direct with this PDF that it went viral without any marketing campaign.
9 |
10 | The PDF was scraped and made available in the form of a website with three drops downs. This allowed a citizen to drill down very easily according to administrative boundaries and decide which is the nearest voter registration centre.
11 |
12 | This unprecedented ease of finding your registration centre spurred adoption of GotToVote's simple code in Zimbabwe, Ghana and Malawi. Code4Africa continues to this day in ensuring citizens get to the ballot box prepared by adding more arsenal of what GotToVote can offer and has grown to include Peace Messaging, Polling Results and Voter Registration Confirmation (VRC).
13 |
14 | Please check out our much prettier presentation of GotToVote here: https://gottovote.cc/\
15 |
16 | ### GotToVote RCI
17 |
18 | The GotToVote Registration Centres Information (R.C.I.) module. This easily redeploy-able website gives citizens the opportunity to easily drill-down for their nearest polling/registration centre. Built on Jekyll with data on Fusion Tables. Deployable using Github Pages. Accessible at https://kenya.gottovote.cc/
19 |
20 |
21 | ### Installation
22 |
23 | We're are still working on them but you can find the shell of unloved installation docs [here](http://gottovote.cc/docs).
24 |
25 | ---
26 |
27 | ### License
28 |
29 | View [MIT License](./LICENSE)
30 |
31 | Copyright (c) 2012 Code for Africa
32 |
--------------------------------------------------------------------------------
/js/gottovote-rci.js:
--------------------------------------------------------------------------------
1 | ---
2 | ---
3 | /*
4 | * GotToVote RCI .js
5 | * -----------------
6 | * GotToVote's registration centres information javascript file to fetch information from fusion tables and require no
7 | * backend server.
8 | *
9 | * Requirements
10 | * ------------
11 | * Requires the following things to run:
12 | * - jQuery 1.11.3
13 | *
14 | * AUTHORS
15 | * -------
16 | * David Lemayian
17 | *
18 | * LICENSE
19 | * -------
20 | * GNU General Public License v3.0 (http://choosealicense.com/licenses/gpl-3.0/)
21 | * The GPL (V2 or V3) is a copyleft license that requires anyone who distributes your code or a derivative work to make
22 | * the source available under the same terms. V3 is similar to V2, but further restricts use in hardware that forbids
23 | * software alterations. Linux, Git, and WordPress use GPL.
24 | *
25 | * Contribution
26 | * ------------
27 | * Would you like to contribute to this file? Just follow Google's JS style guide:
28 | * https://google.github.io/styleguide/javascriptguide.xml
29 | *
30 | */
31 | ;
32 |
33 | if (typeof gtv !== "object") {
34 | var gtv = {};
35 | }
36 |
37 | gtv.rci = {
38 | API_KEY: "{{ site.api_key }}",
39 | TABLE_ID: "{{ site.table_id }}",
40 |
41 | FT_SQL_URL: "https://www.googleapis.com/fusiontables/v2/query?sql=",
42 |
43 | config: {},
44 | columns: {
45 | data: {}
46 | },
47 | rows: {
48 | data: {}
49 | }
50 | };
51 |
52 | (function ($) {
53 |
54 | gtv.rci.columns.set = function (columns) {
55 | return this.data = columns;
56 | };
57 |
58 | gtv.rci.columns.get = function (index) {
59 | if (typeof this.data.items === "undefined") {
60 | return this.fetch();
61 | } else {
62 | return this.data.items[index];
63 | }
64 | };
65 |
66 | gtv.rci.columns.fetch = function (index) {
67 | $.ajax({
68 | url: "https://www.googleapis.com/fusiontables/v2/tables/" + gtv.rci.TABLE_ID + "/columns",
69 | data: {key: gtv.rci.API_KEY},
70 | }).done(function (msg) {
71 | gtv.rci.columns.set(msg);
72 | if (typeof index === "number") {
73 | return gtv.rci.columns.data.items[index];
74 | } else {
75 | return gtv.rci.columns.data;
76 | }
77 | });
78 | };
79 |
80 | console.log(gtv.rci.columns.get(0));
81 |
82 | console.log(gtv.rci);
83 |
84 | })(jQuery);
85 |
86 |
87 |
--------------------------------------------------------------------------------
/_layouts/default.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{ site.title }}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
37 |
38 |
39 | {{ content }}
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | {% if page.custom_js %}
50 | {% for js_file in page.custom_js %}
51 |
52 | {% endfor %}
53 | {% endif %}
54 |
55 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: home
3 | title: "Find Your Registration Centre"
4 | home: active
5 | body_class: home
6 | ---
7 |
8 |
Voter registration is the process of entering details of qualified persons including their National Identity Card or Passport numbers in a register or list of voters.
52 |
53 |
Who qualifies to register as a voter?
54 |
In order to qualify as a voter, one must:
55 |
56 |
Be a citizen of {{ site.country }}
57 |
Be 18 years old and above
58 |
59 |
60 |
61 |
62 |
Why register as a voter?
63 |
Registering as a voter will give you the opportunity to elect leaders for your country at the national and county levels. You can only participate in elections if you are a registered voter. It is your right and duty as a responsible citizen to elect your leaders.
64 |
65 |
Where can you register as a voter?
66 |
You can register as a voter at any designated voter registration centres within the electoral area where you wish to vote.
Sorry, but the page you were trying to view does not exist.
146 |
It looks like this was the result of either:
147 |
148 |
a mistyped address
149 |
an out-of-date link
150 |
151 |
154 |
155 |
156 |
157 |
158 |
--------------------------------------------------------------------------------
/about.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: "About"
4 | about: active
5 | ---
6 |
7 | > Exercising one's democratic right in an election means that every vote must count. But without a voter’s card, you cannot exercise this right. These simple and cheap tools make it easier for eligible Kenyan citizens to register with the Independent Electoral and Boundaries Commission.
8 | >
9 |
10 |
GotToVote! {{ site.country }} is designed to help citizens find their nearest voter registration centre, so that they can ensure they are eligible to vote in the {{ site.election_year }} general election.
11 |
12 | This website, which is optimised for easy mobile access, explains who is eligible to register and gives an overview of the voter registration process. It also tells users what documentation to take with them to register, and helps users easily find their nearest voter registration center.
13 |
14 | This information is available elsewhere, but only as difficult-to-access PDF and MS Word or Excel documents that citizens are forced to download from a confusing variety of different ministry or other official websites.
15 |
16 | GotToVote! {{ site.country }} takes the pain out of finding the information, by bringing it all together in one place and by presenting it in a standardised format that is easily searchable and readable.
17 |
18 | Future versions of the site will introduce SMS tools, and will help users verify their registration, find their balloting stations, and track their local election results.
19 |
20 | GotToVote! {{ site.country }} is not a government website. It was instead built by local civic lab Code for Kenya and the continental open data incubator, Code for Africa.
21 |
22 | This project took just three days and $500 to execute. All the cleaned-up data and source materials used to power this website are available, free-of-charge, for you to reuse on your own projects here (data) and here (source code).
23 |
24 | Contact us if you'd like our help to build other exciting citizen tools.
25 |
26 |
27 | #### Where Does It Come From? GotToVote's History
28 |
29 | GotToVote! is an example of how open data can be useful to ordinary citizens.
30 |
31 | GotToVote! was built as a Code for Kenya data journalism project to demonstrate how data-driven tools can help ordinary citizens decipher and then act on the news they read / watch, by finding out how a national event such as the elections affects their personal lives or local communities.
32 |
33 | The first version of GotToVote, was originally built in just 24hrs, at zero cost, to help voters register for the elections. Code for Kenya initiated the project after citizens complained that the official data released in PDF format by the Independent Electoral and Boundaries Commission (IEBC) was too large to download and too cumbersome to use.
34 |
35 | “The file was so big, it would have taken days for ordinary Kenyans to download. And, once they opened the document all they would have found was complex lists and tables of constituency registration centres. These elections are a tight race, and every vote counts. So, we knew that the information was simply too important to be ignored,” explains Open Institute executive director, Jay Bhalla.
36 |
37 | Two Code for Kenya fellows, David Lemayian and Simeon Oriko, therefore scraped the data out of the IEBC document and built a simple website for citizens to find their registration centre at the click of a button. The website also helped citizens understand the often complex procedures for registering. The site went viral.
38 |
39 | These early successes prompted Dutch human rights organisation, HiVOS, to make a grant to the project to build additional functionality, as well as to package GotToVote and other useful civic technology tools into a ‘plug-&-play’ resource kit for media and citizen groups in other countries.
40 |
41 | “The media and political parties are all focused on the national results and on results affecting two or three of the higher profile presidential contenders. The ordinary citizen and their need to know about their local results was getting lost in all the hype. GotToVote seeks to change that, by giving citizens their local results, as soon as they’re available, and mashing up these results with other locally relevant data,” says Bhalla.
42 |
43 | The second version of GotToVote does two things: it initially helps citizens spread messages of peace, by allowing them to send free SMS messages to friends and associates urging restraint at the ballot box. Once balloting closes, GotToVote will allow citizens to cut through all the ‘noise’ and hype generated during elections, by giving easy access to the official election results for their local counties, or local constituencies. GotToVote will also contextualise the results, by overlaying ballot returns with information about local trends, and official reports of local election fraud or other irregularities.
44 |
45 | GotToVote! has since been replicated in Malawi (where electoral authorities adopted it as the official government solution for voter verification), Ghana, Zambia and Zimbabwe.
46 |
47 | “The approach is something that data journalists in programmes like Code for Kenya do all the time. Thousands of Kenyans were using GotToVote to register for the elections, within hours of the 1st version of the site going live. It proved that the real power of civic technologies is their ability to quickly and cheaply translate complex data into ‘actionable’ information, and to then calibrate the information to a citizens’ exact location or other circumstances,” says Code for Africa Director, Justin Arenstein.
48 |
49 | Code for Kenya is a fully fleged initiative spearheaded by Code for Africa. It has continued to embed Data Fellows into major Kenyan newsrooms and a civil society organisation, to help kickstart experimentation with data-driven civic engagement tools. The Data Fellows were supported by an external software development team.
50 |
51 | Code for Kenya has inspired similar initiatives in Ghana, Nigeria and South Africa. Its success has prompted Code for Africa to pledge additional funding to allow Code for Kenya's Accelerator lab to continue building civic tech projects until the end of 2019.
52 |
53 | #### re/USE manifesto
54 |
55 | Code for Africa and its partners hate seeing civil society or anyone else being duped into wasting money unnecessarily on inappropriate technology or predatory consultancies.
56 |
57 | There are thousands of civic apps and other technology solutions already available for reuse, free-of-charge, on communities such as GitHub.
58 |
59 | Code for Africa is committed to help grow these resources and the global civic technology community, by making its code and data freely available. It is also committed to helping fellow African citizen agency organisations re-purpose and customise existing civic code as cost-effectively as possible.
60 |
61 | The code for GotToVote! {{ site.country }} is available here.
62 |
63 | All the data used by the {{ site.country }} project and other initiatives is available for free reuse on the openAFRICA.net portal. It is already the continent's largest repository of public data, despite being volunteer run, and offers data ranging from government budget and tender information, to data about parliamentarians and other public officials.
64 |
--------------------------------------------------------------------------------
/.htaccess:
--------------------------------------------------------------------------------
1 | # Apache configuration file
2 | # httpd.apache.org/docs/2.2/mod/quickreference.html
3 |
4 | # Note .htaccess files are an overhead, this logic should be in your Apache
5 | # config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
6 |
7 | # Techniques in here adapted from all over, including:
8 | # Kroc Camen: camendesign.com/.htaccess
9 | # perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
10 | # Sample .htaccess file of CMS MODx: modxcms.com
11 |
12 |
13 | # ----------------------------------------------------------------------
14 | # Better website experience for IE users
15 | # ----------------------------------------------------------------------
16 |
17 | # Force the latest IE version, in various cases when it may fall back to IE7 mode
18 | # github.com/rails/rails/commit/123eb25#commitcomment-118920
19 | # Use ChromeFrame if it's installed for a better experience for the poor IE folk
20 |
21 |
22 | Header set X-UA-Compatible "IE=Edge,chrome=1"
23 | # mod_headers can't match by content-type, but we don't want to send this header on *everything*...
24 |
25 | Header unset X-UA-Compatible
26 |
27 |
28 |
29 |
30 | # ----------------------------------------------------------------------
31 | # Cross-domain AJAX requests
32 | # ----------------------------------------------------------------------
33 |
34 | # Serve cross-domain Ajax requests, disabled by default.
35 | # enable-cors.org
36 | # code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
37 |
38 | #
39 | # Header set Access-Control-Allow-Origin "*"
40 | #
41 |
42 |
43 | # ----------------------------------------------------------------------
44 | # CORS-enabled images (@crossorigin)
45 | # ----------------------------------------------------------------------
46 |
47 | # Send CORS headers if browsers request them; enabled by default for images.
48 | # developer.mozilla.org/en/CORS_Enabled_Image
49 | # blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
50 | # hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
51 | # wiki.mozilla.org/Security/Reviews/crossoriginAttribute
52 |
53 |
54 |
55 | # mod_headers, y u no match by Content-Type?!
56 |
57 | SetEnvIf Origin ":" IS_CORS
58 | Header set Access-Control-Allow-Origin "*" env=IS_CORS
59 |
60 |
61 |
62 |
63 |
64 | # ----------------------------------------------------------------------
65 | # Webfont access
66 | # ----------------------------------------------------------------------
67 |
68 | # Allow access from all domains for webfonts.
69 | # Alternatively you could only whitelist your
70 | # subdomains like "subdomain.example.com".
71 |
72 |
73 |
74 | Header set Access-Control-Allow-Origin "*"
75 |
76 |
77 |
78 |
79 | # ----------------------------------------------------------------------
80 | # Proper MIME type for all files
81 | # ----------------------------------------------------------------------
82 |
83 | # JavaScript
84 | # Normalize to standard type (it's sniffed in IE anyways)
85 | # tools.ietf.org/html/rfc4329#section-7.2
86 | AddType application/javascript js jsonp
87 | AddType application/json json
88 |
89 | # Audio
90 | AddType audio/ogg oga ogg
91 | AddType audio/mp4 m4a f4a f4b
92 |
93 | # Video
94 | AddType video/ogg ogv
95 | AddType video/mp4 mp4 m4v f4v f4p
96 | AddType video/webm webm
97 | AddType video/x-flv flv
98 |
99 | # SVG
100 | # Required for svg webfonts on iPad
101 | # twitter.com/FontSquirrel/status/14855840545
102 | AddType image/svg+xml svg svgz
103 | AddEncoding gzip svgz
104 |
105 | # Webfonts
106 | AddType application/vnd.ms-fontobject eot
107 | AddType application/x-font-ttf ttf ttc
108 | AddType font/opentype otf
109 | AddType application/x-font-woff woff
110 |
111 | # Assorted types
112 | AddType image/x-icon ico
113 | AddType image/webp webp
114 | AddType text/cache-manifest appcache manifest
115 | AddType text/x-component htc
116 | AddType application/xml rss atom xml rdf
117 | AddType application/x-chrome-extension crx
118 | AddType application/x-opera-extension oex
119 | AddType application/x-xpinstall xpi
120 | AddType application/octet-stream safariextz
121 | AddType application/x-web-app-manifest+json webapp
122 | AddType text/x-vcard vcf
123 | AddType application/x-shockwave-flash swf
124 | AddType text/vtt vtt
125 |
126 |
127 | # ----------------------------------------------------------------------
128 | # Allow concatenation from within specific js and css files
129 | # ----------------------------------------------------------------------
130 |
131 | # e.g. Inside of script.combined.js you could have
132 | #
133 | #
134 | # and they would be included into this single file.
135 |
136 | # This is not in use in the boilerplate as it stands. You may
137 | # choose to use this technique if you do not have a build process.
138 |
139 | #
140 | # Options +Includes
141 | # AddOutputFilterByType INCLUDES application/javascript application/json
142 | # SetOutputFilter INCLUDES
143 | #
144 |
145 | #
146 | # Options +Includes
147 | # AddOutputFilterByType INCLUDES text/css
148 | # SetOutputFilter INCLUDES
149 | #
150 |
151 |
152 | # ----------------------------------------------------------------------
153 | # Gzip compression
154 | # ----------------------------------------------------------------------
155 |
156 |
157 |
158 | # Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
159 |
160 |
161 | SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
162 | RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
163 |
164 |
165 |
166 | # Compress all output labeled with one of the following MIME-types
167 |
168 | AddOutputFilterByType DEFLATE application/atom+xml \
169 | application/javascript \
170 | application/json \
171 | application/rss+xml \
172 | application/vnd.ms-fontobject \
173 | application/x-font-ttf \
174 | application/xhtml+xml \
175 | application/xml \
176 | font/opentype \
177 | image/svg+xml \
178 | image/x-icon \
179 | text/css \
180 | text/html \
181 | text/plain \
182 | text/x-component \
183 | text/xml
184 |
185 |
186 |
187 |
188 |
189 | # ----------------------------------------------------------------------
190 | # Expires headers (for better cache control)
191 | # ----------------------------------------------------------------------
192 |
193 | # These are pretty far-future expires headers.
194 | # They assume you control versioning with filename-based cache busting
195 | # Additionally, consider that outdated proxies may miscache
196 | # www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
197 |
198 | # If you don't use filenames to version, lower the CSS and JS to something like
199 | # "access plus 1 week".
200 |
201 |
202 | ExpiresActive on
203 |
204 | # Perhaps better to whitelist expires rules? Perhaps.
205 | ExpiresDefault "access plus 1 month"
206 |
207 | # cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
208 | ExpiresByType text/cache-manifest "access plus 0 seconds"
209 |
210 | # Your document html
211 | ExpiresByType text/html "access plus 0 seconds"
212 |
213 | # Data
214 | ExpiresByType text/xml "access plus 0 seconds"
215 | ExpiresByType application/xml "access plus 0 seconds"
216 | ExpiresByType application/json "access plus 0 seconds"
217 |
218 | # Feed
219 | ExpiresByType application/rss+xml "access plus 1 hour"
220 | ExpiresByType application/atom+xml "access plus 1 hour"
221 |
222 | # Favicon (cannot be renamed)
223 | ExpiresByType image/x-icon "access plus 1 week"
224 |
225 | # Media: images, video, audio
226 | ExpiresByType image/gif "access plus 1 month"
227 | ExpiresByType image/png "access plus 1 month"
228 | ExpiresByType image/jpeg "access plus 1 month"
229 | ExpiresByType video/ogg "access plus 1 month"
230 | ExpiresByType audio/ogg "access plus 1 month"
231 | ExpiresByType video/mp4 "access plus 1 month"
232 | ExpiresByType video/webm "access plus 1 month"
233 |
234 | # HTC files (css3pie)
235 | ExpiresByType text/x-component "access plus 1 month"
236 |
237 | # Webfonts
238 | ExpiresByType application/x-font-ttf "access plus 1 month"
239 | ExpiresByType font/opentype "access plus 1 month"
240 | ExpiresByType application/x-font-woff "access plus 1 month"
241 | ExpiresByType image/svg+xml "access plus 1 month"
242 | ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
243 |
244 | # CSS and JavaScript
245 | ExpiresByType text/css "access plus 1 year"
246 | ExpiresByType application/javascript "access plus 1 year"
247 |
248 |
249 |
250 |
251 | # ----------------------------------------------------------------------
252 | # Prevent mobile network providers from modifying your site
253 | # ----------------------------------------------------------------------
254 |
255 | # The following header prevents modification of your code over 3G on some
256 | # European providers.
257 | # This is the official 'bypass' suggested by O2 in the UK.
258 |
259 | #
260 | # Header set Cache-Control "no-transform"
261 | #
262 |
263 |
264 | # ----------------------------------------------------------------------
265 | # ETag removal
266 | # ----------------------------------------------------------------------
267 |
268 | # FileETag None is not enough for every server.
269 |
270 | Header unset ETag
271 |
272 |
273 | # Since we're sending far-future expires, we don't need ETags for
274 | # static content.
275 | # developer.yahoo.com/performance/rules.html#etags
276 | FileETag None
277 |
278 |
279 | # ----------------------------------------------------------------------
280 | # Stop screen flicker in IE on CSS rollovers
281 | # ----------------------------------------------------------------------
282 |
283 | # The following directives stop screen flicker in IE on CSS rollovers - in
284 | # combination with the "ExpiresByType" rules for images (see above).
285 |
286 | # BrowserMatch "MSIE" brokenvary=1
287 | # BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
288 | # BrowserMatch "Opera" !brokenvary
289 | # SetEnvIf brokenvary 1 force-no-vary
290 |
291 |
292 | # ----------------------------------------------------------------------
293 | # Set Keep-Alive Header
294 | # ----------------------------------------------------------------------
295 |
296 | # Keep-Alive allows the server to send multiple requests through one
297 | # TCP-connection. Be aware of possible disadvantages of this setting. Turn on
298 | # if you serve a lot of static content.
299 |
300 | #
301 | # Header set Connection Keep-Alive
302 | #
303 |
304 |
305 | # ----------------------------------------------------------------------
306 | # Cookie setting from iframes
307 | # ----------------------------------------------------------------------
308 |
309 | # Allow cookies to be set from iframes (for IE only)
310 | # If needed, specify a path or regex in the Location directive.
311 |
312 | #
313 | # Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
314 | #
315 |
316 |
317 | # ----------------------------------------------------------------------
318 | # Start rewrite engine
319 | # ----------------------------------------------------------------------
320 |
321 | # Turning on the rewrite engine is necessary for the following rules and
322 | # features. FollowSymLinks must be enabled for this to work.
323 |
324 | # Some cloud hosting services require RewriteBase to be set: goo.gl/HOcPN
325 | # If using the h5bp in a subdirectory, use `RewriteBase /foo` instead where
326 | # 'foo' is your directory.
327 |
328 | # If your web host doesn't allow the FollowSymlinks option, you may need to
329 | # comment it out and use `Options +SymLinksIfOwnerMatch`, but be aware of the
330 | # performance impact: http://goo.gl/Mluzd
331 |
332 |
333 | Options +FollowSymlinks
334 | # Options +SymLinksIfOwnerMatch
335 | RewriteEngine On
336 | # RewriteBase /
337 |
338 |
339 |
340 | # ----------------------------------------------------------------------
341 | # Suppress or force the "www." at the beginning of URLs
342 | # ----------------------------------------------------------------------
343 |
344 | # The same content should never be available under two different URLs -
345 | # especially not with and without "www." at the beginning, since this can cause
346 | # SEO problems (duplicate content). That's why you should choose one of the
347 | # alternatives and redirect the other one.
348 |
349 | # By default option 1 (no "www.") is activated.
350 | # no-www.org/faq.php?q=class_b
351 |
352 | # If you'd prefer to use option 2, just comment out all option 1 lines
353 | # and uncomment option 2.
354 |
355 | # IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME!
356 |
357 | # ----------------------------------------------------------------------
358 |
359 | # Option 1:
360 | # Rewrite "www.example.com -> example.com".
361 |
362 |
363 | RewriteCond %{HTTPS} !=on
364 | RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
365 | RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
366 |
367 |
368 | # ----------------------------------------------------------------------
369 |
370 | # Option 2:
371 | # Rewrite "example.com -> www.example.com".
372 | # Be aware that the following rule might not be a good idea if you use "real"
373 | # subdomains for certain parts of your website.
374 |
375 | #
376 | # RewriteCond %{HTTPS} !=on
377 | # RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
378 | # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
379 | #
380 |
381 |
382 | # ----------------------------------------------------------------------
383 | # Built-in filename-based cache busting
384 | # ----------------------------------------------------------------------
385 |
386 | # If you're not using the build script to manage your filename version revving,
387 | # you might want to consider enabling this, which will route requests for
388 | # `/css/style.20110203.css` to `/css/style.css`.
389 |
390 | # To understand why this is important and a better idea than all.css?v1231,
391 | # please refer to the bundled documentation about `.htaccess`.
392 |
393 | #
394 | # RewriteCond %{REQUEST_FILENAME} !-f
395 | # RewriteCond %{REQUEST_FILENAME} !-d
396 | # RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
397 | #
398 |
399 |
400 | # ----------------------------------------------------------------------
401 | # Prevent SSL cert warnings
402 | # ----------------------------------------------------------------------
403 |
404 | # Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
405 | # https://www.example.com when your cert only allows https://secure.example.com
406 |
407 | #
408 | # RewriteCond %{SERVER_PORT} !^443
409 | # RewriteRule ^ https://example-domain-please-change-me.com%{REQUEST_URI} [R=301,L]
410 | #
411 |
412 |
413 | # ----------------------------------------------------------------------
414 | # Prevent 404 errors for non-existing redirected folders
415 | # ----------------------------------------------------------------------
416 |
417 | # without -MultiViews, Apache will give a 404 for a rewrite if a folder of the
418 | # same name does not exist.
419 | # webmasterworld.com/apache/3808792.htm
420 |
421 | Options -MultiViews
422 |
423 |
424 | # ----------------------------------------------------------------------
425 | # Custom 404 page
426 | # ----------------------------------------------------------------------
427 |
428 | # You can add custom pages to handle 500 or 403 pretty easily, if you like.
429 | # If you are hosting your site in subdirectory, adjust this accordingly
430 | # e.g. ErrorDocument 404 /subdir/404.html
431 | ErrorDocument 404 /404.html
432 |
433 |
434 | # ----------------------------------------------------------------------
435 | # UTF-8 encoding
436 | # ----------------------------------------------------------------------
437 |
438 | # Use UTF-8 encoding for anything served text/plain or text/html
439 | AddDefaultCharset utf-8
440 |
441 | # Force UTF-8 for a number of file formats
442 | AddCharset utf-8 .atom .css .js .json .rss .vtt .xml
443 |
444 |
445 | # ----------------------------------------------------------------------
446 | # A little more security
447 | # ----------------------------------------------------------------------
448 |
449 | # To avoid displaying the exact version number of Apache being used, add the
450 | # following to httpd.conf (it will not work in .htaccess):
451 | # ServerTokens Prod
452 |
453 | # "-Indexes" will have Apache block users from browsing folders without a
454 | # default document Usually you should leave this activated, because you
455 | # shouldn't allow everybody to surf through every folder on your server (which
456 | # includes rather private places like CMS system folders).
457 |
458 | Options -Indexes
459 |
460 |
461 | # Block access to "hidden" directories or files whose names begin with a
462 | # period. This includes directories used by version control systems such as
463 | # Subversion or Git.
464 |
465 | RewriteCond %{SCRIPT_FILENAME} -d [OR]
466 | RewriteCond %{SCRIPT_FILENAME} -f
467 | RewriteRule "(^|/)\." - [F]
468 |
469 |
470 | # Block access to backup and source files. These files may be left by some
471 | # text/html editors and pose a great security danger, when anyone can access
472 | # them.
473 |
474 | Order allow,deny
475 | Deny from all
476 | Satisfy All
477 |
478 |
479 | # If your server is not already configured as such, the following directive
480 | # should be uncommented in order to set PHP's register_globals option to OFF.
481 | # This closes a major security hole that is abused by most XSS (cross-site
482 | # scripting) attacks. For more information: http://php.net/register_globals
483 | #
484 | # IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS:
485 | #
486 | # Your server does not allow PHP directives to be set via .htaccess. In that
487 | # case you must make this change in your php.ini file instead. If you are
488 | # using a commercial web host, contact the administrators for assistance in
489 | # doing this. Not all servers allow local php.ini files, and they should
490 | # include all PHP configurations (not just this one), or you will effectively
491 | # reset everything to PHP defaults. Consult www.php.net for more detailed
492 | # information about setting PHP directives.
493 |
494 | # php_flag register_globals Off
495 |
496 | # Rename session cookie to something else, than PHPSESSID
497 | # php_value session.name sid
498 |
499 | # Disable magic quotes (This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.)
500 | # php_flag magic_quotes_gpc Off
501 |
502 | # Do not show you are using PHP
503 | # Note: Move this line to php.ini since it won't work in .htaccess
504 | # php_flag expose_php Off
505 |
506 | # Level of log detail - log all errors
507 | # php_value error_reporting -1
508 |
509 | # Write errors to log file
510 | # php_flag log_errors On
511 |
512 | # Do not display errors in browser (production - Off, development - On)
513 | # php_flag display_errors Off
514 |
515 | # Do not display startup errors (production - Off, development - On)
516 | # php_flag display_startup_errors Off
517 |
518 | # Format errors in plain text
519 | # Note: Leave this setting 'On' for xdebug's var_dump() output
520 | # php_flag html_errors Off
521 |
522 | # Show multiple occurrence of error
523 | # php_flag ignore_repeated_errors Off
524 |
525 | # Show same errors from different sources
526 | # php_flag ignore_repeated_source Off
527 |
528 | # Size limit for error messages
529 | # php_value log_errors_max_len 1024
530 |
531 | # Don't precede error with string (doesn't accept empty string, use whitespace if you need)
532 | # php_value error_prepend_string " "
533 |
534 | # Don't prepend to error (doesn't accept empty string, use whitespace if you need)
535 | # php_value error_append_string " "
536 |
537 | # Increase cookie security
538 |
539 | php_value session.cookie_httponly true
540 |
541 |
--------------------------------------------------------------------------------
/js/main.js:
--------------------------------------------------------------------------------
1 | ---
2 | ---
3 |
4 | //// Selection Criteria
5 | //
6 | //var county_sel = document.getElementById("county_select");
7 | //var const_sel = document.getElementById("const_select");
8 | //var ward_sel = document.getElementById("ward_select");
9 | //
10 | //var found_reg = document.getElementById("found-reg");
11 | //var loading_gif = document.getElementById("loading_gif");
12 | //
13 | //var header_name = document.getElementById("header-name");
14 | //
15 | //var county_code = 1;
16 | //
17 | //var const_code = [];
18 | //var const_name = [];
19 | //var ward_code = [];
20 | //var ward_name = [];
21 | //var ward_reg_code = [];
22 | //var ward_reg_name = [];
23 | //var centre_code = [];
24 | //var centre_name = [];
25 | //
26 | //
27 | ////Fusion Table Variables
28 | //
29 | //var json_result;
30 | //
31 | //var get_url = "https://www.googleapis.com/fusiontables/v2/query?sql=";
32 | //var sql_1 = encodeURIComponent("SELECT * FROM ");
33 | //var sql_2 = encodeURIComponent(" WHERE 'County Code' = " + county_code);
34 | //var api_key = "&key={{ site.api_key }}";
35 | //
36 | //var table_id = "{{ site.table_id }}";
37 | //
38 | //county_sel.onchange = function () {
39 | //
40 | // if (county_sel.value == 0) {
41 | // //Selected Default
42 | // county_sel.options[county_code].selected = "true";
43 | // } else {
44 | // if (county_sel.options[0].value == 0) {
45 | // county_sel.remove(0);
46 | // }
47 | // const_sel.innerHTML = "";
48 | //// ward_sel.innerHTML = "";
49 | //
50 | // header_name.innerHTML = unescape(toTitleCase(escape(county_sel.options[county_sel.selectedIndex].innerHTML))) + " Region";
51 | //
52 | // $("#reg-centres").html("