Serve the home nav link from PocketBase, not a hard-coded copy
This commit is contained in:
1 parent
1bdb026669
commit
3fd4068762
8 files changed
+26
-40
No files matched your search
@@ -20,10 +20,10 @@
|
||||
</label>
|
||||
|
||||
<nav class="main-nav">
|
||||
@* A home link that only shows in the collapsed mobile menu. On wide
|
||||
screens the brand is the home link, so this would be a redundant
|
||||
entry -- CSS hides it there (see .nav-home-mobile). *@
|
||||
<NavLink class="nav-home-mobile" href="/" Match="NavLinkMatch.All">Start</NavLink>
|
||||
@* The home link comes from PocketBase like every other entry (the
|
||||
"home" page carries location "header"), so it is rendered by the
|
||||
loop below -- no separate hard-coded home link, which would show
|
||||
up twice next to the PocketBase one. *@
|
||||
@foreach (var link in _header)
|
||||
{
|
||||
<NavLink href="@link.Href" Match="@(link.Href == "/" ? NavLinkMatch.All : NavLinkMatch.Prefix)">@link.Title</NavLink>
|
||||
|
||||
Reference in new issue
Block a user