Skip to content

Commit

Permalink
Merge pull request #398 from nexB/rest-template
Browse files Browse the repository at this point in the history
Add mini Rest UI template
  • Loading branch information
pombredanne authored Jun 3, 2024
2 parents 1a1037b + 7140056 commit 8d95a40
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Changelog
Next Release
----------------

- Improve web template for API web page https://github.com/nexB/purldb/issues/132


v5.0.0
---------
Expand Down
32 changes: 32 additions & 0 deletions packagedb/templates/rest_framework/api.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{% extends "rest_framework/base.html" %}

{% block style %}
{{ block.super }}
<style>
body {background: none;}
.navbar {background: #363636; border-top: 3px solid #f7bf3c;}
.navbar-inverse .navbar-brand {color: white;}
.nexb-orange
.booleanwidget {width: 90%;}
</style>
{% endblock %}

{% block title %}
PurlDB REST API
{% endblock %}

{% block branding %}
<span class="navbar-brand">
PurlDB REST API
</span>
{% endblock %}

{% block userlinks %}
<li class="navbar-link">
<a href="/api/docs/">API Documentation</a>
</li>
<li class="navbar-link">
<a href="https://purldb.readthedocs.io">PurlDB Documentation</a>
</li>
{{ block.super }}
{% endblock %}

0 comments on commit 8d95a40

Please sign in to comment.