mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-15 04:24:50 -04:00
Add Bootstrap styling to breadcrumb example
This commit is contained in:
parent
c8c9601a8c
commit
82d74e3063
@ -48,26 +48,21 @@ With the available [section variables and methods](#section-page-variables-and-m
|
|||||||
|
|
||||||
|
|
||||||
{{< code file="layouts/partials/breadcrumb.html" download="breadcrumb.html" >}}
|
{{< code file="layouts/partials/breadcrumb.html" download="breadcrumb.html" >}}
|
||||||
<ul>
|
<ol class="nav navbar-nav">
|
||||||
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
|
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
|
||||||
</ul>
|
</ol>
|
||||||
{{ define "breadcrumbnav" }}
|
{{ define "breadcrumbnav" }}
|
||||||
{{ if .p1.Parent }}
|
{{ if .p1.Parent }}
|
||||||
{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }}
|
{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }}
|
||||||
{{ else if not .p1.IsHome }}
|
{{ else if not .p1.IsHome }}
|
||||||
{{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
|
{{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<li>
|
<li{{ if eq .p1 .p2 }} class="active"{{ end }}>
|
||||||
{{ if eq .p1 .p2 }}
|
|
||||||
{{ .p1.Title }}
|
|
||||||
{{ else }}
|
|
||||||
<a href="{{ .p1.Permalink }}">{{ .p1.Title }}</a>
|
<a href="{{ .p1.Permalink }}">{{ .p1.Title }}</a>
|
||||||
{{ end }}
|
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{< /code >}}
|
{{< /code >}}
|
||||||
|
|
||||||
|
|
||||||
## Section Page Variables and Methods
|
## Section Page Variables and Methods
|
||||||
|
|
||||||
Also see [Page Variables](/variables/page/).
|
Also see [Page Variables](/variables/page/).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user