mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
✨ Feat: add parameter params.home.profile.avatarMenu
This commit is contained in:
@@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
|
||||
- :sparkles: Feat: add custom templates and parameter `params.customFilePath` support
|
||||
- :sparkles: Feat: add feature end of post flag support ([#236](https://github.com/hugo-fixit/FixIt/issues/236))
|
||||
- :sparkles: Feat: add params to close wordcount and readingTime in post ([#209](https://github.com/hugo-fixit/FixIt/issues/209))
|
||||
- :sparkles: Feat: add parameter `params.home.profile.avatarMenu`
|
||||
- :truck: Feat: migrate parameter `params.autoBookmark` to `params.page.autoBookmark` ([#55](https://github.com/hugo-fixit/FixIt/issues/55))
|
||||
- :zap: Perf: optimize close comment feature when the post has expired ([#204](https://github.com/hugo-fixit/FixIt/issues/204))
|
||||
- :zap: Perf: optimize sub menu position calculation in desktop header with css replace of javascript
|
||||
|
||||
@@ -203,6 +203,8 @@
|
||||
gravatarEmail = "xx@xx.com"
|
||||
# URL of avatar shown in home page
|
||||
avatarURL = ""
|
||||
# FixIt 0.2.17 | NEW identifier of avatar menu link
|
||||
avatarMenu = ""
|
||||
# FixIt 0.2.7 | CHANGED title shown in home page (HTML format is supported)
|
||||
title = ""
|
||||
# subtitle shown in home page
|
||||
|
||||
+1
-1
Submodule docs updated: ebed6cbba2...af37a6cff9
@@ -14,7 +14,15 @@
|
||||
{{- if $avatar -}}
|
||||
<div class="home-avatar">
|
||||
{{- $menus := $.Site.Menus.main | default slice -}}
|
||||
{{- with index $menus 0 -}}
|
||||
{{- $avatarMenuIndex := 0 -}}
|
||||
{{- if $profile.avatarMenu -}}
|
||||
{{- range $index, $menu := $menus -}}
|
||||
{{- if eq $menu.Identifier $profile.avatarMenu -}}
|
||||
{{- $avatarMenuIndex = $index -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- with index $menus $avatarMenuIndex -}}
|
||||
{{- $url := .URL | relLangURL -}}
|
||||
{{- with .Page -}}
|
||||
{{- $url = .RelPermalink -}}
|
||||
|
||||
Reference in New Issue
Block a user