71 lines
2.7 KiB
HTML
71 lines
2.7 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>
|
|
})
|