From 4a2f00cf9e99a07a0b0c86f06507f669af496b29 Mon Sep 17 00:00:00 2001 From: David Carpenter Date: Fri, 17 Jul 2015 16:03:30 +0100 Subject: [PATCH] Creates a more designed landing page For discussion --- cove/settings.py | 5 ++++ cove/templates/base_generic.html | 1 + cove/templates/multi_index.html | 39 ++++++++++++++++++++++++++++++-- fts/tests.py | 13 +++++++++++ 4 files changed, 56 insertions(+), 2 deletions(-) diff --git a/cove/settings.py b/cove/settings.py index 2a0cf1a5f..4c806174f 100644 --- a/cove/settings.py +++ b/cove/settings.py @@ -46,6 +46,11 @@ 'cove-360': _('360Giving Data Tool'), 'default': _('Cove'), }, + 'application_strapline': { + 'cove-ocds': _('Convert, Validate, Explore Open Contracting Data'), + 'cove-360': _('Convert, Validate, Explore 360Giving Data'), + 'default': _('Convert, Validate, Explore'), + }, 'schema_url': { # Schema url for the package schema (does not yet exist for 360) 'cove-ocds': 'http://ocds.open-contracting.org/standard/r/1__0__RC/release-package-schema.json', 'default': None diff --git a/cove/templates/base_generic.html b/cove/templates/base_generic.html index af1019176..fcee3a0de 100644 --- a/cove/templates/base_generic.html +++ b/cove/templates/base_generic.html @@ -19,6 +19,7 @@
{% block h1 %}

{{ application_name }}

{% endblock %} +

{{ application_strapline }}

diff --git a/cove/templates/multi_index.html b/cove/templates/multi_index.html index 744d1f1e2..881946417 100644 --- a/cove/templates/multi_index.html +++ b/cove/templates/multi_index.html @@ -5,7 +5,42 @@ {% block content %} -

{% trans '360Giving Data Tool' %}

-

{% trans 'Open Contracting Data Tool' %}

+
+
+
+ {% load staticfiles %} + {% trans '360Giving Logo' %} +
+

{% trans '360Giving Data Standard' %}

+

{% blocktrans %}360Giving provides support for grantmakers to publish their grants data openly, to understand their data, and to use the data to create online tools that make grant-making more effective.{% endblocktrans %}


+

{% trans '360Giving Data Tool' %} +

+
+
+ +
+
+ {% load staticfiles %} + {% trans 'Open Contracting Logo' %} +
+

{% trans 'Open Contracting Data Standard' %}

+

{% blocktrans %}The Open Contracting Data Standard promotes the effective use of contracting data, helping users to “follow the money”, and it provides a clear template for governments wishing to disclose their data.{% endblocktrans %}


+

{% trans 'Open Contracting Data Tool' %} +

+
+
+
+ +
+

{% trans 'Creating and using Open Data is made easier when there are good tools to help.' %}

+

{% trans 'CoVE exisits to help people:' %}

+
    +
  • {% trans 'Convert data between common formats (e.g. csv to json)' %}
  • +
  • {% trans 'Validate data against rules' %}
  • +
  • {% trans 'Explore data, that machines find easy, but humans find harder to read' %}
  • +
+ +
{% endblock %} diff --git a/fts/tests.py b/fts/tests.py index 702ac2feb..cfeb2ae61 100644 --- a/fts/tests.py +++ b/fts/tests.py @@ -20,6 +20,19 @@ def server_url(request, live_server): return live_server.url +def test_index_page_banner(server_url, browser): + browser.get(server_url) + assert 'This tool is alpha. Please report any problems on GitHub issues.' in browser.find_element_by_tag_name('body').text + + +def test_index_page(server_url, browser): + browser.get(server_url) + assert 'CoVE' in browser.find_element_by_tag_name('body').text + assert '360Giving Data Tool' in browser.find_element_by_tag_name('body').text + assert 'Open Contracting Data Tool' in browser.find_element_by_tag_name('body').text + assert 'Creating and using Open Data is made easier when there are good tools to help.' in browser.find_element_by_tag_name('body').text + + def test_index_page_ocds(server_url, browser): browser.get(server_url + '/ocds/') assert 'Open Contracting Data Tool' in browser.find_element_by_tag_name('body').text