summaryrefslogtreecommitdiff
path: root/Pages/Gallery.razor
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2023-09-02 11:18:45 +1000
committerJake Mannens <jake@asger.xyz>2023-09-02 11:18:45 +1000
commitd7f0c9365f1c0954de4938c44f7988996a3ca6f7 (patch)
tree0a300d3d226e248399f0ef9dbea6d9d0b1335aa6 /Pages/Gallery.razor
parent693357f3e35e4141f17c55e182e89f05ae8d0ecb (diff)
Improved page layouts
Diffstat (limited to 'Pages/Gallery.razor')
-rw-r--r--Pages/Gallery.razor18
1 files changed, 10 insertions, 8 deletions
diff --git a/Pages/Gallery.razor b/Pages/Gallery.razor
index b94c694..fafcb44 100644
--- a/Pages/Gallery.razor
+++ b/Pages/Gallery.razor
@@ -10,14 +10,16 @@
<link rel="stylesheet" href="@(nameof(HyperBooru)).styles.css"/>
-@foreach(var media in Media) {
- // Precalculate thumbnail size to help the browser
- // lay out the images during initial page load
- int width = media.Width * 200 / media.Height;
- <a href="/ViewMedia?m=@(media.Guid)">
- <img src="/media/thumb/@(media.Guid)?h=200" width=@width height="200"/>
- </a>
-}
+<div id="gallery">
+ @foreach(var media in Media) {
+ // Precalculate thumbnail size to help the browser
+ // lay out the images during initial page load
+ int width = media.Width * 200 / media.Height;
+ <a href="/ViewMedia?m=@(media.Guid)">
+ <img src="/media/thumb/@(media.Guid)?h=200" width=@width height="200"/>
+ </a>
+ }
+</div>
@code {
[Parameter]