fc1ed81561
Use it to calculate width and height of small images in lists. Since the old database should be migratable to the new, the width and height fields are nullable. I aim to make them not nullable later, after all images in the database has got width and height.
8 lines
336 B
HTML
8 lines
336 B
HTML
@use server::PhotoLink;
|
|
|
|
@(photo: &PhotoLink)
|
|
<div class="item">@if let Some(ref title) = photo.title {<h2>@title</h2>}
|
|
<a href="@photo.href"><img src="/img/@photo.id-s.jpg" @if let Some(s) = photo.size {width="@s.0" height="@s.1"} alt="Photo @photo.id"></a>
|
|
@if let Some(ref d) = photo.lable {<span class="lable">@d</span>}
|
|
</div>
|