Skip to content

Commit

Permalink
Better format for tag page
Browse files Browse the repository at this point in the history
  • Loading branch information
Webreaper committed Aug 28, 2021
1 parent d493d69 commit d8d0937
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions Damselfly.Web/Pages/TagPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,25 @@
<div class="top-row">
<h4>Tag: @TagName</h4>
</div>
<div class="wrapping_table">
<div class="damselfly-imagegrid" id="scroll-area">
@foreach (var image in images)
{
<GridImage CurrentImage=@image />
<div class="damselfly-gridimage wrapping-table-small">
<GridImage CurrentImage=@image />
</div>
}
</div>
}
</div>
@code {
[Parameter]
public string TagName { get; set; }
[Parameter]
public string TagName { get; set; }

Image[] images;
Tag selectedTag;
string searchText;
Image[] images;
Tag selectedTag;
string searchText;

private string TagLink( Tag tag ) => $"/tag/{tag.Keyword}";
private string TagLink( Tag tag ) => $"/tag/{tag.Keyword}";

private IEnumerable<Tag> Tags
{
Expand All @@ -87,6 +89,14 @@
return tag.Keyword.Contains(searchText, StringComparison.OrdinalIgnoreCase);
}

protected override void OnAfterRender(bool firstRender)
{
if (firstRender)
{
ViewDataService.SetSideBarState(new ViewDataService.SideBarState { ShowBasket = true, ShowTags = true });
}
}

protected override async Task OnParametersSetAsync()
{
if (!string.IsNullOrEmpty(TagName))
Expand Down

0 comments on commit d8d0937

Please sign in to comment.