{{ define "main" }}

{{ partial "primary-top.html" . }}

{{ $questions := .Resources.ByType "page" }}
{{ $sorted_questions := sort $questions ".Params.weight" }}

<nav class="toc-inlined d-xl-none d-print-none" style="display:block!important;">
    <hr/>
    <div class="directory" role="directory">
        <nav id="InlineTableOfContents">
            <ul>
                {{ range $q := $sorted_questions }}
                    <li><a href="#{{ $q.File.BaseFileName | urlize }}">{{ $q.Title }}</a></li>
                {{ end }}
            </ul>
        </nav>
    </div>
    <hr/>
</nav>

{{ .Content }}

<div class="faq">
    {{ range $q := $sorted_questions }}
        <h5 id="{{ $q.File.BaseFileName | urlize }}" class="question">{{ $q.Title }}</h5>
        <div class="answer">
            {{ $q.Content }}
        </div>
    {{ end }}
</div>

{{ partial "primary-bottom.html" . }}

{{ end }}
