diff --git a/make_html.py b/make_html.py index 075fe3b0ed..04546b9a6a 100644 --- a/make_html.py +++ b/make_html.py @@ -82,11 +82,11 @@ def xpath_to_url(path): # remove conditions path = re.sub(r'\[[^]]+\]', '', path) if path.startswith('iati-activity'): - url = 'https://reference.codeforiati.org/activity-standard/iati-activities/' + path.split('@')[0] + url = 'http://iatistandard.org/activity-standard/iati-activities/' + path.split('@')[0] elif path.startswith('iati-organisation'): - url = 'https://reference.codeforiati.org/organisation-standard/iati-organisations/' + path.split('@')[0] + url = 'http://iatistandard.org/organisation-standard/iati-organisations/' + path.split('@')[0] else: - url = 'https://reference.codeforiati.org/activity-standard/iati-activities/iati-activity/' + path.split('@')[0] + url = 'http://iatistandard.org/activity-standard/iati-activities/iati-activity/' + path.split('@')[0] if '@' in path: url += '#attributes' return url @@ -117,7 +117,8 @@ def get_codelist_values(codelist_values_for_element): app.jinja_env.filters['has_future_transactions'] = timeliness.has_future_transactions app.jinja_env.filters['round_nicely'] = round_nicely -# Custom Jinja globals +# Custom Jinja globals - NOTE: codeforIATI stats URLs have not been +# changed. app.jinja_env.globals['dataset_to_publisher'] = dataset_to_publisher app.jinja_env.globals['url'] = lambda x: '/' if x == 'index.html' else x app.jinja_env.globals['datetime_generated'] = lambda: datetime.now(UTC).strftime('%-d %B %Y (at %H:%M %Z)') @@ -327,10 +328,22 @@ def registration_agencies(): nonmatching=nonmatching) -# Serve static files through the development server (--live) -@app.route('/') -def favicon_development(filename): - return send_from_directory('static', filename) +@app.route('/') +def serve_images_development(filename): + """Serve static images through the development server (--live)""" + return send_from_directory('static/', filename) + + +@app.route('/') +def serve_css_development(filename): + """Serve static css through the development server (--live)""" + return send_from_directory('static/', filename) + + +@app.route('/favicon.ico') +def favicon_root(): + """Serve favicon from img folder when requested from root""" + return send_from_directory('static/img', 'favicon.ico') @app.route('/.csv') diff --git a/static/CNAME b/static/CNAME deleted file mode 100644 index f5afd29b75..0000000000 --- a/static/CNAME +++ /dev/null @@ -1 +0,0 @@ -analytics.codeforiati.org diff --git a/static/favicon.ico b/static/favicon.ico deleted file mode 100644 index bfc4337733..0000000000 Binary files a/static/favicon.ico and /dev/null differ diff --git a/static/img/favicon-16x16.png b/static/img/favicon-16x16.png new file mode 100644 index 0000000000..dab68d1b0f Binary files /dev/null and b/static/img/favicon-16x16.png differ diff --git a/static/img/favicon-32x32.png b/static/img/favicon-32x32.png new file mode 100644 index 0000000000..605e8f2e88 Binary files /dev/null and b/static/img/favicon-32x32.png differ diff --git a/static/img/favicon.ico b/static/img/favicon.ico new file mode 100644 index 0000000000..40b5194de1 Binary files /dev/null and b/static/img/favicon.ico differ diff --git a/templates/base.html b/templates/base.html index 135b7cba20..3bf3405ddf 100644 --- a/templates/base.html +++ b/templates/base.html @@ -6,8 +6,8 @@ - - {% block title %}{{ page_titles[page] }} – Code for IATI Analytics{% endblock %} + + IATI Dashboard – {% block title %}{{ page_titles[page] }}{% endblock %} @@ -28,15 +28,6 @@
-

The below figures are calculated based on the data contained within the <budget> element for each reported activity. Original and revised elements are based on the value declared in the budget/@type attribute. Where budgets fall across two calendar years, the month of the <period-end> date is used to determine annual groupings, with budgets for periods ending January-June added to the previous calendar year.

+

The below figures are calculated based on the data contained within the <budget> element for each reported activity. Original and revised elements are based on the value declared in the budget/@type attribute. Where budgets fall across two calendar years, the month of the <period-end> date is used to determine annual groupings, with budgets for periods ending January-June added to the previous calendar year.

@@ -379,7 +379,7 @@

Codelist Values (version {{ major_version }}.xx)

{% with element_i=element_list.index(element) %} - + {% with codes=sorted(codelist_sets[major_version].get(codelist_mapping[major_version].get(element)).intersection(values.keys())) %}
{{ element }}{{ codelist_mapping[major_version].get(element) }}{{ codelist_mapping[major_version].get(element) }}{% if codes|count %} {{ codes|count }} diff --git a/templates/validation.html b/templates/validation.html index 412812c332..c01936cc3d 100644 --- a/templates/validation.html +++ b/templates/validation.html @@ -45,7 +45,7 @@

List of files that fail validation, grouped by publisher

{% if publisher in ckan and dataset_name in ckan[publisher] %} - validator + validator {% endif %}
diff --git a/text.py b/text.py index 56081bcd79..6955838bdc 100644 --- a/text.py +++ b/text.py @@ -1,3 +1,5 @@ +"""Text fragments for page titles, navigation and page leaders/sub-leaders +""" import copy top_titles = { @@ -10,7 +12,7 @@ } page_titles = { - 'index': 'Code for IATI Analytics', + 'index': 'Dashboard Home', 'headlines': 'Headlines', 'data_quality': 'Data Quality', 'exploring_data': 'Exploring Data',