xppl/app/templates/annotations.html

66 lines
2.7 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>
2018-06-13 10:20:53 +02:00
<a href="{{ url_for('annotations_pdf') }}" style="color:#ff3300;">Get as PDF</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/search_annot" style="color:#ff3300;"> Search</a><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] %}
{%for book in books%}
2018-06-13 20:04:54 +02:00
{%if book.file == row.uri%}
2018-06-13 12:27:31 +02:00
<p align="right" style="font-family:archivo narrow;font-size:10px;">Book</p>
<a href="books/{{book.id}}"><p align="right" style="font-family:archivo narrow;font-size:18px;">{{book.title}}</p></a><br>
2018-06-12 19:55:56 +02:00
{% 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-13 10:20:53 +02:00
<p style="font-family:archivo narrow;font-size:10px;">Extract</p>
2018-06-12 19:55:56 +02:00
<div style="font-family:archivo narrow;font-size:18px;"><i>"{{row.target[0].selector[2].exact}}"</i></div><br>
2018-06-13 10:20:53 +02:00
<p style="font-family:archivo narrow;font-size:10px;color:#ff3300;">Annotation</p>
2018-06-12 19:55:56 +02:00
{%if 'https://www.youtube.com' in row.text %}
<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 %}
<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-13 10:27:26 +02:00
<p style="font-family:archivo narrow;font-size:10px;">Extract</p>
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>
2018-06-13 10:27:26 +02:00
<p style="font-family:archivo narrow;font-size:10px;color:#ff3300;">Annotation</p>
2018-06-11 13:32:18 +02:00
{%if 'https://www.youtube.com'in row.text %}
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-13 10:20:53 +02:00
{%elif '.mp3' in row.text %}
<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>
{% 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 %}