{{ define "sidebar" }}
    {{$currentNode := . }}
    <div class="leading-none mb-12">
        <span class="title-pretext">syllabus ⦚ </span><span class="title-text pt-6">{{ .Title }}</span>
    </div>

    {{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
    <div class="ddmenu">
        <input id="toggly-toc" type="checkbox" >
        <label for="toggly-toc" class="sidebar-title" tabindex="1">▒▒ table of contents ▽</label>
        <div class="hiddendiv">
            <div class="mt-4">
                {{ .Page.TableOfContents }}
            </div>
        </div>
    </div>
    {{ end }}

    <div class="ddmenu">
    <input id="toggly" type="checkbox">
    <label for="toggly" class="sidebar-title mb-1" tabindex="1">▒▒ has topics ▽</label>
    <div class="hiddendiv">
        <ul class="mt-4">
        {{ range split .Params.has_topics "," }}
          {{ with $.GetPage (printf "%s%s" "/topic/" (trim . " ")) }}
            <li><a class="sidebar-list text-base" href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">> {{ .Title }}</a></li>
          {{ end }}
        {{ end }}
    </ul>
    </div>
    </div>
{{ end }}

{{ define "main" }}
    <div class="content-text">{{ .Content }}</div>
{{ end }}
