diff options
| author | Jake Mannens <jake@asger.xyz> | 2023-09-02 11:18:45 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2025-08-20 00:48:44 +1000 |
| commit | 259fb4f401c58033c3afdce0fa5571d46a5577b2 (patch) | |
| tree | 4e1ab37d5993fee06c7ba7c7e288e51ce4769786 /Pages/Gallery.razor | |
| parent | b286a0b0f1fcdb511d2dbb8886039cfb0182c89b (diff) | |
Improved page layouts
Diffstat (limited to 'Pages/Gallery.razor')
| -rw-r--r-- | Pages/Gallery.razor | 18 |
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] |
