picture-annotation.html
HTML document, ASCII text
1{% extends "default.html" %} 2{% block title %}Annotating picture {{ resource.title }} | {{ site_name }}{% endblock %} 3{% block content %} 4<style> 5py-script { 6display: none; 7} 8/* Full PyScript style is too much, but we still need to hide the Python code */ 9</style> 10<script type="module" src="https://pyscript.net/releases/2024.8.2/core.js"></script> 11 12<x-frame style="--width: 768px"> 13<h1>Annotating: {{ resource.title }}</h1> 14<p id="annotation-helper-message">Please wait for Python to load...</p> 15</x-frame> 16<x-frame id="main-area"> 17<x-buttonbox id="shape-selector"> 18<button class="button-flat" title="selection" id="select"> 19<iconify-icon icon="mdi:cursor-default"></iconify-icon> 20</button> 21<button class="button-flat" title="rectangle" id="shape-bbox"> 22<iconify-icon icon="mdi:square"></iconify-icon> 23</button> 24<button class="button-flat" title="polygon" id="shape-polygon"> 25<iconify-icon icon="mdi:pentagon"></iconify-icon> 26</button> 27<button class="button-flat" title="polyline" id="shape-polyline"> 28<iconify-icon icon="mdi:graph-line-variant"></iconify-icon> 29</button> 30<button class="button-flat" title="point" id="shape-point"> 31<iconify-icon icon="mdi:crosshairs-gps"></iconify-icon> 32</button> 33</x-buttonbox> 34<div id="annotation-zone"> 35<img id="annotation-image" src="/raw/picture/{{ resource.id }}" alt=""> 36<div id="annotation-ruler-vertical" class="annotation-ruler"></div> 37<div id="annotation-ruler-horizontal" class="annotation-ruler"></div> 38<div id="annotation-ruler-vertical-secondary" class="annotation-ruler"></div> 39<div id="annotation-ruler-horizontal-secondary" class="annotation-ruler"></div> 40</div> 41<x-buttonbox style="display: none;" id="shape-options"> 42<button class="button-flat" title="cancel" id="annotation-cancel"> 43<iconify-icon icon="mdi:close"></iconify-icon> 44</button> 45<button class="button-flat" title="apply" id="annotation-confirm"> 46<iconify-icon icon="mdi:check"></iconify-icon> 47</button> 48<button class="button-flat" title="remove last point" id="annotation-backspace"> 49<iconify-icon icon="mdi:backspace"></iconify-icon> 50</button> 51<button class="button-flat" title="delete shape" id="annotation-delete"> 52<iconify-icon icon="mdi:delete"></iconify-icon> 53</button> 54<button class="button-flat" title="select previous shape" id="annotation-previous"> 55<iconify-icon icon="mdi:chevron-left"></iconify-icon> 56</button> 57<button class="button-flat" title="select next shape" id="annotation-next"> 58<iconify-icon icon="mdi:chevron-right"></iconify-icon> 59</button> 60<div class="flexible-space"></div> 61<button id="annotation-save"> 62Save 63</button> 64</x-buttonbox> 65<x-vbox id="object-types" style="--gap-box: 0.25rem; --padding-box: 1rem;"> 66</x-vbox> 67</x-frame> 68<input type="hidden" id="resource-id" name="resource-id" value="{{ resource.id }}"> 69<script type="mpy" src="/static/picture-annotation.py"></script> 70{% endblock %} 71