Skip to content

Commit

Permalink
Update HTML template
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenchrist committed Apr 16, 2024
1 parent 91ab91e commit 91639dc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 421 deletions.
25 changes: 17 additions & 8 deletions datacontract/templates/datacontract.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,25 @@ <h1 class="text-base font-semibold leading-6 text-gray-900" id="info">Info</h1>
<dd class="mt-1 text-sm text-gray-900">{{ datacontract.info.version }}</dd>
</div>

{% if datacontract.info.description %}
<div class="sm:col-span-2">
<dt class="text-sm font-medium text-gray-500">Description</dt>
<dd class="mt-1 text-sm text-gray-900" >
<span class="whitespace-pre-wrap">{{ datacontract.info.description }}</span>

</dd>
</div>
{% endif %}

{% if datacontract.info.owner %}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Owner</dt>
<dd class="mt-1 text-sm text-gray-900">
<span>{{ datacontract.info.owner }}</span>

</dd>
</div>
{% endif %}

{% if datacontract.info.contact %}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Contact</dt>
<dd class="mt-1 text-sm text-gray-900">
Expand All @@ -109,21 +112,22 @@ <h1 class="text-base font-semibold leading-6 text-gray-900" id="info">Info</h1>
{% endif %}
</dd>
</div>
{% endif %}

</dl>
</div>
</div>
</section>


{% if servers %}

<section>
<div class="px-4 sm:px-0">
<h1 class="text-base font-semibold leading-6 text-gray-900" id="servers">Servers</h1>
<p class="text-sm text-gray-500">Servers of the data contract</p>
</div>




<ul role="list" class="mt-2 divide-y divide-gray-100 overflow-hidden bg-white shadow-sm ring-1 ring-gray-900/5 sm:rounded-lg">

{% for server_name, server in datacontract.servers.items() %}
Expand Down Expand Up @@ -276,7 +280,10 @@ <h1 class="text-base font-semibold leading-6 text-gray-900" id="servers">Servers
</ul>

</section>
{% endif %}


{% if datacontract.terms %}
<section>
<div class="px-4 sm:px-0">
<h1 class="text-base font-semibold leading-6 text-gray-900" id="terms">Terms</h1>
Expand Down Expand Up @@ -323,7 +330,7 @@ <h1 class="text-base font-semibold leading-6 text-gray-900" id="terms">Terms</h1
</div>
</div>
</section>

{% endif %}


<section id="models">
Expand Down Expand Up @@ -360,7 +367,7 @@ <h1 class="text-base font-semibold leading-6 text-gray-900">

<tr>
<td class="whitespace-nowrap py-2 pl-4 pr-2 text-sm font-medium text-gray-900 sm:pl-6 w-3/12">
<div class="px-3 py-2 text-sm">
<div class="py-2 text-sm">
{{ field_name }}
{# TODO nested fields #}
</div>
Expand All @@ -374,10 +381,12 @@ <h1 class="text-base font-semibold leading-6 text-gray-900">
{% endif %}
</td>
<td class="whitespace-nowrap px-1 py-2 text-sm text-gray-500 w-1/12">
{% if field.type %}
{{ field.type }}
{% endif %}
</td>
<td class="px-3 py-2 text-sm text-gray-500 w-7/12">
<div class="text-gray-400">{{ field.description }}</div>
<div class="text-gray-400">{{ field.description or "No description" }}</div>
{# TODO add format information #}
</td>

Expand Down
Loading

0 comments on commit 91639dc

Please sign in to comment.