diff options
Diffstat (limited to 'layouts/partials/menu.html')
-rw-r--r-- | layouts/partials/menu.html | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index 28421acf..b27d498d 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -12,16 +12,8 @@ {{- define "partials/inline/menu/walk.html" }} {{- $page := .page }} {{- range .menuEntries }} - - {{- if .Params.nonpage }} - <li>{{.Name }} {{ .Post }} - {{- else if .Params.placeholder }} - <li><span class="placeholder">{{.Name }} {{ .Post }}</span> - {{- else}} - <li><b><a href="{{ .URL }}">{{ .Name }}</a></b> {{ .Post }} - {{- partial "inline/menu/new-or-up.html" (dict "page" ($page.GetPage .URL)) }} - {{- end}} - + {{- partial "menu/item.html" (dict "page" $page "item" .) }} + {{- if .Params.inlineChildren}} {{- with .Children }} - {{- partial "inline/menu/inline.html" (dict "page" $page "menuEntries" .) }} @@ -31,7 +23,6 @@ {{- with .Children }} <ul>{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}</ul> {{- end }} - </li> {{- end}} {{- end }} {{- end }} @@ -39,18 +30,7 @@ {{- define "partials/inline/menu/inline.html" }} {{- $page := .page }} {{- range .menuEntries }} - <a href="{{ .URL }}"> {{ .Name }}</a>{{- partial "inline/menu/new-or-up.html" (dict "page" ($page.GetPage .URL)) }} + <a href="{{ .URL }}"> {{ .Name }}</a>{{- partial "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}} -<span class="new">(new)</span> -{{- else}} - {{if lt (div (now.Sub .page.Lastmod).Hours 24) 10 }} -<span class="new">(updated)</span> - {{- end}} -{{- end}} - -{{- end }} |