mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-23 07:16:23 +01:00
feat(menu): add menu pre
This commit is contained in:
parent
097473ef2a
commit
8cd7e8d672
3 changed files with 7 additions and 3 deletions
|
@ -97,7 +97,9 @@ dateFormatToUse = "2006-01-02"
|
|||
|
||||
[[menu.main]]
|
||||
identifier = "zh"
|
||||
name = '<i class="fas fa-language fa-fw" title="简体中文"></i>'
|
||||
pre = '<i class="fas fa-language fa-fw"></i>'
|
||||
name = ""
|
||||
title = "简体中文"
|
||||
url = "https://hugo-loveit-zh.netlify.com"
|
||||
weight = 5
|
||||
|
||||
|
|
|
@ -97,7 +97,9 @@ dateFormatToUse = "2006-01-02"
|
|||
|
||||
[[menu.main]]
|
||||
identifier = "en"
|
||||
name = '<i class="fas fa-language fa-fw" title="English"></i>'
|
||||
pre = '<i class="fas fa-language fa-fw"></i>'
|
||||
name = ""
|
||||
title = "English"
|
||||
url = "https://hugo-loveit-en.netlify.com"
|
||||
weight = 5
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
{{- $currentPage := . }}
|
||||
{{- range .Site.Menus.main -}}
|
||||
<a class="menu-item{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) | or (eq $currentPage.RelPermalink .URL) }} active{{ end }}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">
|
||||
{{- .Name | safeHTML -}}
|
||||
{{- .Pre | safeHTML }}{{ .Name -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw" title="{{ T "switchTheme" }}"></i></a>
|
||||
|
|
Loading…
Reference in a new issue