Fix note layout (#274)
* Re-structure note lists Signed-off-by: hossainemruz <hossainemruz@gmail.com> * Support note splitting Signed-off-by: hossainemruz <hossainemruz@gmail.com> * Update single page Signed-off-by: hossainemruz <hossainemruz@gmail.com> * Refactor separator logic in navbar Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
parent
fc5656c937
commit
67c49c7432
9 changed files with 127 additions and 45 deletions
25
layouts/partials/helpers/add-navbar-separator.html
Normal file
25
layouts/partials/helpers/add-navbar-separator.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{ $addNavbarSeparator:= false }}
|
||||
|
||||
{{/* If "blog" feature is enabled, then add navbar separator */}}
|
||||
{{ if site.Params.features.blog.enable }}
|
||||
{{ $addNavbarSeparator = true }}
|
||||
{{ end }}
|
||||
|
||||
{{/* If "notes" feature is enabled, then add navbar separator */}}
|
||||
{{ if site.Params.features.notes.enable }}
|
||||
{{ $addNavbarSeparator = true }}
|
||||
{{ end }}
|
||||
|
||||
{{/* If site has custom menus, then add navbar separator */}}
|
||||
{{ $customMenus := site.Params.customMenus }}
|
||||
{{ if (index site.Data site.Language.Lang).site.customMenus }}
|
||||
{{ $customMenus = (index site.Data site.Language.Lang).site.customMenus }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $customMenus }}
|
||||
{{ if gt (len $customMenus) 0 }}
|
||||
{{ $addNavbarSeparator = true }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ return $addNavbarSeparator }}
|
Loading…
Add table
Add a link
Reference in a new issue