-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add twitter and relations highlight pages (#552)
* Add highlights * Update and add routes * Update ui.py
- Loading branch information
Showing
4 changed files
with
86 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{% extends "base.html" %} | ||
{% import "macros.html" as utils %} | ||
|
||
{% block title %}{{ config.METAREGISTRY_TITLE }} - Relations{% endblock %} | ||
|
||
{% macro render_dict(ddd) -%} | ||
<dl class="row"> | ||
{% for k, v in ddd.items() %} | ||
<dt class="col-3" style="text-align: right">{{ k }} | ||
{% if k not in manager.registry %} | ||
<i class="far fa-question-circle" style="color: red;"></i> | ||
{% endif %} | ||
</dt> | ||
<dd class="col-9"> | ||
{% for prefix in v %} | ||
{{ utils.render_prefix(prefix, classes="badge badge-pill badge-primary") }} | ||
{% endfor %} | ||
</dd> | ||
{% endfor %} | ||
</dl> | ||
{% endmacro %} | ||
|
||
{% block container %} | ||
<div class="card"> | ||
<div class="card-header"> | ||
Relations | ||
</div> | ||
<div class="card-body"> | ||
<p>This page provides an overview on canonical/part of/provides relationships</p> | ||
<h3>Canonical</h3> | ||
{{ render_dict(manager.canonical_for) }} | ||
<h3>Provided By</h3> | ||
{{ render_dict(manager.provided_by) }} | ||
<h3>Has Parts</h3> | ||
{{ render_dict(manager.has_parts) }} | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{% extends "base.html" %} | ||
{% import "macros.html" as utils %} | ||
|
||
{% block title %}{{ config.METAREGISTRY_TITLE }} - Twitter{% endblock %} | ||
|
||
{% block container %} | ||
<div class="card"> | ||
<div class="card-header"> | ||
</div> | ||
<table class="table"> | ||
<thead></thead> | ||
<tbody> | ||
{% for handle, resources in twitters.items() %} | ||
<tr> | ||
<td><a href="https://twitter.com/{{ handle }}">@{{ handle }}</a></td> | ||
<td> | ||
{% for resource in resources %} | ||
{{ utils.render_prefix(resource.prefix, classes="badge badge-pill badge-primary") }} | ||
{% endfor %} | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
|
||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters