{{- $layout := .layout }}
{{- with .currentNode}}
  <div class="breadcrumb">
    <div class="container">
      <div class="row">
        <div class="{{ $layout}}">
          {{- template "breadcrumb" dict "page" . "value" .Title }}
        </div>
      </div>
    </div>
</div>
{{ end }}

{{define "breadcrumb"}}
{{ if .page.Parent}}
  {{$value := (printf "<a href='%s'>%s</a> &sc; %s" .page.Parent.Permalink .page.Parent.Title .value)}}
  {{- template "breadcrumb" dict "page" .page.Parent "value" $value }}
{{else}}
  <a href="https://bornagainproject.org">
    <img src="/img/bornagain-logo2.png"
         class="d-inline-block align-top" style="margin-Top:1px" alt=""></a>
    &nbsp;
    <a href="https://bornagainproject.org">BornAgain</a>
  &sc; <span class="version_switch">{{ site.Params.version_name }}</span>
  &sc; {{.value|safeHTML}}
{{end}}
{{end}}
