42 lines
1.3 KiB
HTML
42 lines
1.3 KiB
HTML
@use crate::{Collection, Entry, State};
|
|
@use super::{layout_html, image_html, return_home_html};
|
|
@use uuid::Uuid;
|
|
|
|
@(id: Uuid, collection: &Collection, entries: &[(Uuid, Entry)], state: &State)
|
|
|
|
@:layout_html(state, &collection.title, Some(&collection.description), {
|
|
<meta property="twitter:card" content="summary_large_image" />
|
|
<meta property="twitter:url" content="@state.public_collection_path(id)" />
|
|
<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)" />
|
|
<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" />
|
|
}
|
|
}
|
|
}, {
|
|
<section>
|
|
<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">
|
|
<article>
|
|
@:image_html(*id, entry, state)
|
|
</article>
|
|
</li>
|
|
}
|
|
</ul>
|
|
</section>
|
|
@:return_home_html(state)
|
|
})
|