🐛 Fixed the children menus links.
This commit is contained in:
parent
3bffe42e3e
commit
af3de3609d
@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: "Mermaid支持流程图"
|
title: "Mermaid支持流程图"
|
||||||
description: "mermaid-flow-chart"
|
|
||||||
keywords: "mermaid,flow,chart"
|
keywords: "mermaid,flow,chart"
|
||||||
|
|
||||||
date: 2022-09-18T20:58:13+08:00
|
date: 2022-09-18T20:58:13+08:00
|
||||||
|
@ -40,17 +40,17 @@ languages:
|
|||||||
main:
|
main:
|
||||||
- identifier: home
|
- identifier: home
|
||||||
name: Home
|
name: Home
|
||||||
pageref: /
|
pageRef: /
|
||||||
pre: home
|
pre: home
|
||||||
weight: 1
|
weight: 1
|
||||||
- identifier: about
|
- identifier: about
|
||||||
name: About
|
name: About
|
||||||
pageref: /about.html
|
pageRef: /about.html
|
||||||
pre: user
|
pre: user
|
||||||
weight: 2
|
weight: 2
|
||||||
- identifier: flinks
|
- identifier: flinks
|
||||||
name: Friend's Links
|
name: Friend's Links
|
||||||
pageref: /flinks.html
|
pageRef: /flinks.html
|
||||||
pre: thumbs-up
|
pre: thumbs-up
|
||||||
weight: 3
|
weight: 3
|
||||||
- identifier: example
|
- identifier: example
|
||||||
@ -59,28 +59,28 @@ languages:
|
|||||||
weight: 4
|
weight: 4
|
||||||
- identifier: flow-charts
|
- identifier: flow-charts
|
||||||
name: Flow Charts
|
name: Flow Charts
|
||||||
pageref: /post/mermaid-charts.html
|
pageRef: /demo/mermaid-charts.html
|
||||||
weight: 1
|
weight: 1
|
||||||
parent: example
|
parent: example
|
||||||
- identifier: math
|
- identifier: math
|
||||||
name: Math Formula
|
name: Math Formula
|
||||||
pageref: /post/math-formula.html
|
pageRef: /demo/math-formula.html
|
||||||
weight: 2
|
weight: 2
|
||||||
parent: example
|
parent: example
|
||||||
parent: example
|
parent: example
|
||||||
- identifier: syntax
|
- identifier: syntax
|
||||||
name: Syntax Highlighting
|
name: Syntax Highlighting
|
||||||
pageref: /post/syntax-highlighting.html
|
pageRef: /demo/syntax-highlighting.html
|
||||||
weight: 3
|
weight: 3
|
||||||
parent: example
|
parent: example
|
||||||
- identifier: archives
|
- identifier: archives
|
||||||
name: Archives
|
name: Archives
|
||||||
pageref: /archives
|
pageRef: /archives
|
||||||
pre: archive
|
pre: archive
|
||||||
weight: 5
|
weight: 5
|
||||||
- identifier: commonweal
|
- identifier: commonweal
|
||||||
name: Commonweal404
|
name: Commonweal404
|
||||||
url: /404.html
|
pageRef: /404.html
|
||||||
pre: heartbeat
|
pre: heartbeat
|
||||||
weight: 6
|
weight: 6
|
||||||
params:
|
params:
|
||||||
@ -201,29 +201,49 @@ menus:
|
|||||||
main:
|
main:
|
||||||
- identifier: home
|
- identifier: home
|
||||||
name: 首页
|
name: 首页
|
||||||
pageref: /
|
pageRef: /
|
||||||
pre: home
|
pre: home
|
||||||
weight: 1
|
weight: 1
|
||||||
- identifier: about
|
- identifier: about
|
||||||
name: 关于
|
name: 关于
|
||||||
pageref: /about.html
|
pageRef: /about.html
|
||||||
pre: user
|
pre: user
|
||||||
weight: 2
|
weight: 2
|
||||||
- identifier: flinks
|
- identifier: flinks
|
||||||
name: 站点示例
|
name: 友情链接
|
||||||
pageref: /flinks.html
|
pageRef: /flinks.html
|
||||||
pre: thumbs-up
|
pre: thumbs-up
|
||||||
weight: 3
|
weight: 3
|
||||||
|
- identifier: example
|
||||||
|
name: 语法示例
|
||||||
|
pre: angles-down
|
||||||
|
weight: 4
|
||||||
|
- identifier: flow-charts
|
||||||
|
name: 流程图
|
||||||
|
pageRef: /demo/mermaid-charts.html
|
||||||
|
weight: 1
|
||||||
|
parent: example
|
||||||
|
- identifier: math
|
||||||
|
name: 数学公式
|
||||||
|
pageRef: /demo/math-formula.html
|
||||||
|
weight: 2
|
||||||
|
parent: example
|
||||||
|
parent: example
|
||||||
|
- identifier: syntax
|
||||||
|
name: 语法高亮
|
||||||
|
pageRef: /demo/syntax-highlighting.html
|
||||||
|
weight: 3
|
||||||
|
parent: example
|
||||||
- identifier: archives
|
- identifier: archives
|
||||||
name: 归档
|
name: 归档
|
||||||
pageref: /archives
|
pageRef: /archives
|
||||||
pre: archive
|
pre: archive
|
||||||
weight: 4
|
weight: 5
|
||||||
- identifier: commonweal
|
- identifier: commonweal
|
||||||
name: 公益 404
|
name: 公益 404
|
||||||
url: /404.html
|
pageRef: /404.html
|
||||||
pre: heartbeat
|
pre: heartbeat
|
||||||
weight: 5
|
weight: 6
|
||||||
|
|
||||||
#-----------------------------------------
|
#-----------------------------------------
|
||||||
# Hugo NexT 主题参数配置
|
# Hugo NexT 主题参数配置
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<nav class="site-nav">
|
<nav class="site-nav">
|
||||||
<ul class="main-menu menu">
|
<ul class="main-menu menu">
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
{{ $active := $curP.IsMenuCurrent "main" . }}
|
{{ $active := $curP.IsMenuCurrent .Menu . }}
|
||||||
<li class="menu-item menu-item-{{ .Identifier }}">
|
<li class="menu-item menu-item-{{ .Identifier }}">
|
||||||
<a href="{{ .URL | relLangURL }}" class="{{ if .HasChildren }}menus-parent{{ end }} hvr-icon-pulse {{if $active }} menu-item-active{{ end }}" rel="section">
|
<a href="{{ .URL | relLangURL }}" class="{{ if .HasChildren }}menus-parent{{ end }} hvr-icon-pulse {{if $active }} menu-item-active{{ end }}" rel="section">
|
||||||
{{ if $ms.icons }}<i class="fa fa-{{ .Pre }} hvr-icon"></i>{{ end }}{{ .Name }}
|
{{ if $ms.icons }}<i class="fa fa-{{ .Pre }} hvr-icon"></i>{{ end }}{{ .Name }}
|
||||||
@ -15,9 +15,9 @@
|
|||||||
{{ if .HasChildren }}
|
{{ if .HasChildren }}
|
||||||
<ul class="menu-children">
|
<ul class="menu-children">
|
||||||
{{ range .Children }}
|
{{ range .Children }}
|
||||||
{{ $active = $curP.IsMenuCurrent "main" . }}
|
{{ $active = or ($curP.IsMenuCurrent .Menu .) ($curP.HasMenuCurrent .Menu .) }}
|
||||||
<li class="menu-child-item">
|
<li class="menu-child-item">
|
||||||
<a href="{{ .URL | relLangURL }}" class="hvr-icon-pulse {{if $active }}menu-item-active{{ end }}" rel="section">
|
<a href="{{ .PageRef | relLangURL }}" class="hvr-icon-pulse {{if $active }}menu-item-active{{ end }}" rel="section">
|
||||||
<i class="fa hvr-icon"></i>{{ .Name }}
|
<i class="fa hvr-icon"></i>{{ .Name }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user