mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Refactor templates for better top nav customization, refs #540
This commit is contained in:
parent
16fdabda97
commit
a18e0964ec
7 changed files with 69 additions and 29 deletions
|
|
@ -14,33 +14,15 @@
|
|||
</head>
|
||||
<body class="{% block body_class %}{% endblock %}">
|
||||
|
||||
<nav class="hd">{% block nav %}{% endblock %}</nav>
|
||||
|
||||
<div class="bd">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
<div class="ft">
|
||||
Powered by <a href="https://github.com/simonw/datasette" title="Datasette v{{ datasette_version }}">Datasette</a>
|
||||
{% if query_ms %}· Query took {{ query_ms|round(3) }}ms{% endif %}
|
||||
{% if metadata %}
|
||||
{% if metadata.license or metadata.license_url %}· Data license:
|
||||
{% if metadata.license_url %}
|
||||
<a href="{{ metadata.license_url }}">{{ metadata.license or metadata.license_url }}</a>
|
||||
{% else %}
|
||||
{{ metadata.license }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if metadata.source or metadata.source_url %}·
|
||||
Data source: {% if metadata.source_url %}
|
||||
<a href="{{ metadata.source_url }}">
|
||||
{% endif %}{{ metadata.source or metadata.source_url }}{% if metadata.source_url %}</a>{% endif %}
|
||||
{% endif %}
|
||||
{% if metadata.about or metadata.about_url %}·
|
||||
About: {% if metadata.about_url %}
|
||||
<a href="{{ metadata.about_url }}">
|
||||
{% endif %}{{ metadata.about or metadata.about_url }}{% if metadata.about_url %}</a>{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="ft">{% block footer %}{% include "_footer.html" %}{% endblock %}</div>
|
||||
|
||||
{% for body_script in body_scripts %}
|
||||
<script>{{ body_script }}</script>
|
||||
{% endfor %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue