diff options
Diffstat (limited to 'python/fatcat_web/templates/refs_macros.html')
-rw-r--r-- | python/fatcat_web/templates/refs_macros.html | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/python/fatcat_web/templates/refs_macros.html b/python/fatcat_web/templates/refs_macros.html index 405aca73..ba4d18ad 100644 --- a/python/fatcat_web/templates/refs_macros.html +++ b/python/fatcat_web/templates/refs_macros.html @@ -35,12 +35,26 @@ <td class=""> {% if release %} {{ entity_macros.release_summary(release) }} - {% elif row.ref.target_unstructured %} + {% elif direction == "in" and row.ref.source_wikipedia_article %} + {% set wiki_lang = row.ref.source_wikipedia_article.split(':')[0] %} + {% set wiki_article = ':'.join(row.ref.source_wikipedia_article.split(':')[1:]) %} + <b> + <a href="https://{{ wiki_lang }}.wikipedia.org/wiki/{{ wiki_article.replace(' ', '_') }}"> + {{ wiki_article }} + </a> + [wikipedia] + </b> + <br> + <span style="color:green;">lang:{{ wiki_lang }}</span> + <a href="/wikipedia/{{ wiki_lang }}:{{ wiki_article.replace(' ', '_') }}/refs-out" style="color:green;">[references]</a> + {% elif direction == "out" and row.ref.target_unstructured %} <code>{{ row.ref.target_unstructured }}</code> {% if row.ref.target_openlibrary_work %} - <br><a href="https://openlibrary.org/{{ row.ref.target_openlibrary_work }}" style="color:green;">openlibrary:{{ row.ref.target_openlibrary_work }}</a> + <br> + <a href="https://openlibrary.org/{{ row.ref.target_openlibrary_work }}" style="color:green;">openlibrary:{{ row.ref.target_openlibrary_work }}</a> + <a href="/openlibrary/{{ row.ref.target_openlibrary_work}}/refs-in" style="color:green;">[cited-by]</a> {% endif %} - {% elif row.ref.target_csl %} + {% elif direction == "in" and row.ref.target_csl %} {{ entity_macros.csl_summary(row.ref.target_csl) }} {% else %} <i>blank</i> |