xppl/app/templates/annotations.html

69 lines
2.4 KiB
HTML
Raw Normal View History

2018-06-12 19:55:56 +02:00
{% extends 'base.html' %}
2018-06-03 15:25:33 +02:00
{% block main %}
2018-06-12 19:55:56 +02:00
<h1 class="header">Annotations of XPPL</h1>
<nav><a href="{{ url_for('annotations_pdf') }}">Get as PDF</a></nav><nav><a href="/search_annot">search</a></nav><br><br><br><br><br><br><br><br>
2018-06-03 15:25:33 +02:00
2018-06-06 18:54:07 +02:00
2018-06-12 19:55:56 +02:00
{% for row in annot.rows %}
{% if 'selector' in row.target[0] %}
2018-06-06 18:54:07 +02:00
2018-06-12 19:55:56 +02:00
{%for book in books%}
{%if book.file == row.uri%}
<a href="books/{{book.id}}"><p align="right" style="font-family:archivo narrow;font-size:12px;">{{book.title}}</p></a><br>
{% endif %}
{% endfor %}
2018-06-06 18:54:07 +02:00
2018-06-03 15:25:33 +02:00
2018-06-11 13:32:18 +02:00
{% if row.target[0].selector|length > 2%}
2018-06-12 19:55:56 +02:00
<p style="font-family:archivo narrow;font-size:8px;">Extracts:</p>
<div style="font-family:archivo narrow;font-size:18px;"><i>"{{row.target[0].selector[2].exact}}"</i></div><br>
<p style="font-family:archivo narrow;font-size:8px;color:#ff3300;">Annotations:</p>
{%if 'https://www.youtube.com' in row.text %}
2018-06-11 13:32:18 +02:00
<!-- <embed src="{{row.text}}" width="50%"></embed> -->
2018-06-12 19:55:56 +02:00
<a style="font-family:archivo narrow;font-size:18px;color:#ff3300;" href="{{row.text}}">{{row.text}}</a><br>
2018-06-11 13:32:18 +02:00
{%elif '.jpg' in row.text%}
<img src="{{row.text}}" alt="{{row.document.title}}" width="400">
2018-06-12 19:55:56 +02:00
{%elif '.mp3' in row.text %}
<!-- <embed src="{{row.text}}" width="50%"></embed> -->
<a style="font-family:archivo narrow;font-size:18px;color:#ff3300;" href="{{row.text}}">{{row.text}}</a><br>
2018-06-11 13:32:18 +02:00
{%else%}
2018-06-12 19:55:56 +02:00
<div style="font-family:archivo narrow;font-size:18px;color:#ff3300;">{{row.text}}</div><br>
2018-06-11 13:32:18 +02:00
{% endif %}
<hr>
{%else%}
2018-06-12 19:55:56 +02:00
<div style="font-family:archivo narrow;font-size:18px;">
2018-06-11 13:32:18 +02:00
<i>"{{row.target[0].selector[1].exact}}"</i></div><br>
{%if 'https://www.youtube.com'in row.text %}
<!-- <embed src="{{row.text}}" width="50%"></embed> -->
2018-06-12 19:55:56 +02:00
<a style="font-family:archivo narrow;font-size:18px;color:#ff3300;" href="{{row.text}}">{{row.text}}</a><br>
2018-06-11 13:32:18 +02:00
{%elif '.jpg' in row.text%}
<img src="{{row.text}}" alt="{{row.document.title}}" width="400">
{%else%}
2018-06-12 19:55:56 +02:00
<div style="font-family:archivo narrow;font-size:18px;color:#ff3300;">{{row.text}}</div><br>
2018-06-11 13:32:18 +02:00
{% endif %}
<hr>
{% endif %}
{%else%}
2018-06-12 19:55:56 +02:00
<p style="font-family:archivo narrow;font-size:18px;color:#ff3300;">{{row.text}}</p><br>
2018-06-11 13:32:18 +02:00
<hr><br>
{% endif %}
2018-06-06 18:54:07 +02:00
{% endfor %}
2018-06-03 15:25:33 +02:00
2018-06-11 13:32:18 +02:00
<!-- dump of the API json annotations -->
<!-- dump:
2018-06-06 18:54:07 +02:00
<pre>
{{dump}}
2018-06-12 19:55:56 +02:00
</pre> -->
2018-06-03 15:25:33 +02:00
2018-06-11 13:32:18 +02:00
{% endblock %}
2018-06-03 15:25:33 +02:00