Skip to content

Commit

Permalink
remove schema-org microdata, because it is now embedded as json-ld (g…
Browse files Browse the repository at this point in the history
  • Loading branch information
paul van genuchten authored Nov 19, 2020
1 parent f9204b8 commit cba8c68
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 130 deletions.
32 changes: 11 additions & 21 deletions pygeoapi/templates/collection.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@
/ <a href="./{{ data['id'] }}">{{ data['title'] }}</a>
{% endblock %}
{% block body %}
<section id="collection" itemscope itemtype="https://schema.org/Dataset">
<span itemprop="includedInDataCatalog" itemscope itemtype="https://schema.org/DataCatalog">
<meta itemprop="url" content="{{ config['server']['url'] }}/collections" />
<meta itemprop="name" content="{{ config['metadata']['identification']['title'] | striptags }}" />
<meta itemprop="description" content="{{ config['metadata']['identification']['description'] | striptags }}" />
</span>
<h1 itemprop="name">{{ data['title'] }}</h1>
<meta itemprop="url" content="{{ config['server']['url'] }}" />
<p itemprop="description">{{ data['description'] }}</p>
<p itemprop="keywords">
<section id="collection" >
<h1>{{ data['title'] }}</h1>
<p>{{ data['description'] }}</p>
<p>
{% for kw in data['keywords'] %}
<mark class="tag">{{ kw }}</mark>
{% endfor %}
Expand All @@ -24,17 +18,15 @@ <h3>Queryables</h3>
<ul>
<li>
<div>
<meta itemprop="encodingFormat" content="text/html" />
<a title="Display Queryables" itemprop="contentURL" href="{{ config['server']['url'] }}/collections/{{ data['id'] }}/queryables">
<a title="Display Queryables" href="{{ config['server']['url'] }}/collections/{{ data['id'] }}/queryables">
Display Queryables of "{{ data['title'] }}"</a></div>
</li>
</ul>
<h3>View</h3>
<ul>
<li>
<div itemprop="distribution" itemscope itemtype="https://schema.org/DataDownload">
<meta itemprop="encodingFormat" content="text/html" />
<a title="Browse Items" itemprop="contentURL" href="{{ config['server']['url'] }}/collections/{{ data['id'] }}/items">
<div>
<a title="Browse Items" href="{{ config['server']['url'] }}/collections/{{ data['id'] }}/items">
Browse through the items of "{{ data['title'] }}"</a></div>
</li>
</ul>
Expand All @@ -44,8 +36,7 @@ <h3>Tiles</h3>
<ul>
<li>
<div>
<meta itemprop="encodingFormat" content="text/html" />
<a title="Display Tiles" itemprop="contentURL" href="{{ config['server']['url'] }}/collections/{{ data['id'] }}/tiles">Display Tiles of "{{ data['title'] }}"</a>
<a title="Display Tiles" href="{{ config['server']['url'] }}/collections/{{ data['id'] }}/tiles">Display Tiles of "{{ data['title'] }}"</a>
</div>
</li>
</ul>
Expand All @@ -55,10 +46,9 @@ <h3>Tiles</h3>
<h3>Links</h3>
<ul>
{% for link in data['links'] %}
<li itemprop="distribution" itemscope itemtype="https://schema.org/DataDownload">
<a itemprop="contentURL" title="{{ link['rel'] }}" href="{{ link['href'] }}">
<span itemprop="name">{{ link['title'] }}</span> (<span itemprop="encodingFormat">{{ link['type'] }}</span>)
<meta itemprop="inLanguage" content="{{ link['hreflang'] }}" />
<li>
<a title="{{ link['rel'] }}" href="{{ link['href'] }}">
<span>{{ link['title'] }}</span> (<span>{{ link['type'] }}</span>)
</a></li>
{% endfor %}
</ul>
Expand Down
14 changes: 5 additions & 9 deletions pygeoapi/templates/collections.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
/ <a href="./collections">Collections</a>
{% endblock %}
{% block body %}
<section id="collections" itemscope itemtype="https://schema.org/DataCatalog">
<meta itemprop="url" content="{{ config['server']['url'] }}" />
<meta itemprop="name" content="{{ config['metadata']['identification']['title'] | striptags }}" />
<meta itemprop="description" content="{{ config['metadata']['identification']['description'] | striptags }}" />
<h2>Collections in this service</h2>
<section id="collections">
<h1>Collections in this service</h1>
<table class="striped">
<thead>
<tr>
Expand All @@ -18,14 +15,13 @@ <h2>Collections in this service</h2>
</thead>
<tbody>
{% for k, v in filter_dict_by_key_value(config['resources'], 'type', 'collection').items() %}
<tr itemprop="dataset" itemscope itemtype="https://schema.org/Dataset">
<tr>
<td data-label="name">
<meta itemprop="url" content="{{ config['server']['url'] }}/collections/{{ k }}" />
<a title="{{ v['title'] | striptags | truncate }}"
href="{{ config['server']['url'] }}/collections/{{ k }}">
<span itemprop="name">{{ v['title'] | striptags | truncate }}</span></a>
<span>{{ v['title'] | striptags | truncate }}</span></a>
</td>
<td itemprop="description" data-label="description">
<td data-label="description">
{{ v['description'] | striptags | truncate }}
</td>
</tr>
Expand Down
12 changes: 3 additions & 9 deletions pygeoapi/templates/domainset.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,9 @@
/ <a href="../../../collections/{{ data['id'] }}">{{ data['title'] }}</a>
{% endblock %}
{% block body %}
<section id="collection" itemscope itemtype="https://schema.org/Dataset">
<span itemprop="includedInDataCatalog" itemscope itemtype="https://schema.org/DataCatalog">
<meta itemprop="url" content="{{ config['server']['url'] }}/collections" />
<meta itemprop="name" content="{{ config['metadata']['identification']['title'] | striptags }}" />
<meta itemprop="description" content="{{ config['metadata']['identification']['description'] | striptags }}" />
</span>
<h1 itemprop="name">{{ data['title'] }}</h1>
<meta itemprop="url" content="{{ config['server']['url'] }}" />
<p itemprop="description">{{ data['description'] }}</p>
<section id="collection">
<h1>{{ data['title'] }}</h1>
<p>{{ data['description'] }}</p>
<h3>Coverage domain set</h3>
<h4>Axis labels</h4>
<ul>
Expand Down
43 changes: 21 additions & 22 deletions pygeoapi/templates/landing_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
{% block body %}

<br/>
<section id="collections" itemscope itemtype="https://schema.org/DataCatalog">
<meta itemprop="url" content="{{ config['server']['url'] }}" />
<section id="collections">
<div class="row">
<div class="col-md-8 col-sm-12">

<section id="identification">
<h1 itemprop="name">{{ config['metadata']['identification']['title'] }}</h1>
<p itemprop="description">{{ config['metadata']['identification']['description'] }}</p>
<h1>{{ config['metadata']['identification']['title'] }}</h1>
<p>{{ config['metadata']['identification']['description'] }}</p>

<p itemprop="keywords">
<p>
{% for kw in config['metadata']['identification']['keywords'] %}
<mark class="tag">{{ kw }}</mark>
{% endfor %}
Expand All @@ -36,7 +35,7 @@ <h1 itemprop="name">{{ config['metadata']['identification']['title'] }}</h1>
License
</div>
<div class="col-sm-8">
<a itemprop="license" href="{{ config['metadata']['license']['url'] }}">
<a href="{{ config['metadata']['license']['url'] }}">
{{ config['metadata']['license']['name'] or config['metadata']['license']['url'] }}</a>
</div>
</div>
Expand Down Expand Up @@ -82,14 +81,14 @@ <h2>Conformance</h2>
</p>
</section>
</div>
<div class="col-md-4 col-sm-12" itemprop="provider" itemscope itemtype="https://schema.org/Organization">
<div class="col-md-4 col-sm-12">
<div class="card fluid">
<div class="section dark">
<b>Provider</b>
</div>
<div class="section">
<b itemprop="name">{{ config['metadata']['provider']['name'] }}</b><br/>
<a itemprop="url" href="{{ config['metadata']['provider']['url'] }}">{{ config['metadata']['provider']['url'] }}</a><br/>
<b>{{ config['metadata']['provider']['name'] }}</b><br/>
<a href="{{ config['metadata']['provider']['url'] }}">{{ config['metadata']['provider']['url'] }}</a><br/>
</div>
</div>
<div class="card fluid">
Expand All @@ -98,35 +97,35 @@ <h2>Conformance</h2>
</div>
<div class="section">
<b>Address</b><br/>
<div class="section" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<span itemprop="streetAddress">{{ config['metadata']['contact']['address'] }}</span><br/>
<span itemprop="addressLocality">{{ config['metadata']['contact']['city'] }}</span>,
<span itemprop="addressRegion">{{ config['metadata']['contact']['stateorprovince'] }}</span><br/>
<span itemprop="postalCode">{{ config['metadata']['contact']['postalcode'] }}</span><br/>
<span itemprop="addressCountry">{{ config['metadata']['contact']['country'] }}</span>
<div class="section">
<span>{{ config['metadata']['contact']['address'] }}</span><br/>
<span>{{ config['metadata']['contact']['city'] }}</span>,
<span>{{ config['metadata']['contact']['stateorprovince'] }}</span><br/>
<span>{{ config['metadata']['contact']['postalcode'] }}</span><br/>
<span>{{ config['metadata']['contact']['country'] }}</span>
</div>
<div itemprop="contactPoint" itemscope itemtype="https://schema.org/ContactPoint">
<div>
<b>Email</b><br/>
<span itemprop="Email"><a href="mailto:{{ config['metadata']['contact']['email'] }}">{{ config['metadata']['contact']['email'] }}</a></span><br/>
<span><a href="mailto:{{ config['metadata']['contact']['email'] }}">{{ config['metadata']['contact']['email'] }}</a></span><br/>
{% if config['metadata']['contact']['phone'] %}
<b>Telephone</b><br/>
<span itemprop="Telephone"><a href="tel:{{ config['metadata']['contact']['phone'] }}">{{ config['metadata']['contact']['phone'] }}</a></span><br/>
<span><a href="tel:{{ config['metadata']['contact']['phone'] }}">{{ config['metadata']['contact']['phone'] }}</a></span><br/>
{% endif %}
{% if config['metadata']['contact']['fax'] %}
<b>Fax</b><br/>
<span itemprop="faxNumber"><a href="tel:{{ config['metadata']['contact']['fax'] }}">{{ config['metadata']['contact']['fax'] }}</a></span><br/>
<span><a href="tel:{{ config['metadata']['contact']['fax'] }}">{{ config['metadata']['contact']['fax'] }}</a></span><br/>
{% endif %}
{% if config['metadata']['contact']['url'] %}
<b>Contact URL</b><br/>
<span itemprop="url"><a href="{{ config['metadata']['contact']['url'] }}">{{ config['metadata']['contact']['url'] }}</a></span><br/>
<span><a href="{{ config['metadata']['contact']['url'] }}">{{ config['metadata']['contact']['url'] }}</a></span><br/>
{% endif %}
{% if config['metadata']['contact']['hours'] %}
<b>Hours</b><br/>
<span itemprop="hoursAvailable">{{ config['metadata']['contact']['hours'] }}</span><br/>
<span>{{ config['metadata']['contact']['hours'] }}</span><br/>
{% endif %}
{% if config['metadata']['contact']['instructions'] %}
<b>Contact instructions</b><br/>
<span itemprop="contactType">{{ config['metadata']['contact']['instructions'] }}</span>
<span>{{ config['metadata']['contact']['instructions'] }}</span>
{% endif %}
</div>
</div>
Expand Down
17 changes: 8 additions & 9 deletions pygeoapi/templates/process.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
/ <a href="./{{ data['id'] }}">{{ data['title'] }}</a>
{% endblock %}
{% block body %}
<section id="processes" itemscope itemtype="https://schema.org/WebAPI">
<h2 itemprop="name">{{ data['title'] }}</h2>
<div itemprop="description">{{ data['description'] }}</div>
<meta itemprop="url" content="{{ config['server']['url'] }}/processes/{{ data['id'] }}" />
<section id="processes">
<h2>{{ data['title'] }}</h2>
<div>{{ data['description'] }}</div>
<div class="row">
<div class="col-sm-12 col-md-6">
<table class="striped">
Expand All @@ -22,10 +21,10 @@ <h2 itemprop="name">{{ data['title'] }}</h2>
</thead>
<tbody>
{% for input_ in data['inputs'] %}
<tr itemprop="parameter" itemscope itemtype="https://schema.org/Parameter">
<td itemprop="id" data-label="name">{{ input_['id'] }}</td>
<td itemprop="name" data-label="title">{{ input_['title'] }}</td>
<td itemprop="description" data-label="description">
<tr>
<td data-label="name">{{ input_['id'] }}</td>
<td data-label="title">{{ input_['title'] }}</td>
<td data-label="description">
{{ input_['description'] | striptags | truncate }}
</td>
</tr>
Expand All @@ -38,7 +37,7 @@ <h2>Links</h2>
<ul>
{% for link in data['links'] %}
<li>
<a itemprop="documentation" title="{{ link['rel'] }}" href="{{ link['href'] }}">
<a title="{{ link['rel'] }}" href="{{ link['href'] }}">
{{ link['title'] }} ({{ link['type'] }})
</a></li>
{% endfor %}
Expand Down
7 changes: 3 additions & 4 deletions pygeoapi/templates/processes.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ <h2>Processes available on this service</h2>
</thead>
<tbody>
{% for p in data['processes'] %}
<tr itemscope itemtype="https://schema.org/WebAPI">
<td itemprop="name" data-label="name">
<meta itemprop="url" content="{{ config['server']['url'] }}/processes/{{ p['id'] }}" />
<tr>
<td data-label="name">
<a title="{{ p['title'] | striptags | truncate }}" href="{{ config['server']['url'] }}/processes/{{ p['id'] }}">{{ p['title'] | striptags | truncate }}</a>
</td>
<td itemprop="description" data-label="description">
<td data-label="description">
{{ p['description'] | striptags | truncate }}
</td>
</tr>
Expand Down
14 changes: 4 additions & 10 deletions pygeoapi/templates/queryables.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,10 @@
/ <a href="./{{ data['id'] }}queryables">Queryables</a>
{% endblock %}
{% block body %}
<section id="collection" itemscope itemtype="https://schema.org/Dataset">
<span itemprop="includedInDataCatalog" itemscope itemtype="https://schema.org/DataCatalog">
<meta itemprop="url" content="{{ config['server']['url'] }}/collections" />
<meta itemprop="name" content="{{ config['metadata']['identification']['title'] | striptags }}" />
<meta itemprop="description" content="{{ config['metadata']['identification']['description'] | striptags }}" />
</span>
<h1 itemprop="name">{{ data['title'] }}</h1>
<meta itemprop="url" content="{{ config['server']['url'] }}" />
<p itemprop="description">{{ data['description'] }}</p>
<p itemprop="keywords">
<section id="collection">
<h1>{{ data['title'] }}</h1>
<p>{{ data['description'] }}</p>
<p>
{% for kw in data['keywords'] %}
<mark class="tag">{{ kw }}</mark>
{% endfor %}
Expand Down
12 changes: 3 additions & 9 deletions pygeoapi/templates/rangetype.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,9 @@
/ <a href="../../../collections/{{ data['id'] }}">{{ data['title'] }}</a>
{% endblock %}
{% block body %}
<section id="collection" itemscope itemtype="https://schema.org/Dataset">
<span itemprop="includedInDataCatalog" itemscope itemtype="https://schema.org/DataCatalog">
<meta itemprop="url" content="{{ config['server']['url'] }}/collections" />
<meta itemprop="name" content="{{ config['metadata']['identification']['title'] | striptags }}" />
<meta itemprop="description" content="{{ config['metadata']['identification']['description'] | striptags }}" />
</span>
<h1 itemprop="name">{{ data['title'] }}</h1>
<meta itemprop="url" content="{{ config['server']['url'] }}" />
<p itemprop="description">{{ data['description'] }}</p>
<section id="collection">
<h1>{{ data['title'] }}</h1>
<p>{{ data['description'] }}</p>
<h3>Coverage range type</h3>
<h4>Fields</h4>
<ul>
Expand Down
5 changes: 2 additions & 3 deletions pygeoapi/templates/stac/catalog.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ <h2>Links</h2>
<tbody>
{% for link in data['links'] %}
{% if link['type'] == 'text/html' and link['rel'] in ['child', 'item'] %}
<tr itemprop="dataset" itemscope itemtype="https://schema.org/Dataset">
<tr>
<td data-label="name">
<meta itemprop="url" content="{{ link['href'] }}"/>
<a title="{{ link['href'] }}" href="{{ link['href'] }}">
<span itemprop="name">{{ link['href'] | get_path_basename }}</span></a>
<span>{{ link['href'] | get_path_basename }}</span></a>
</td>
</tr>
{% endif %}
Expand Down
5 changes: 2 additions & 3 deletions pygeoapi/templates/stac/item.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ <h4>Assets</h4>
</thead>
<tbody>
{% for k, link in data['assets'].items() %}
<tr itemprop="dataset" itemscope itemtype="https://schema.org/Dataset">
<tr>
<td data-label="name">
<meta itemprop="url" content="{{ link['href'] }}"/>
<a title="{{ link['href'] }}" href="{{ link['href'] }}">
<span itemprop="name">{{ link['href'] | get_path_basename }}</span></a>
<span>{{ link['href'] | get_path_basename }}</span></a>
</td>
</tr>
{% endfor %}
Expand Down
14 changes: 4 additions & 10 deletions pygeoapi/templates/stac/root.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,10 @@
{% block body %}

<section id="identification">
<meta itemprop="url" content="{{ config['server']['url'] }}/stac" />
<meta itemprop="name" content="{{ data['title'] | striptags }}" />
<meta itemprop="name" content="{{ data['description'] | striptags }}" />

<h4>STAC Version: {{ data['stac_version'] }}</h4>

</section>

<section id="collections" itemscope itemtype="https://schema.org/DataCatalog">
<section id="collections">
<h2>Collections</h2>
<table class="striped">
<thead>
Expand All @@ -25,14 +20,13 @@ <h2>Collections</h2>
</thead>
<tbody>
{% for k, v in filter_dict_by_key_value(config['resources'], 'type', 'stac-collection').items() %}
<tr itemprop="dataset" itemscope itemtype="https://schema.org/Dataset">
<tr>
<td data-label="name">
<meta itemprop="url" content="{{ config['server']['url'] }}/stac/{{ k }}" />
<a title="{{ v['title'] | striptags | truncate }}"
href="{{ config['server']['url'] }}/stac/{{ k }}">
<span itemprop="name">{{ v['title'] | striptags | truncate }}</span></a>
<span>{{ v['title'] | striptags | truncate }}</span></a>
</td>
<td itemprop="description" data-label="description">
<td data-label="description">
{{ v['description'] | striptags | truncate }}
</td>
</tr>
Expand Down
14 changes: 4 additions & 10 deletions pygeoapi/templates/tiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,10 @@
{% endblock %}

{% block body %}
<section id="collection" itemscope itemtype="https://schema.org/Dataset">
<span itemprop="includedInDataCatalog" itemscope itemtype="https://schema.org/DataCatalog">
<meta itemprop="url" content="{{ config['server']['url'] }}/collections" />
<meta itemprop="name" content="{{ config['metadata']['identification']['title'] | striptags }}" />
<meta itemprop="description" content="{{ config['metadata']['identification']['description'] | striptags }}" />
</span>
<h1 itemprop="name">{{ data['title'] }}</h1>
<meta itemprop="url" content="{{ config['server']['url'] }}" />
<p itemprop="description">{{ data['description'] }}</p>
<p itemprop="keywords">
<section id="collection">
<h1>{{ data['title'] }}</h1>
<p>{{ data['description'] }}</p>
<p>
{% for kw in data['keywords'] %}
<mark class="tag">{{ kw }}</mark>
{% endfor %}
Expand Down
Loading

0 comments on commit cba8c68

Please sign in to comment.