album/templates/groups.rs.html
2017-08-03 19:59:21 +02:00

20 lines
438 B
HTML

@use ::{Group, Link};
@use nickel::Request;
@use templates::page_base;
@(req: &Request, title: &str, lpath: &[Link], groups: &[Group])
@:page_base(req, title, lpath, {
<div class="group">
@if groups.is_empty() {
<p>Inga bilder.</p>
}
@for g in groups {
<div class="item"><h2>@g.title</h2>
<p><a href="@g.url"><img src="/img/@g.photo.id-s.jpg"></a></p>
<p>@g.count pictures</p>
</div>
}
</div>
})