{{- $sidebarEnabled := .Site.Params.sidebar.enable -}}
{{- $sidebarWidgets := .Site.Params.widgets.sidebar -}}

{{- if ( and $sidebarEnabled $sidebarWidgets ) -}}

<a class='screen-reader-text' href='#content'>{{ i18n "skipToContent" }}</a>

<button id='sidebar-toggler' class='sidebar-toggler' aria-controls='sidebar'>
  <span class='screen-reader-text'>{{ i18n "toggleSidebar" }}</span>
  <span class='open'>
    {{- partial "svg/icon" "menu" -}}
  </span>
  <span class='close'>
    {{- partial "svg/icon" "x"