UI updates (thanks @alexandreleroux)
This commit is contained in:
+4
-4
@@ -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']
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Images
|
||||
|
||||
# `json.png`
|
||||
- downloaded from https://thenounproject.com/search/?q=json&i=966215
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 KiB |
@@ -12,7 +12,7 @@
|
||||
<div itemprop="distribution" itemscope itemtype="http://schema.org/DataDownload">
|
||||
<meta itemprop="encodingFormat" content="text/html" />
|
||||
<a title="Browse Items" itemprop="contentURL" href="{{ config['server']['url'] }}/collections/{{ data['name'] }}/items">
|
||||
Browse through the items of collection {{ data['title'] }}.</a></div>
|
||||
Browse through the items of collection {{ data['title'] }}</a></div>
|
||||
<h2>Links</h2>
|
||||
<ul>
|
||||
{% for link in data['links'] %}
|
||||
|
||||
@@ -6,15 +6,32 @@
|
||||
{% block body %}
|
||||
<section id="collections">
|
||||
<h2>Collections in this service</h2>
|
||||
<ul>
|
||||
{% for k, v in config['datasets'].items()%}
|
||||
<li itemprop="dataset" itemscope itemtype="http://schema.org/Dataset">
|
||||
<meta itemprop="url" content="{{ config['server']['url'] }}/collections/{{ k }}" />
|
||||
<a href="{{ config['server']['url'] }}/collections/{{ k }}/items">
|
||||
<span itemprop="name">{{ v['title'] }}</span></a><br/>
|
||||
<span itemprop="description">{{ v['description'] | striptags | truncate }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<table class="striped">
|
||||
<caption>Collections</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for k, v in config['datasets'].items() %}
|
||||
<tr itemprop="dataset" itemscope itemtype="http://schema.org/Dataset">
|
||||
<td itemprop="name" data-label="name">
|
||||
<meta itemprop="url" content="{{ config['server']['url'] }}/collections/{{ k }}" />
|
||||
<a title="{{ v['title'] | striptags | truncate }}" href="{{ config['server']['url'] }}/collections/{{ k }}">{{ v['title'] | striptags | truncate }}</a>
|
||||
</td>
|
||||
<td itemprop="description" data-label="description">
|
||||
{{ v['description'] | striptags | truncate }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ super() }} Conformance {% endblock %}
|
||||
{% block crumbs %}{{ super() }}
|
||||
/ <a href="./conformance">Conformance</a>
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<section id="conformance">
|
||||
<h2>Conformance <a title="JSON" href="{{ config['server']['url'] }}/conformance"><img alt="JSON" src="{{ config['server']['url'] }}/static/img/json.png" width="30" height="30"/></a></h2>
|
||||
<h2>Conformance</h2>
|
||||
<ul>
|
||||
{% for link in data['conformsTo'] %}
|
||||
<li><a title="{{ link }}" href="{{ link }}">{{ link }}</a></li>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<div id="items-map"></div>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<table>
|
||||
<table class="striped">
|
||||
<caption>Item properties</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<div id="items-map"></div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<table>
|
||||
<table class="striped">
|
||||
<caption>Items</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
Terms of service
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
{{ config['metadata']['identification']['terms_of_service'] }}
|
||||
<a title="Terms of service" href="{{ config['metadata']['identification']['terms_of_service'] }}">{{ config['metadata']['identification']['terms_of_service'] }}</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user