提交 49e64c95 编写于 作者: E edisonxiang

fix news&events focus

上级 5e5039d6
......@@ -22,15 +22,13 @@
{{ $current := . }}
{{ range .Site.Menus.main }}
{{ $topLevel := replace .URL "/" "" }}
<div style="display: none">
RelPermalink: {{ $current.RelPermalink }}<br>
URL: {{ .URL }}<br>
current.Type: {{ $current.Type }}<br>
topLevel: {{ $topLevel }}<br>
Identifier: {{ .Identifier }}<br>
Kind: {{ $current.Kind }} <br>
</div>
<li class="dropdown{{ if eq $current.RelPermalink .URL | or (eq (trim $current.RelPermalink "/") $topLevel) | or (eq $current.Type .Identifier) | or (eq $current.Type $topLevel) | or (and (eq (default (trim .URL "/") .Identifier) "blog") (in (slice "taxonomy" "taxonomyTerm") $current.Kind)) }} active{{ end }}">
{{ $isChildren := false }}
{{ range .Children }}
{{ if eq .Identifier $current.Type }}
{{ $isChildren = true }}
{{ end }}
{{ end }}
<li class="dropdown{{ if eq $current.RelPermalink .URL | or $isChildren | or (eq (trim $current.RelPermalink "/") $topLevel) | or (eq $current.Type .Identifier) | or (eq $current.Type $topLevel) | or (and (eq (default (trim .URL "/") .Identifier) "blog") (in (slice "taxonomy" "taxonomyTerm") $current.Kind)) }} active{{ end }}">
{{ if .HasChildren }}
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ .Name }} <span class="caret"></span></a>
<ul class="dropdown-menu">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册