Make navbar brand URL context aware
This commit is contained in:
parent
5e993f5740
commit
b7ac8360cc
3 changed files with 3 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "navbar" }}
|
||||
{{ partial "navbar-2.html" (dict "baseURL" .Site.BaseURL "title" .Site.Title "hasToggleButton" true) }}
|
||||
{{ partial "navbar-2.html" (dict "baseURL" .Site.BaseURL "title" .Site.Title "hasToggleButton" true "navBrandURL" .Site.BaseURL ) }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "navbar" }}
|
||||
{{ partial "navbar-2.html" (dict "baseURL" .Site.BaseURL "title" .Site.Title "hasToggleButton" false) }}
|
||||
{{ partial "navbar-2.html" (dict "baseURL" .Site.BaseURL "title" .Site.Title "hasToggleButton" false "navBrandURL" "/posts") }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<nav class="navbar navbar-expand-lg top-navbar final-navbar shadow">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="{{ .baseURL }}">
|
||||
<a class="navbar-brand" href="{{ .navBrandURL }}">
|
||||
<img src="/assets/images/logo.png">
|
||||
{{- .title -}}
|
||||
</a>
|
||||
|
@ -11,7 +11,6 @@
|
|||
<div class="collapse navbar-collapse" id="top-nav-items">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue