<div class="toggle sidebar-toggle" role="button">
  <span class="toggle-line"></span>
  <span class="toggle-line"></span>
  <span class="toggle-line"></span>
</div>
<aside class="sidebar">
  {{ $tocEnable := and .IsPage .Params.toc | default .Site.Params.toc.enable }}

  <div class="sidebar-inner {{ if $tocEnable }}sidebar-nav-active sidebar-toc-active{{ else }}sidebar-overview-active{{ end }}">
    <ul class="sidebar-nav">
      <li class="sidebar-nav-toc">
        {{ T "TableOfContents" }}
      </li>
      <li class="sidebar-nav-overview">
        {{ T "SiteOverview" }}
      </li>
    </ul>
    <div class="sidebar-panel-container">
      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
        <div class="post-toc animated">{{ .TableOfContents }}</div>
      </div>
      <!--/noindex-->
      <div class="site-overview-wrap sidebar-panel">
        {{- partialCached "sidebar/overview.html" . -}}
        
        {{- $custom := .Scratch.Get "sidebar" }}
        {{- if $custom }}
          {{ partialCached $custom . }}
        {{- end }}
      </div>
    </div>
   
  </div>

  {{- if .Site.Params.siteState.statistic.enable }}
    {{- partial "sidebar/siteinfo.html" . }}
  {{- end }}

  {{- if and .Site.Params.backTop.enable .Site.Params.backTop.sidebar }}
  <div class="sidebar-card-widget back-to-top-card">
    <div class="back-to-top animated" role="button" aria-label="{{ T "BackTop" }}">
      <i class="fa fa-arrow-up"></i>
      <span>0%</span>
    </div>
  </div>
  {{- end }}
</aside>
<div class="sidebar-dimmer"></div>
