mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
✨ Feat: open custom blocks: custom-menu:desktop and custom-menu:mobile
This commit is contained in:
@@ -901,6 +901,8 @@ enableEmoji = true
|
||||
# Depends on open custom blocks https://fixit.lruihao.cn/references/blocks/
|
||||
[params.customPartials]
|
||||
head = []
|
||||
menuDesktop = []
|
||||
menuMobile = []
|
||||
profile = []
|
||||
aside = []
|
||||
comment = []
|
||||
|
||||
@@ -5,6 +5,20 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom-menu:desktop" -}}
|
||||
{{- $ctx := . -}}
|
||||
{{- range .Site.Params.customPartials.menuDesktop -}}
|
||||
{{- partial . $ctx -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom-menu:mobile" -}}
|
||||
{{- $ctx := . -}}
|
||||
{{- range .Site.Params.customPartials.menuMobile -}}
|
||||
{{- partial . $ctx -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom-profile" -}}
|
||||
{{- $ctx := . -}}
|
||||
{{- range .Site.Params.customPartials.profile -}}
|
||||
|
||||
@@ -144,6 +144,9 @@
|
||||
</ul>
|
||||
</li>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Custom menu items in the desktop header */ -}}
|
||||
{{- block "custom-menu:desktop" . }}{{ end -}}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
@@ -305,6 +308,9 @@
|
||||
</select>
|
||||
</span>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Custom menu items in the mobile header */ -}}
|
||||
{{- block "custom-menu:mobile" . }}{{ end -}}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- .Scratch.Set "version" "v0.3.16-f66dc32e" -}}
|
||||
{{- .Scratch.Set "version" "v0.3.16-83d25c36" -}}
|
||||
{{- .Scratch.Set "this" dict -}}
|
||||
|
||||
{{- partial "init/detection-env.html" . -}}
|
||||
|
||||
Reference in New Issue
Block a user