From 0f1e04534bfd61bc7b71cb7e852871896ed6bee4 Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Mon, 6 May 2019 14:50:44 +0000 Subject: [PATCH] UI updates (thanks @alexandreleroux) --- pygeoapi/api.py | 8 +++--- pygeoapi/static/img/README.md | 4 --- pygeoapi/static/img/json.png | Bin 2738 -> 0 bytes pygeoapi/templates/collection.html | 2 +- pygeoapi/templates/collections.html | 37 ++++++++++++++++++++-------- pygeoapi/templates/conformance.html | 5 +++- pygeoapi/templates/item.html | 2 +- pygeoapi/templates/items.html | 2 +- pygeoapi/templates/root.html | 2 +- 9 files changed, 39 insertions(+), 23 deletions(-) delete mode 100644 pygeoapi/static/img/README.md delete mode 100644 pygeoapi/static/img/json.png diff --git a/pygeoapi/api.py b/pygeoapi/api.py index e214980..5eacfbb 100644 --- a/pygeoapi/api.py +++ b/pygeoapi/api.py @@ -102,23 +102,23 @@ class API(object): fcm['links'] = [{ 'rel': 'self', 'type': 'application/json', - 'title': 'this document as JSON', + 'title': 'This document as JSON', 'href': self.config['server']['url'] }, { 'rel': 'self', 'type': 'text/html', - 'title': 'this document as HTML', + 'title': 'This document as HTML', 'href': '{}/?f=html'.format(self.config['server']['url']), 'hreflang': self.config['server']['language'] }, { 'rel': 'self', 'type': 'application/openapi+json;version=3.0', - 'title': 'the OpenAPI definition as JSON', + 'title': 'The OpenAPI definition as JSON', 'href': '{}/api'.format(self.config['server']['url']) }, { 'rel': 'self', 'type': 'text/html', - 'title': 'the OpenAPI definition as HTML', + 'title': 'The OpenAPI definition as HTML', 'href': '{}/api?f=html'.format(self.config['server']['url']), 'hreflang': self.config['server']['language'] } diff --git a/pygeoapi/static/img/README.md b/pygeoapi/static/img/README.md deleted file mode 100644 index dd1e3b7..0000000 --- a/pygeoapi/static/img/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Images - -# `json.png` -- downloaded from https://thenounproject.com/search/?q=json&i=966215 diff --git a/pygeoapi/static/img/json.png b/pygeoapi/static/img/json.png de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DN;kz}R+tc-b+HLi=j2vC#e4h2?8(nellW5VZqbn}%^r%w$WP=H%_DEY#P)vP zJGK0(q2SbKEe+^&B^vASlOn6^dBq59#i@f8=T9KHN0}``8 zbi`bMc)Px7X4CjOq`hS^s@QT~tjyo0q4m49pSR;JgEduo!M5xZW%0+~r**b=g&nB9 zuj~>Mi)mH-#7Lt~>hci_2zU2c$w^5W%(+ubDJ#D_RFCY=%X%Ll$dlSKG{tr6Gs7Qr zIKCA2)4n<-u#|E_<^=0`!&&d^+*A>>cg#O`&1@%x$7}u^vDON9Nfdh|^ybhRTHQ|p zUJDJ*h|CDNmyN67WX+lLzqADH@@_A4FKXxX6(p$bAx-tt=XHYX_wSvv?CAR8rTqyN zqn4OG|1C96c-t#uSy~@&Zu2w>p~^N7iSmu^P(r{RpFJMQVcb{{iznq6uLI2kKE-v% z9c-!d4^xsK&6F;}ad*+=@C7)I4=P^F&(n>iO83SPoB1kT_7rfH_-u|JN5(fXpa^4f zzdvqie;2xr?P=aQ2r+bGKqAsfv?ek5jts=ji3d)32; zOvT^)B1wm7dfTSdlTsf4vqp}K#I(j3Z0cx!kD6ZaFF<`WLE*W?P@9I*8?&$eie?Q- zcwrwE-%2<=zmPl2zvQsuy?^OS9oa6(yeHx9=RKcXO{M$>k-W{>8jbUlqaj>JEpjx2 zzY2e63GUJ(7jW3uhKtY`J9)YdjZU&=SXLQ9)qTIVB~w6`1e}HxEP7>*om10o6E|px zi3Smzxrm`q9fA)R@z~DeMtbWVmpA2%8&%Qv!fT1TpU7V(l|C9HjEV`Srm)O@vSUlH g(toG9CnpbtGPa&y_Ej~n28K=$*4oLc&cc`SH!&^jcK`qY diff --git a/pygeoapi/templates/collection.html b/pygeoapi/templates/collection.html index bf60e3d..05fb921 100644 --- a/pygeoapi/templates/collection.html +++ b/pygeoapi/templates/collection.html @@ -12,7 +12,7 @@ + Browse through the items of collection {{ data['title'] }}

Links

    {% for link in data['links'] %} diff --git a/pygeoapi/templates/collections.html b/pygeoapi/templates/collections.html index b495c73..051c1bc 100644 --- a/pygeoapi/templates/collections.html +++ b/pygeoapi/templates/collections.html @@ -6,15 +6,32 @@ {% block body %}

    Collections in this service

    -
      - {% for k, v in config['datasets'].items()%} -
    • - - - {{ v['title'] }}
      - {{ v['description'] | striptags | truncate }} -
    • - {% endfor %} -
    + +
    +
    + + + + + + + + + + {% for k, v in config['datasets'].items() %} + + + + + {% endfor %} + +
    Collections
    NameDescription
    + + {{ v['title'] | striptags | truncate }} + + {{ v['description'] | striptags | truncate }} +
    +
    +
    {% endblock %} diff --git a/pygeoapi/templates/conformance.html b/pygeoapi/templates/conformance.html index 94e2ade..27edd80 100644 --- a/pygeoapi/templates/conformance.html +++ b/pygeoapi/templates/conformance.html @@ -1,8 +1,11 @@ {% extends "base.html" %} {% block title %}{{ super() }} Conformance {% endblock %} +{% block crumbs %}{{ super() }} +/ Conformance +{% endblock %} {% block body %}
    -

    Conformance JSON

    +

    Conformance

      {% for link in data['conformsTo'] %}
    • {{ link }}
    • diff --git a/pygeoapi/templates/item.html b/pygeoapi/templates/item.html index 5804c4b..2d646cc 100644 --- a/pygeoapi/templates/item.html +++ b/pygeoapi/templates/item.html @@ -28,7 +28,7 @@
      - +
      diff --git a/pygeoapi/templates/items.html b/pygeoapi/templates/items.html index 1e6e12f..90a7bd3 100644 --- a/pygeoapi/templates/items.html +++ b/pygeoapi/templates/items.html @@ -26,7 +26,7 @@
      -
      Item properties
      +
      diff --git a/pygeoapi/templates/root.html b/pygeoapi/templates/root.html index 7bec3eb..b3ce77e 100644 --- a/pygeoapi/templates/root.html +++ b/pygeoapi/templates/root.html @@ -28,7 +28,7 @@ Terms of service
      - {{ config['metadata']['identification']['terms_of_service'] }} + {{ config['metadata']['identification']['terms_of_service'] }}
      {% endif %}
      Items