{% set entity = creator %}
{% import "entity_macros.html" as entity_macros %}
{% extends "base.html" %}

{% block fullbody %}

<div class="ui stackable mobile reversed grid centered">
<div class="one wide column"></div>
<div class="fifteen wide column">
  <h1 class="ui header">{{ creator.display_name }}
  <span class="sub header"><code>creator {{ creator.ident }}</code></span></h1>
</div>
</div>

<div class="ui stackable mobile reversed grid centered">
<div class="one wide column"></div>
<div class="ten wide column" style="font-size: 16px;">

{% if creator.given_name or creator.surname %}
  <table class="ui definition single line fixed compact small unstackable table">
  <tbody>
    <tr><td class="two wide right aligned">Given name</td>
        <td class="seven wide">
          {% if creator.given_name != None %}{{ creator.given_name}}{% else %}<i>None or unknown</i>{% endif %}
        </td>
    <tr><td class="two wide right aligned">Surname</td>
        <td class="seven wide">
          {% if creator.surname != None %}{{ creator.surname }}{% else %}<i>None or unknown</i>{% endif %}
        </td>
  </tbody>
  </table>
{% endif %}

{% if entity.extra != None %}
  <h3>Extra Metadata (raw JSON)</h3>
  {{ entity_macros.extra_metadata(entity.extra) }}
{% endif %}

<br>
<h3>Releases</h3>
{% if releases != [] %}
  <p>This creator has contributed to:
  {{ entity_macros.release_list(releases) }}
{% else %}
This creator has not contributed to any releases.
{% endif %}

</div>
<div class="five wide column">
<div class="ui segment top attached">

{% if creator.orcid or creator.wikidata_qid %}
  {% if creator.orcid %}
    <b>ORCID<sup><a href="https://en.wikipedia.org/wiki/Orcid">?</a></sup></b>
      &nbsp;<a href="https://orcid.org/{{creator.orcid}}"><code>{{ creator.orcid }}</code></a><br>
  {% endif %}
  {% if creator.wikidata_qid %}
    <b>Wikidata</b> <a href="https://www.wikidata.org/wiki/{{ creator.wikidata_qid }}">
      &nbsp;<code>{{ creator.wikidata_qid }}</code></a><br>
  {% endif %}
</div><div class="ui segment attached">
{% endif %}

<b>Lookup Links</b>
<br><a href="https://www.wikidata.org/w/index.php?search=&search={{ creator.display_name|urlencode }}">wikidata.org</a>
<br><a href="https://viaf.org/viaf/search?query=local.personalNames%20all%20%22{{ creator.display_name|urlencode }}">VIAF</a>
<br><a href="http://dblp.uni-trier.de/search?q={{ creator.display_name|urlencode }}">dblp</a> (CS)
<br><a href="https://scholar.google.com/scholar?q={{ creator.display_name|urlencode }}">Google Scholar</a>
</div>

{{ entity_macros.fatcat_bits(entity, "creator", "") }}

</div>
</div>

{% endblock %}