Skip to content

Consider hiding the breadcrumb at the top level and changing its postion #857

@at055612

Description

@at055612

When you are at the top level of a section the breadcrumb shows a single link like so

imageimage

which looks a little odd as it is not obvious that is is a breadcrumb. With >1 item it is fine

Thus consider changing breadcrumb.html to hide the nav for a single item.

{{ $isSingle := true -}}
{{ with .Parent -}}
  {{ $isSingle = .IsHome -}}
{{ end -}}
{{ if not $isSingle }}
<nav aria-label="breadcrumb" class="td-breadcrumbs
    {{- if $isSingle }} td-breadcrumbs__single {{- end }}">
  <ol class="breadcrumb">
    {{- template "breadcrumbnav" (dict "p1" . "p2" .) }}
  </ol>
</nav>
{{ end }}
...

For me this then looks like:

image

Also, when you have the archived banner visible, the breadcrumbs appear below it which looks a little odd.

image

I think it looks better if the breadcrumbs always remain at the top like so

image

i.e. in layouts/docs/baseof.html

...
          <main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
            {{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
            {{ partial "version-banner.html" . }}
            {{ block "main" . }}{{ end }}
          </main>
...

Appreciate this is all subjective.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions