[NUUG fiksgatami] [patch] More NUUG / Norway branding for mapit

Petter Reinholdtsen pere at hungry.com
Thu Feb 10 10:03:32 CET 2011


Here is a patch to get more branding of the mapit.nuug.no site.

First, what seem to be a typo in the normal base template (ending
</h1>, but no starting <h1>):

diff --git a/pylib/mapit/templates/base.html b/pylib/mapit/templates/base.html
index 9c4363a..3f29310 100644
--- a/pylib/mapit/templates/base.html
+++ b/pylib/mapit/templates/base.html
@@ -10,7 +10,7 @@
 </head>
 <body>

-<a href="http://www.mysociety.org/"><img id="logo" border=0 src="/static/mysociety_smT.png" a
+<a href="http://www.mysociety.org/"><img id="logo" border=0 src="/static/mysociety_smT.png" a

 <blockquote>
 &ldquo;Gentlemen, we can rebuild him. We have the technology. We can make him better than he

Next, mention NUUG in the support/donation block:

diff --git a/pylib/mapit/templates/no/index.html b/pylib/mapit/templates/no/index.html
index 876bc24..5c305a9 100644
--- a/pylib/mapit/templates/no/index.html
+++ b/pylib/mapit/templates/no/index.html
@@ -10,8 +10,8 @@ administrative area information and polygons for Norway (see
 <a href="http://github.com/mysociety/mapit">available on GitHub</a>.

 <p id="donate">mySociety is run by a registered charity &ndash; please
-<a href="http://www.mysociety.org/donate/">donate</a> to help keep us going and
-to be able to continue to do things like this!</p>
+<a href="http://www.mysociety.org/donate/">donate</a> to help keep mySociety going and
+to be able to continue to do things like this!  NUUG is a member organisation for people inte

 <p>This site is filled with only open data,
 so you can be secure that you can reuse the data from this

And last byt not least, a norwegian base template to mention NUUG, and
update the list of data source to reflect the Norwegian data set.

--- a/pylib/mapit/templates/no/base.html   2011-01-22 00:45:16.025294959 +0100
+++ b/pylib/mapit/templates/no/base.html  2011-02-10 09:47:39.000000000 +0100
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en-gb">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>{% block fulltitle %}{% block title %}{% endblock %} - MaPit{% endblock %}</title>
+<link type="text/css" href="/static/css.css" rel="stylesheet">
+{% if norobots %}
+<meta name="robots" content="noindex, follow">
+{% endif %}
+</head>
+<body>
+
+<div align="right"><a href="http://www.nuug.no/">NUUG</a> and <a href="http://www.mysociety.org/"><img id="logo" border=0 src="/static/mysociety_smT.png" alt="mySociety"></a></div>
+
+<blockquote>
+&ldquo;Gentlemen, we can rebuild him. We have the technology. We can make him better than he was before. Better. Stronger. Faster.&rdquo;
+</blockquote>
+
+<h1>{{ request.META.HTTP_HOST|default:"MaPit" }}</h1>
+<span><a href="/">Documentation</a></span>
+
+{% block content %}
+{% endblock %}
+
+<div id="footer">
+Built by Matthew Somerville. Pictures from Wikimedia Commons
+(<a href="http://commons.wikimedia.org/wiki/File:Liquid_filled_compass.jpg">background</a>).
+Hosted by the University of Oslo.
+<br>
+<a href="http://www.djangoproject.com/"><img align="middle" src="http://media.djangopony.com/img/small/badge.png" border="0" alt="Django powered"></a>
+
+<p>This database contains OpenStreetMap data © OpenStreetMap and contributors,
+C-BY-SA-2.0. N5000 data is © Norwegian Mapping Authority (Statens kartverk)
+CC-BY-SA-3.0)</p>
+
+</div>
+
+</body>
+</html>

But there is something wrong with the template selection.  The page
content seem to differ depending on browser setting.  When I visit
using firefox configured to ask for norwegian pages, I get one text,
while when I visit using konqueror (which I believe is configured to
ask for english pages), I get another text.

Happy hacking,
-- 
Petter Reinholdtsen


More information about the fiksgatami mailing list