pict-rs-aggregator/templates/view_collection.rs.html

42 lines
1.3 KiB
HTML
Raw Permalink Normal View History

@use crate::{Collection, Entry, State};
2023-01-29 19:51:04 +00:00
@use super::{layout_html, image_html, return_home_html};
2020-12-08 21:59:55 +00:00
@use uuid::Uuid;
@(id: Uuid, collection: &Collection, entries: &[(Uuid, Entry)], state: &State)
2020-12-08 21:59:55 +00:00
2023-01-29 19:51:04 +00:00
@:layout_html(state, &collection.title, Some(&collection.description), {
2022-06-06 21:42:07 +00:00
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="@state.public_collection_path(id)" />
2022-05-27 23:27:44 +00:00
<meta property="og:url" content="@state.public_collection_path(id)" />
@for (_, entry) in entries {
@if let Some(filename) = entry.filename() {
<meta property="og:image" content="@state.image_path(filename)" />
2022-06-06 21:42:07 +00:00
<meta property="og:image:secure_url" content="@state.image_path(filename)" />
<meta property="og:image:alt" content="Image: @filename" />
<meta property="twitter:image" content="@state.image_path(filename)" />
<meta property="twitter:image:alt" content="Image: @filename" />
2022-05-27 23:27:44 +00:00
}
}
2020-12-08 23:32:37 +00:00
}, {
2020-12-08 21:59:55 +00:00
<section>
2022-05-27 23:27:44 +00:00
<article>
<div class="content-group">
<h3>@collection.title</h3>
</div>
<div class="content-group">
<p class="subtitle">@collection.description</p>
</div>
</article>
<ul>
@for (id, entry) in entries {
<li class="content-group even" id="@id">
2022-05-27 23:27:44 +00:00
<article>
@:image_html(*id, entry, state)
2022-05-27 23:27:44 +00:00
</article>
</li>
}
</ul>
2020-12-08 21:59:55 +00:00
</section>
2023-01-29 19:51:04 +00:00
@:return_home_html(state)
2020-12-08 21:59:55 +00:00
})