profile.html
HTML document, ASCII text
1
{% extends "default.html" %}
2
3
{% block title %}{{ user.formatted_name }}'s profile | {{ site_name }}{% endblock %}
4
5
{% block content %}
6
<x-frame style="--width: 768px" class="vbox">
7
<h1>{{ user.formatted_name }}</h1>
8
<p>Joined: {{ user.joined_timestamp }}</p>
9
<h2>Pictures</h2>
10
<ul class="thumbnail-list">
11
{% for resource in user.pictures %}
12
<li>
13
<a href="/picture/{{ resource.id }}">
14
<div class="annotation-zone">
15
<img src="/raw/picture/{{ resource.id }}" alt="{{ resource.title }}">
16
{% for region in resource.regions %}
17
{% if region.json.type == "bbox" %}
18
<svg class="shape-container" viewBox="0 0 {{ resource.width }} {{ resource.height }}">
19
<rect x="{{ region.json.shape.x * resource.width }}"
20
y="{{ region.json.shape.y * resource.height }}"
21
width="{{ region.json.shape.w * resource.width }}"
22
height="{{ region.json.shape.h * resource.height }}"
23
fill="none" class="shape-bbox shape"
24
></rect>
25
</svg>
26
{% elif region.json.type == "polygon" %}
27
<svg class="shape-container" viewBox="0 0 {{ resource.width }} {{ resource.height }}">
28
<polygon points="{% for point in region.json.shape %}{{ point.x * resource.width }},{{ point.y * resource.height }} {% endfor %}" fill="none" class="shape-polygon shape"></polygon>
29
</svg>
30
{% elif region.json.type == "polyline" %}
31
<svg class="shape-container" viewBox="0 0 {{ resource.width }} {{ resource.height }}">
32
<polyline points="{% for point in region.json.shape %}{{ point.x * resource.width }},{{ point.y * resource.height }} {% endfor %}" fill="none" class="shape-polyline shape"></polyline>
33
</svg>
34
{% elif region.json.type == "point" %}
35
<svg class="shape-container" viewBox="0 0 {{ resource.width }} {{ resource.height }}">
36
<circle cx="{{ region.json.shape.x * resource.width }}" cy="{{ region.json.shape.y * resource.height }}" r="0" fill="none" class="shape-point shape"></circle>
37
</svg>
38
{% endif %}
39
{% endfor %}
40
</div>
41
<div class="list-detail">
42
{{ resource.title }}
43
</div>
44
</a>
45
</li>
46
{% endfor %}
47
</ul>
48
</x-frame>
49
{% endblock %}
50