{{- $page := .page }} {{- $menuID := .menuID }} {{- with index site.Menus $menuID }} {{- end }} {{- define "partials/inline/menu/walk.html" }} {{- $page := .page }} {{- range .menuEntries }} {{- if .Params.nonpage }}
  • {{.Name }} {{ .Post }} {{- else if .Params.placeholder }}
  • {{.Name }} {{ .Post }} {{- else}}
  • {{ .Name }} {{ .Post }} {{- partial "inline/menu/new-or-up.html" (dict "page" ($page.GetPage .URL)) }} {{- end}} {{- if .Params.inlineChildren}} {{- with .Children }} - {{- partial "inline/menu/inline.html" (dict "page" $page "menuEntries" .) }} {{- end}} {{- else}} {{- with .Children }} {{- end }}
  • {{- end}} {{- end }} {{- end }} {{- define "partials/inline/menu/inline.html" }} {{- $page := .page }} {{- range .menuEntries }} {{ .Name }}{{- partial "inline/menu/new-or-up.html" (dict "page" ($page.GetPage .URL)) }} {{- end }} {{- end }} {{- define "partials/inline/menu/new-or-up.html" }} {{- if lt (div (now.Sub .page.PublishDate).Hours 24) 15}} (new) {{- else}} {{if lt (div (now.Sub .page.Lastmod).Hours 24) 10 }} (updated) {{- end}} {{- end}} {{- end }}