Feat(menu): add params.type for menu items

This commit is contained in:
Cell
2022-08-28 20:09:02 +08:00
parent f77febb93d
commit d061469497
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -6,16 +6,16 @@ All notable changes to this project will be documented in this file.
## v0.2.16
- :sparkles: Feat: add `raw` shortcode
- :sparkles: Feat(menu): add params: `icon`, `type` for menu items
- :sparkles: Feat: add custom aside template in post page ([#172](https://github.com/hugo-fixit/FixIt/issues/172))
- :sparkles: Feat(math): add more block delimiter support for math
- :sparkles: Feat(menu): add `params.icon` support for menu items
- :wheelchair: Feat(accessibility): use `aria-hidden=true` on icons that AT should ignore
- :bug: Fix: add function doc2unix to unify new lines symbol between Windows and Unix/Mac OS
- :bug: Fix: author display error in post and markdown file
- :bug: Fix: use data attributes or class replace for custom attributes
- :bug: Fix: attribute `media` not allowed on element meta in `[name=theme-color]`
- :bug: Fix: support smooth migration from LoveIt to FixIt ([#174](https://github.com/hugo-fixit/FixIt/discussions/174) [#182](https://github.com/hugo-fixit/FixIt/issues/182))
- :bug: Fix: `center-quote` shortcode when config unsafe = false (@yureiita[#160](https://github.com/hugo-fixit/FixIt/pull/160))
- :bug: Fix: `center-quote` shortcode rendering error when config `unsafe = false` (@yureiita[#160](https://github.com/hugo-fixit/FixIt/pull/160))
- :art: Style: change the default icons of some social links
- :globe_with_meridians: Docs(i18n): update pt-br, de in i18n
- :mag: Perf(SEO): enhance SEO performance
+1 -1
Submodule docs updated: cf0f53a8b6...ea452a6bf9
+2 -2
View File
@@ -43,7 +43,7 @@
{{- with .Page -}}
{{- $url = .RelPermalink -}}
{{- end -}}
{{- if (ne .Params.Draft true) | or $buildDrafts -}}
{{- if (ne .Params.Draft true) | or $buildDrafts | and (ne .Params.Type "mobile") -}}
<li class="menu-item{{ if $.IsMenuCurrent `main` . | or ($.HasMenuCurrent `main` .) | or (eq $.RelPermalink $url) }} active{{ end }}{{ with .Params.Class }} {{ . }}{{ end }}{{ if .HasChildren }} has-children{{ end }}">
<a
class="menu-link"
@@ -212,7 +212,7 @@
{{- with .Page -}}
{{- $url = .RelPermalink -}}
{{- end -}}
{{- if (ne .Params.Draft true) | or $buildDrafts -}}
{{- if (ne .Params.Draft true) | or $buildDrafts | and (ne .Params.Type "desktop") -}}
<li
class="menu-item{{ if $.IsMenuCurrent `main` . | or ($.HasMenuCurrent `main` .) | or (eq $.RelPermalink $url) }} active{{ end }}{{ with .Params.Class }} {{ . }}{{ end }}"
>