roundabout,
created on Friday, 14 February 2025, 20:23:57 (1739564637),
received on Friday, 14 February 2025, 20:39:34 (1739565574)
Author identity: vlad <vlad.muntoiu@gmail.com>
68e52a01c22a670b7a75faef8f990c09da7ec3e6
app.py
@@ -344,8 +344,12 @@ with app.app_context():
@app.route("/")
def index():
return flask.render_template("home.html", resources=PictureResource.query.filter_by(replaced_by=None).order_by(
db.func.random()).limit(10).all())
return flask.render_template(
"home.html",
random_resources=PictureResource.query.filter_by(replaced_by=None).order_by(db.func.random()).limit(10).all(),
recent_resources=PictureResource.query.filter_by(replaced_by=None).order_by(PictureResource.timestamp.desc()).limit(10).all(),
recent_unannotated_resources=PictureResource.query.filter_by(replaced_by=None).filter(~PictureResource.regions.any()).order_by(PictureResource.timestamp.desc()).limit(10).all(),
)
@app.route("/info/")
static/efficient-ui
@@ -1 +1 @@
Subproject commit e4a04ff48c746340fe1568e6b2b8efc2040f30c3
Subproject commit 17cba7a0b608f31f6ab33b6abe85c067ad6d1467
static/style.css
@@ -427,6 +427,7 @@ small {
.thumbnail-list > li > .list-more {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
align-items: center;
padding: 8px;
@@ -890,3 +891,20 @@ body.fixed-content-area > main {
#object-types {
cursor: auto;
}
.thumbnail-list-scroll {
display: flex;
flex-direction: row;
overflow-x: auto;
overflow-y: hidden;
align-items: stretch;
padding: 16px;
}
.thumbnail-list-scroll > li {
flex: 0 0 192px;
}
.thumbnail-list-scroll > li > a .annotation-zone:hover {
transform: none;
}
templates/gallery.html
@@ -7,7 +7,7 @@
{% block content %}
<div id="picture-view">
<x-frame id="picture-actions">
<ul class="action-list">
<menu class="action-list">
<li><a href="/gallery/{{ gallery.id }}/users">
<iconify-icon icon="mdi:user"></iconify-icon>Users
</a></li>
@@ -24,7 +24,7 @@
<a href="/gallery/{{ gallery.id }}/delete">Confirm deletion</a>
</details></li>
{% endif %}
</ul>
</menu>
</x-frame>
<x-frame style="--width: 768px" class="vbox">
<h1>{{ gallery.title }}</h1>
@@ -57,6 +57,7 @@
</div>
</a>
<div class="list-more">
<span class="picture-author">by <a href="/profile/{{ picture.resource.author.username }}">{{ picture.resource.author.formatted_name }}</a></span>
<form action="/gallery/{{ gallery.id }}/remove-picture" method="POST">
<input type="hidden" name="picture_id" value="{{ picture.resource.id }}">
{% if have_permission %}
templates/graphical-query-pictures-results.html
@@ -23,6 +23,9 @@
{{ resource.title }}
</div>
</a>
<div class="list-more">
<span class="picture-author">by <a href="/profile/{{ resource.author.username }}">{{ resource.author.formatted_name }}</a></span>
</div>
</li>
{% endfor %}
</ul>
templates/home.html
@@ -9,15 +9,62 @@
<p>
Free/libre/open image data for machine learning, computer vision, data science, research, and more.
</p>
<p>Some actions you can do:</p>
<ul>
<li><a href="/upload">Upload a picture (but you must log in first)</a></li>
<li><a href="/object/">List of objects</a></li>
<li><a href="/query-pictures">Query the dataset</a></li>
</ul>
<p>
Easy to contribute for everyone, powerful to get data for those who need it.
</p>
<menu class="action-list">
<li><a href="/upload">
<iconify-icon icon="mdi:camera"></iconify-icon>
Upload a picture
</a></li>
<li><a href="/object/">
<iconify-icon icon="mdi:flower"></iconify-icon>
Browse objects
</a></li>
<li><a href="/query-pictures">
<iconify-icon icon="mdi:search"></iconify-icon>
Run a query
</a></li>
<li><a href="/query-pictures">
<iconify-icon icon="mdi:help-circle"></iconify-icon>
Help
</a></li>
</menu>
<h2>Random pictures</h2>
<ul class="thumbnail-list">
{% for resource in resources %}
<ul class="thumbnail-list thumbnail-list-scroll">
{% for resource in random_resources %}
<li>
<a href="/picture/{{ resource.id }}">
{{ annotation_display.annotation_display(resource) }}
<div class="list-detail">
{{ resource.title }}
</div>
</a>
<div class="list-more">
<span class="picture-author">by <a href="/profile/{{ resource.author.username }}">{{ resource.author.formatted_name }}</a></span>
</div>
</li>
{% endfor %}
</ul>
<h2>Latest unannotated pictures</h2>
<ul class="thumbnail-list thumbnail-list-scroll">
{% for resource in recent_unannotated_resources %}
<li>
<a href="/picture/{{ resource.id }}">
{{ annotation_display.annotation_display(resource) }}
<div class="list-detail">
{{ resource.title }}
</div>
</a>
<div class="list-more">
<span class="picture-author">by <a href="/profile/{{ resource.author.username }}">{{ resource.author.formatted_name }}</a></span>
</div>
</li>
{% endfor %}
</ul>
<h2>Latest pictures</h2>
<ul class="thumbnail-list thumbnail-list-scroll">
{% for resource in recent_resources %}
<li>
<a href="/picture/{{ resource.id }}">
{{ annotation_display.annotation_display(resource) }}
@@ -25,6 +72,9 @@
{{ resource.title }}
</div>
</a>
<div class="list-more">
<span class="picture-author">by <a href="/profile/{{ resource.author.username }}">{{ resource.author.formatted_name }}</a></span>
</div>
</li>
{% endfor %}
</ul>
templates/object.html
@@ -40,6 +40,9 @@
{{ resource.title }}
</div>
</a>
<div class="list-more">
<span class="picture-author">by <a href="/profile/{{ resource.author.username }}">{{ resource.author.formatted_name }}</a></span>
</div>
</li>
{% endfor %}
</ul>
templates/picture.html
@@ -13,7 +13,7 @@
{% block content %}
<div id="picture-view">
<x-frame id="picture-actions">
<ul class="action-list">
<menu class="action-list">
<li><a href="/raw/picture/{{ resource.id }}" download="GigadataPicture_{{ resource.id }}{{ file_extension }}">
<iconify-icon icon="mdi:download"></iconify-icon>Download
</a></li>
@@ -64,7 +64,7 @@
<a href="/picture/{{ resource.id }}/delete">Confirm deletion</a>
</details></li>
{% endif %}
</ul>
</menu>
</x-frame>
<x-frame style="--width: 768px">
<h1>{{ resource.title }}</h1>
@@ -270,6 +270,7 @@
</div>
</a>
<div class="list-more">
<span class="picture-author">by <a href="/profile/{{ copy.author.username }}">{{ copy.author.formatted_name }}</a></span>
<form method="POST" action="/picture/{{ copy.id }}/mark-replacement">
<button type="submit">Designate replacement</button>
</form>