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

fix news&events focus

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