pict-rs-proxy/templates/images.rs.html
Aode (Lion) 903134c7c7
All checks were successful
continuous-integration/drone/push Build is passing
Use pict-rs's background uploading feature
2022-05-02 20:38:46 -05:00

60 lines
1.5 KiB
HTML

@use super::{layout_html, return_home_html, statics::images_css};
@use crate::{Images, FileType};
@(images: Images)
@:layout_html(images.message(), None, {
<link rel="stylesheet" href="@crate::statics(images_css.name)" type="text/css" />
}, {
<section>
@if let Some(images) = images.files() {
<article>
<h3>Your images have been uploaded</h3>
</article>
<article>
<p class="subtitle">Do not lose these links</p>
</article>
<ul>
@for image in images {
<li>
<article>
<div class="imagebox">
<picture>
<source type="image/webp" srcset="@image.thumb(800, FileType::Webp)" />
<img src="@image.thumb(800, FileType::Jpg)" alt="@image.filename()" title="@image.filename()" />
</picture>
</div>
<p>
Link:<br />
<a href="@image.view(None)" target="_blank" rel="noopener noreferrer">
@image.view(None)
</a>
</p>
<p>
Thumbnails:<br />
<a href="@image.thumbnails()" target="_blank" rel="noopener noreferrer">
@image.thumbnails()
</a>
</p>
<p>
Delete link:<br />
<a href="@image.delete()" target="_blank" rel="noopener noreferrer">
@image.delete()
</a>
</p>
</article>
</li>
}
</ul>
} else {
<article>
<h3>There was an error uploading your images</h3>
</article>
<article>
<p>@images.msg()</p>
</article>
}
@:return_home_html()
</section>
})