94 lines
2.2 KiB
HTML
94 lines
2.2 KiB
HTML
|
@use crate::PictrsPage;
|
||
|
@use crate::templates::statics::index_css;
|
||
|
|
||
|
@(page: &PictrsPage)
|
||
|
|
||
|
<!doctype html>
|
||
|
<html lang="en">
|
||
|
|
||
|
<head>
|
||
|
<title>pict-rs admin</title>
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
|
<meta charset="utf-8" />
|
||
|
<link rel="stylesheet" type="text/css" href="/static/@index_css.name" />
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
@if page.prev_link().is_some() || page.next_link().is_some() {
|
||
|
<nav>
|
||
|
@if let Some(prev) = page.prev_link() {
|
||
|
<a href="@prev">Previous Page</a>
|
||
|
}
|
||
|
@if let Some(next) = page.next_link() {
|
||
|
<a href="@next">Next Page</a>
|
||
|
}
|
||
|
</nav>
|
||
|
}
|
||
|
|
||
|
<section>
|
||
|
@if page.hashes.is_empty() {
|
||
|
<article>
|
||
|
<div class="border">
|
||
|
<div class="metadata">
|
||
|
<p>Looks like there are no images to display</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</article>
|
||
|
}
|
||
|
@for hash in &page.hashes {
|
||
|
<article>
|
||
|
<div class="border">
|
||
|
@if let Some(src) = hash.image_link() {
|
||
|
<div class="image-box">
|
||
|
<img src="@src" />
|
||
|
</div>
|
||
|
}
|
||
|
<div class="metadata">
|
||
|
<div class="field">
|
||
|
<h4>hex:</h4>
|
||
|
<p class="hex">@hash.hex</p>
|
||
|
</div>
|
||
|
<div class="field">
|
||
|
<h4>aliases:</h4>
|
||
|
<ul>
|
||
|
@for alias in &hash.aliases {
|
||
|
<li>@alias</li>
|
||
|
}
|
||
|
</ul>
|
||
|
</div>
|
||
|
@if let Some(details) = &hash.details {
|
||
|
<div class="field">
|
||
|
<h4>width:</h4>
|
||
|
<p>@details.width</p>
|
||
|
</div>
|
||
|
<div class="field">
|
||
|
<h4>height:</h4>
|
||
|
<p>@details.height</p>
|
||
|
</div>
|
||
|
@if let Some(frames) = details.frames {
|
||
|
<div class="field">
|
||
|
<h4>frames:</h4>
|
||
|
<p>@frames</p>
|
||
|
</div>
|
||
|
}
|
||
|
<div class="field">
|
||
|
<h4>content_type:</h4>
|
||
|
<p>@details.content_type</p>
|
||
|
</div>
|
||
|
<div class="field">
|
||
|
<h4>created_at:</h4>
|
||
|
<p>@details.created_at</p>
|
||
|
</div>
|
||
|
}
|
||
|
@if let Some(link) = page.purge_link(hash) {
|
||
|
<a href="@link">Purge Image</a>
|
||
|
}
|
||
|
</div>
|
||
|
</div>
|
||
|
</article>
|
||
|
}
|
||
|
</section>
|
||
|
</body>
|
||
|
|
||
|
</html>
|