Skip to content

Commit

Permalink
feat(docs): Improve display of index note navigation
Browse files Browse the repository at this point in the history
- Updated the rendering of the `FoundIndexNote` component in `Docs.razor`
- Added logic to conditionally display index note navigation based on the presence of a non-empty `VaultPath`
- Modified the `VaultDisplayOptions` property initialization to include a trailing space for consistency
  • Loading branch information
SakuraIsayeki committed Jan 14, 2024
1 parent 0a61b50 commit cabe44e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions SocialGuard.Web/Pages/Docs.razor
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,17 @@
<h3 class="text-warning">Not Found</h3>
</NotFound>

<FoundIndexNote>@FoundNote.Render(context.Item1)</FoundIndexNote>
<FoundIndexNote>
@FoundIndexNote.Render(context with
{
DisplayOptions = context.DisplayOptions with
{
DisplayIndexNoteNavigation = VaultPath is not (null or "")
}
})
</FoundIndexNote>


</ObsidianVaultDisplay>
</article>
</main>
Expand All @@ -31,7 +41,7 @@
[Parameter]
public string VaultPath { get; set; }

public static ObsidianVaultDisplayOptions VaultDisplayOptions { get; } = new() { };
public static ObsidianVaultDisplayOptions VaultDisplayOptions { get; } = new() { };

/// <summary>
/// Builds a Bootstrap breadcrumb using a slash-separated path string.
Expand Down

0 comments on commit cabe44e

Please sign in to comment.