<div id="sideContainer" class="side-container">
    {{ if eq .Title .Site.Title}}
    <a class="a-block nav-head active" href="{{ "" | absLangURL }}">
    {{ else }}
    <a class="a-block nav-head false" href="{{ "" | absLangURL }}">
    {{ end }}
        <div class="nav-title">
            {{.Site.Title}}
        </div>
        {{ with .Site.Params.subtitle }}
        <div class="nav-subtitle">
            {{.}}
        </div>
        {{ end }}
    </a>

    <div class="nav-link-list">
        {{ $current := .RelPermalink | absLangURL }}
        {{ range .Site.Menus.main }}
            {{$actived := "false"}}
            <!-- A problem caused by slash: if you use "eq" directly, you will get a result of "/tags/" and "/tags" -->
            {{if hasPrefix  $current (.URL|absLangURL)}}
                {{$actived = "active"}}
            {{end}}
            {{ if .HasChildren }}
            <div class="a-block" class="nav-link-item {{$actived}}" v-on:click="isHidden = !isHidden">
                {{ .Name }}
                <div class="nav-link-subitem" v-if="!isHidden">
                    {{ range .Children }}
                    <li><a href="{{ .URL }}"> {{ .Name }}</a></li>
                    {{ end }}
                </div>
            </div>
            {{ else }}
            <!--<a class="a-block nav-link-item {{$actived}}" href="{{ .URL }}">-->
            <a class="a-block nav-link-item {{ $actived }}" href="{{ .URL }}">
                {{ .Name }}
            </a>
            {{ end }}
        {{ end }}
    </div>

    

    <div class="nav-footer">
        {{partial "copyright.html" .}}
    </div>
    
</div>